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

fix: bug in HAE RRDot surface projection #64

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

edparris
Copy link
Contributor

This change fixes a bug in the HAERRDotSurfaceProjection code that would sometimes cause a SICD sensor model to fail to geolocate image points using an external DEM model. The code was accidentally using the earth centered fixed (ECF) version of the scene center point (SCP) when computing the ground reference point and adjusting the elevation (z) coordinate like it was a geodetic coordinate. That threw off calculations of the min/max elevation limits for the DEMRRDotSurfaceProjection which eventually led to an exception thrown because the calculations could not be completed ("No solution exists. Distance between ARP and the plane is greater than range.").

This change updates the calculation to use the geodetic (Lon, Lat, Elevation) version of the SCP. You can see that this change makes the calculation consistent with the code on line 765 which already used the geodetic version of the coordinate.

The automated unit tests exercise this code but didn't catch this issue. I was able to recreate the bug using real data from UMBRA available through the AWS Open Data program and then verified that this change fixes the issue.

Checklist

Before you submit a pull request, please make sure you have the following:

  • Code changes are compact and well-structured to facilitate easy review
  • Changes are documented in the README.md and other relevant documentation pages
  • PR title and description accurately reflect the changes and are detailed enough for historical tracking
  • PR contains tests that cover all new code and the code has been manual tested
  • All new dependencies are declared (if any), and no unnecessary libraries are added
  • Performance impacts (if any) of the changes are evaluated and documented
  • Security implications of the changes (if any) are reviewed and addressed
  • I have read the Contributing Guidelines and agree to follow the Code of Conduct

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@edparris edparris merged commit 795ab0e into main Dec 22, 2024
1 check passed
@edparris edparris deleted the hotfix/sicd-sm-haerrdotproj-fix branch December 22, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants