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

Function to transform geodetic to geocentric spherical coordinates #20

Closed
leouieda opened this issue Nov 6, 2018 · 2 comments · Fixed by #28
Closed

Function to transform geodetic to geocentric spherical coordinates #20

leouieda opened this issue Nov 6, 2018 · 2 comments · Fixed by #28
Assignees
Labels
enhancement Idea or request for a new feature good first issue Good for newcomers (doesn’t require deep knowledge of the project)

Comments

@leouieda
Copy link
Member

leouieda commented Nov 6, 2018

Description of the desired feature

The tesseroid modeling is done in geocentric spherical coordinates (longitude, geocentric latitude, radius) but the data is usually in geodetic coordinates (longitude, geodetic latitude, geometric height). Proj4 apparently only converts the latitudes (https://proj4.org/operations/conversions/geoc.html) but not the height to radius. We need a function that does this conversion so that we can use tesseroids appropriately.

The function will use the current ellipsoid (get_ellipsoid) to do the conversion. Tests can use simplified ellipsoids to check that the computations are correct (like setting the flattening to 1 and axis to an integer). It could go into a new harmonica/coordinates.py module and should look like:

def geodetic_to_geocentric(latitude, height):
    ...
    return geocentric_latitude, radius
@leouieda leouieda added enhancement Idea or request for a new feature help wanted good first issue Good for newcomers (doesn’t require deep knowledge of the project) labels Nov 6, 2018
@santisoler
Copy link
Member

@leouieda
Seems a nice issue to be assigned to me. I would like to take Tesseroids related issues in the future, so this sounds a nice way to start.

@santisoler santisoler self-assigned this Nov 7, 2018
@leouieda
Copy link
Member Author

leouieda commented Nov 7, 2018

👍

leouieda pushed a commit that referenced this issue Nov 16, 2018
Convert geocentric coordinates (defined by the ReferenceEllipsoid) to
geocentric (spherical) coordinates. Only geodetic `latitude` and `height`
are converted to `geocentric_latitude` and `radius`. Geocentric spherical 
and geodetic longitudes are equal.

Fixes #20
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 good first issue Good for newcomers (doesn’t require deep knowledge of the project)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants