Closed leouieda closed 4 years ago
@MarkWieczorek just to check, this is what you had in mind right?
That is about what I was looking for: But would it be possible to allow inputting geodetic or geocentric latitude? Perhaps you could just add a default parameter like geodetic=True
. If False, the geocentric latitude would first be converted to geodetic.
I have almost never used geodetic coordinates, and when dealing with spherical harmonics, it is natural to use the gecentric latitude :)
Hum, I'll need to think about this a bit since we need the radius in the first place to convert geocentric to geodetic. So it doesn't seem to be straight forward. But there should be a way.
Alright, I worked out the equation and implemented the option for geodetic=False
and some tests. I added a note saying that this is an exception since we generally favor solutions where the conversions are done by the user prior to input to simplify the code. But this wouldn't be an option here since there is no way to do the conversion without knowing the radius already.
Seems like I got my math right :slightly_smiling_face:
This is the distance from the center of the ellipsoid to its surface as a function of geodetic latitude.
Fixes #34
Reminders:
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
and the base__init__.py
file for the package.AUTHORS.md
file (if you haven't already) in case you'd like to be listed as an author on the Zenodo archive of the next release.