Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i.atcorr: add AVIRIS support #3229

Merged
merged 15 commits into from
Nov 15, 2023
Merged

i.atcorr: add AVIRIS support #3229

merged 15 commits into from
Nov 15, 2023

Conversation

YannChemin
Copy link
Contributor

AVIRIS is a plane flying about 20Km high, the 6S configuration file should have three information after the sensor height, in three different lines:

  • puw (water vapor content between the aircraft and the surface)
  • po3 (ozone content between the aircraft and the surface)
  • taerp (the aerosol optical thickness at 550nm between the aircraft and the surface)

If you do not have this information, please use -1.0

Example
+++++++

31
01 16 23.725 -138.90 28.90
1
2
18
-0.6
-20.56
-1.0
-1.0
-1.0
367

@nilason
Copy link
Contributor

nilason commented Nov 9, 2023

@YannChemin The ClangFormat check is failing, the code need to be formatted with ClangFormat 15. See https://github.com/OSGeo/grass/blob/main/doc/development/submitting/submitting_c.md#source-code-formatting, I recommend using pre-commit for doing this https://github.com/OSGeo/grass/blob/main/doc/development/submitting/submitting.md#use-pre-commit.

@YannChemin
Copy link
Contributor Author

@YannChemin The ClangFormat check is failing, the code need to be formatted with ClangFormat 15. See https://github.com/OSGeo/grass/blob/main/doc/development/submitting/submitting_c.md#source-code-formatting, I recommend using pre-commit for doing this https://github.com/OSGeo/grass/blob/main/doc/development/submitting/submitting.md#use-pre-commit.

Hi how to run it again on already committed code?

@nilason
Copy link
Contributor

nilason commented Nov 9, 2023

@YannChemin The ClangFormat check is failing, the code need to be formatted with ClangFormat 15. See https://github.com/OSGeo/grass/blob/main/doc/development/submitting/submitting_c.md#source-code-formatting, I recommend using pre-commit for doing this https://github.com/OSGeo/grass/blob/main/doc/development/submitting/submitting.md#use-pre-commit.

Hi how to run it again on already committed code?

pre-commit run clang-format --all-files

Copy link
Contributor

@nilason nilason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad you sorted out the clang format issue. I have noted two minor suggestions.

@@ -382,6 +382,8 @@ void Altitude::parse()
cin >> original_xpp;
cin.ignore(numeric_limits<int>::max(), '\n'); /* ignore comments */
original_xpp = -original_xpp;
printf("Original Alt: XPS = %.2f\t XPP = %.2f\n", original_xps,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a G_Debug() maybe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, using G_debug() seems perhaps even more appropriate in this case
(https://grass.osgeo.org/programming8/debug_8c.html#af8982bd66c95e3d8d2773ed956c20733).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi what do I do now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use G_debug() :-)

@@ -4829,7 +6463,7 @@ void IWave::parse()

cin >> iwave;
cin.ignore(numeric_limits<int>::max(), '\n');

printf("iwave = %d\n", iwave);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto, please consider using G_message().

remove temoprary print()
remove temporary print()
@YannChemin YannChemin merged commit 3eacd2a into OSGeo:main Nov 15, 2023
18 checks passed
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
* Add AVIRIS

* Rename aviris.csv to AVIRIS.csv

* Update iwave.h

* Update iwave.cpp

* Update i.atcorr.html

* Update i.atcorr.html

AVIRIS bands description

* Update geomcond.h

* Update geomcond.cpp

* Add files via upload

* pre-commit run --all

* Update altitude.cpp

remove temoprary print()

* Update iwave.cpp

remove temporary print()
@neteler neteler changed the title AVIRIS support in .atcorr AVIRIS support in i.atcorr Jan 14, 2024
@neteler neteler added this to the 8.4.0 milestone Jan 14, 2024
@neteler neteler changed the title AVIRIS support in i.atcorr i.atcorr: add AVIRIS support Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants