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

There's some bug, when i use lat/lon to locate on sphere earth. #76

Open
FengFengmomo opened this issue Jul 27, 2024 · 4 comments
Open

Comments

@FengFengmomo
Copy link

Hi! there.
when i use UnitsUtils.datumsToVector( 45.993553258799736,90.14134050768502);
but i finally find that it have offset, just look like below.
please help!
@tentone @cmurphy23
image

@FengFengmomo
Copy link
Author

i have try UnitsUtils.datumsToSpherical() on plane map, and it is correct.

@FengFengmomo
Copy link
Author

As use @cmurphy23 shader code, there ara a gap(just modify some code to show it),i think that's why localtion is lower than origin at longtitude!
And may there are some methods to fix it, i'll try or could you privide some idea?
image

@FengFengmomo
Copy link
Author

when i use 6378137 as earth radius , it will close to real location, and i have read cesium fromDegrees method , it's earth radius use readius_a and radius_b as default. may be this is a key to solve issue.

@tentone
Copy link
Owner

tentone commented Jul 30, 2024

The texture offset is something that we need to fix, that is causing some deviation.

But the main problem is how we are calculating the coordinates, the correct way to do it is to assume earth to be an ellipse instead of considering it to be a sphere (wich is what we are doing currently).

We have already declared in code the ellipsis radius

image

The current datumsToVector() method generates a spherical oriented vector

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