Closed sceylan closed 9 years ago
Good idea. It now works like this (I also renamed the functions):
elliptic_to_geocentric_latitude(lat, axis_a=6378137.0, axis_b=6356752.314245)
axis_a
and axis_b
are the major and minor axes of the planet. Units don't matter as long as they are identical. They default to the values of WGS84 ellipsoid but can be changed. Does this work for you?
It works great! Thanks.
OK. A new idea on this issue. Is it too difficult to pull these radius values out directly from the a running instateis database? I am very new to your very useful tool here. Please let me know if I can contribute more other than suggestions.
No that is not possible. The point is that instaseis assumes a perfect sphere for everything so the coordinates you give it must be defined on the sphere (also called geocentric coordinates). Earth is not a perfect sphere. An often used approximation is an ellipsoid (WGS84 is an example). In these coordinate systems latitude is usually defined as the angle of the surface normal to the equatorial plane.
So any coordinates you have (quite likely in WGS84) have to be converted to geocentric coordinates before being used with instaseis. Instaseis does not know the coordinate system of your data thus it cannot provide the values you are looking for.
The wgs84-geocentric conversion only uses the min/max radius of the Earth. Can you make it a parameter to be used for other planets as well?