1

Please clarify if elevation (in pyephem body.compute as pertaining to artificial satellites) is the geodetic height? or geocentric height? Also, are sublat and sublong geocentric or geodetic? It is not explicitly stated in the documentation.

Is there a subroutine in python that transforms between geocentric and geodetic coordinates? Thank you.

1 Answers1

0

It looks to me like it's geocentric height:

https://github.com/brandon-rhodes/pyephem/blob/master/libastro-3.7.7/earthsat.c#L534

I've tweaked the docs to make this claim:

https://github.com/brandon-rhodes/pyephem/commit/990f2a26260f19dd679c932fe9f8a071505e88ff

Though, note that Earth satellite computations are often not accurate enough to make the difference between the two systems important, as they're regularly several kilometers off.

The newer astronomy library Skyfield has routines in its earthlib.py that convert between geodetic coordinates and x,y,z vectors. If you did the math yourself for the conversion between x,y,z and geocentric coordinates, you could run a complete conversion between the two.

Brandon Rhodes
  • 83,755
  • 16
  • 106
  • 147
  • It looks to me that line 534 in https://github.com/brandon-rhodes/pyephem/blob/master/libastro-3.7.7/earthsat.c#L534 considers the earth flattening coefficient "EarthFlat" and therefore the height is geodetic right? Line 536 is the geocentric height. So how can you say the result is given in geocentric coordinates only? Could you elaborate more on what SSPELLIPSE is? Thank you. – user9723864 May 16 '18 at 20:50
  • That file, alas, isn't my code, so I haven't studied all the moving parts. But: the difference between "geocentric" and "geodetic" is not whether the Earth is a sphere or flattened. Instead, the difference is whether "height" is measured along a line between the satellite and the Earth's surface, or along a line that intersects the geoid at a right angle. Here are some diagrams: https://en.wikipedia.org/wiki/Latitude#Geocentric_latitude – Brandon Rhodes May 17 '18 at 21:53