Skip to content Skip to sidebar Skip to footer

How To Get Earth-inertial Or Earth-centered Coordinates Of Objects From Pyephem?

I would like to get coordinates of objects in various XYZ coordinates, not where they appear in the sky. I'm interested in: ECE: 'Earth Centered Inertial' (not rotation with the

Solution 1:

The old C library that PyEphem is a wrapper around does not, alas, always use (x, y, z) coordinates internally, and when it does it does not expose them so that Python can see what they were — the (x, y, z) coordinates are discarded once the angles have been computed.

For a newer astronomy library by the same author (as it happens, me!) that has been completely rewritten so that (x, y, z) coordinates are indeed available every step of the way, try taking a look at Skyfield:

http://rhodesmill.org/skyfield/

In particular, look at how attributes like .position.km and .position.au let you get any position and decompose it into (x, y, z) Cartesian coordinates:

http://rhodesmill.org/skyfield/positions.html

Post a Comment for "How To Get Earth-inertial Or Earth-centered Coordinates Of Objects From Pyephem?"