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

Add optional argument geodetic to Ellipsoid.normal_gravity #162

Open
MarkWieczorek opened this issue Mar 17, 2024 · 3 comments · May be fixed by #175
Open

Add optional argument geodetic to Ellipsoid.normal_gravity #162

MarkWieczorek opened this issue Mar 17, 2024 · 3 comments · May be fixed by #175
Labels
enhancement Idea or request for a new feature

Comments

@MarkWieczorek
Copy link
Contributor

The Ellipsoid.normal_gravity() method takes as input the geodetic latitude. I propose to add an optional argument geodetic=True/False that would allow the user to specify if the input latitudes are geodetic or geo/planetocentric. The default option would be to use geodetic. Though this could easily be accomplished using the spherical_to_geodetic method, this would make things easier for many applications where the geocentric latitude is the more appropriate value to use.

I note that that option is already implemented in the method Ellipsoid.geocentric_radius()

@MarkWieczorek MarkWieczorek added the enhancement Idea or request for a new feature label Mar 17, 2024
@leouieda
Copy link
Member

The geocentric_radius is justified since it's calculated differently when using spherical coordinates. The normal gravity is not and passing the keyword will mean running the coordinates conversion under the hood.

I'm OK with this if it makes life easier for users.

@MarkWieczorek
Copy link
Contributor Author

What if we noted that its preferable to input geodetic coordinates (which is the default), because the normal gravity routine uses a formalism that requires geodetic coordinates? If this is done repeatedly in a loop, then it wouldn't be very efficient to do the conversion over and over, but if its just a single call, then the computational load would be the same.

I only bring this up because in planetary geophysics, its really rare to use geodetic coordinates, so it would be a convenience for us. :)

@leouieda
Copy link
Member

What if we noted that its preferable to input geodetic coordinates (which is the default), because the normal gravity routine uses a formalism that requires geodetic coordinates?

That sounds like a good idea! We can add it to the description of the geodetic argument.

I only bring this up because in planetary geophysics, its really rare to use geodetic coordinates, so it would be a convenience for us. :)

I've been reading more planetary papers and I noticed 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea or request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants