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

bug in geodetic2Enu #36

Open
riyueshi opened this issue Jan 4, 2019 · 1 comment
Open

bug in geodetic2Enu #36

riyueshi opened this issue Jan 4, 2019 · 1 comment

Comments

@riyueshi
Copy link

riyueshi commented Jan 4, 2019

Hi,
As mentioned in #30 and #28 the conversion between geodetic and ENU produce some error.
I did the following test:
image
since the reference longitude and latitude is the same as the longitude and latitude the expected ENU coordinate should be (0,0,100), but the code result in 0.237m error in y direction

after I change the line 55
ecef_to_ned_matrix_ = nRe(phiP, initial_longitude_);
to
ecef_to_ned_matrix_ = nRe(initial_latitude_, initial_longitude_);
the code works well:
image

and my question is the conversion between geodesic and ENU should be an invertable function why the original code compute the geocentric latitude "phiP" to compute the ecef_to_ned_matrix_ but use geodetic latitude "initial_latitude_" to compute the ned_to_ecef_matrix_ ? Did I missed something important?

Miller

@dlwalter
Copy link

dlwalter commented Nov 10, 2020

Reading https://en.wikipedia.org/wiki/Geographic_coordinate_conversion at "From ECEF to ENU" they mention that

Note:

ϕ is the geodetic latitude. A prior version of this page showed use of the geocentric latitude ϕ′ . The geocentric latitude is not the appropriate up direction for the local tangent plane. If the original geodetic latitude is available it should be used, otherwise, the relationship between geodetic and geocentric latitude has an altitude dependency

It looks like this code is constructing the R_ecef_to_enu/R_ecef_to_end matrix using geocentric latitude (phiP) where it should be using the geodetic latitude.

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

2 participants