-
Notifications
You must be signed in to change notification settings - Fork 18
WIP: Add option to use geocentric latitude with Ellipsoid.normal_gravity #175
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
base: main
Are you sure you want to change the base?
Conversation
|
On further reflection, I'm not sure if this is the best approach. At this point, one can enter either
A different way to handle this would be to allow to enter the following:
We could then tell the normal gravity routine which coordinates we are using by specifying an optional parameter like |
|
I'm in favor of adding a |
|
@MarkWieczorek coming back to Boule after a while and I wanted to see if we can wrap this up. How about this: We change all gravity calculation functions take a Then we handle conversions between coordinate systems internally. For spherical, we'd have to go from spherical to geodetic to ellipsoidal harmonic (all using methods we already have). We can then add to the docstrings saying that equations are naturally in ellipsoidal harmonic so that will be the most efficient and to do conversions independently if running gravity calculations in a loop. This would be backward incompatible since we'd change the signature of the gravity functions. To be honest, I was already a bit bothered that they didn't take What do you think? cc @santisoler for another opinion. |
|
This sounds good to me. If someone wants to implement this, please feel free to do so. I don't have much free time these days... If you wanted to retain backwards compatibility, you could allow to input either |
Use `coordinate_system` instead since we will be moving towards that definition in other functions (see #175). Create a function to check that the argument has a valid value. This way all arguments relating to coordinate systems will be consistent and we can add support for ellipsoidal harmonic coordinates as well.
This is a backwards incompatible change. Use `coordinate_system` instead since we will be moving towards that definition in other functions (see #175). Create a function to check that the argument has a valid value. This way all arguments relating to coordinate systems will be consistent and we can add support for ellipsoidal harmonic coordinates as well.
This PR adds the option to use geocentric latitude with
Ellipsoid.normal_gravity().The following changes were made:
geodeticto the methodnormal_gravity.spherical_to_geodetic. The only difference is that it is first necessary to compute the radius, and we don't care about the longitude and height parameters.I also made a very minor change in the doc string for geocentric_radius: "geocentric geodetic" was changed to just "geodetic" (consistent with other routines). I also note that the normal gravity doc string referred to "geometric" height, but this should be either ellipsoidal height or geodetic height: I mentioned explicitly that this is normal to the ellipsoid, as its meaning could be misinterpreted when using geocentric latitude.
I have tried my best to make the documentation as clear as possible, but there is probably room for improvement.
And to prove that it works:
Relevant issues/PRs:
resolves #162