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

Forumla for converting WGS84 alt to EGM96 alt in README is incorrect #3

Open
rdkgit opened this issue Nov 16, 2024 · 4 comments
Open

Comments

@rdkgit
Copy link

rdkgit commented Nov 16, 2024

Submitted a pull request.

@mkrupczak3
Copy link

@matthiaszimmermann to add on to this:

We have been doing some testing of our OpenAthena Core and OpenAthena Android software which implements this library.

We discovered recently that our vertical datum conversion based on the equation in the README.md was causing altitude at several ground control points to be off by exactly twice the geoid offset whenever a conversion was applied. Changing the sign (from a + to - or vice versa) resolved these issues and produced the correct converted altitude.

We can provide additional testing steps and results if desired to confirm this fix.

Greatly appreciate this library of yours, it's been essential for our OpenAthena project. Hopefully this fix may allow others to benefit similarly from this library.

Related to:
#2
Theta-Limited/OpenAthenaAndroid#180

@rdkgit
Copy link
Author

rdkgit commented Dec 2, 2024

More info on how we discovered this error and tested to validate our solution. First, the formula for converting between EGM96 and WGS84 is documented here: https://vdatum.noaa.gov/docs/datums.html

We then took a series of WGS84 readings from an RTK GPS unit of fixed light poles in an empty parking lot. We compared their reported WGS84 altitude against Google Earth which reports in MSL. In each case, the Google reported altitude was off roughly by the EGM96 offset from the WGS84 altitude. And the formula for conversion was roughly:

wgs84alt = MSLalt + N

@matthiaszimmermann
Copy link
Owner

thanks so much for your contribution. feels like ages ago when i've done this ;) hope to find time to check/merge your pr in the near future

@rdkgit
Copy link
Author

rdkgit commented Dec 2, 2024

@mkrupczak3 wanted me to provide a little bit more documentation as to how we validated our proposed formula fix. Attached is a drone image of a local parking lot
field-compressed
To that end, we then used Google Earth to look up the AMSL altitude of each light pole and calculate, using both incorrect and corrected formulas, the WGS84 altitude. We then compared that with the altitude we measured using a RTK GPS receiver. In all cases, the AMSL altitude derived from the corrected formula was within 1-2 meters of that reported by Google Earth. Attached also is the csv of the measurements.
SmyrnaTeat01_lightposts.csv

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

No branches or pull requests

3 participants