Skip to content
New issue

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

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

Already on GitHub? # to your account

Landing locations on ellipsoidal bodies #1557

Closed
Askaniy opened this issue Feb 10, 2023 · 5 comments · Fixed by #1808
Closed

Landing locations on ellipsoidal bodies #1557

Askaniy opened this issue Feb 10, 2023 · 5 comments · Fixed by #1808

Comments

@Askaniy
Copy link
Contributor

Askaniy commented Feb 10, 2023

Problem:
For bodies using constructions SemiAxes and Oblateness, the positions of locations are approximated by a sphere, and they are floating in space (see the screenshots below).

Way to solve:
Let's notice, that

  • Celestia uses planetocentric (projection from center) coordinate system for texturing models and for their locations
  • Celestia uses planetographic (projection by normal) for texturing ellipsoids, and spherical approximation for their locations

So, request is to implement recalculation of input planetographic longitude (λ), latitude (φ) and height (h) into x, y, z coordinates using ellipsoid proprieties (semiaxes a_x, a_y, b). I found the formulas in DOI 10.1007/s00190-011-0514-7:
formulas1
formulas2

Screenshot_20230131_120154
Screenshot_20230130_210805
(Duplicate here from the Discord server)

@375gnu
Copy link
Collaborator

375gnu commented Jul 26, 2023

@Askaniy could you provide test addons?

@Askaniy
Copy link
Contributor Author

Askaniy commented Jul 26, 2023

These locations of Ceres already in the content, I think they are good for testing

@375gnu
Copy link
Collaborator

375gnu commented Jul 26, 2023

The formulae should be adjusted a bit to match Celestia coordinate system but the result is good:
image

@375gnu
Copy link
Collaborator

375gnu commented Jul 26, 2023

But with an object placed on a planet surface image is broken due to #542:

image

So I gonna fix this for locations only for now.

@SevenSpheres
Copy link
Contributor

At least with the build from the pull request, locations on Ceres are fixed with its actual oblateness, but I just found that if I modify an object to increase its oblateness to 0.5, locations are still floating in space:
flatmars

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants