.. include:: references.txt .. _astropy-coordinates-solarsystem: Solar System Ephemerides ------------------------ `astropy.coordinates` can calculate the |SkyCoord| of some of the major solar system objects. This functionality requires the `jplephem `_ package to be installed. Coordinates are calculated using the JPL DE430 ephemeris file. The ephemeris file provides predictions valid for years between 1550 and 2650. The file is 115 MB and will be downloaded the first time, but cached after that. Three functions are provided; :meth:`~astropy.coordinates.get_body`, :meth:`~astropy.coordinates.get_moon` and :meth:`~astropy.coordinates.get_body_barycentric`. The first two functions return |SkyCoord| objects in the `~astropy.coordinates.GCRS` frame, whilst the latter returns a `~astropy.coordinates.CartesianRepresentation` of the barycentric position of a body (i.e in the `~astropy.coordinates.ICRS` frame). The methods are used as follows:: >>> from astropy.time import Time >>> from astropy.coordinates import get_moon, get_body >>> from astropy.coordinates import get_body_barycentric, EarthLocation >>> t = Time("2014-09-22 23:22") >>> loc = EarthLocation.of_site('greenwich') >>> get_moon(t, loc) # doctest: +REMOTE_DATA >>> get_body(t, 'jupiter', loc) # doctest: +REMOTE_DATA >>> get_body_barycentric(t, 'moon') # doctest: +REMOTE_DATA The bodies for which positions can be calculated can be listed:: >>> from astropy.coordinates import SOLAR_SYSTEM_BODIES >>> SOLAR_SYSTEM_BODIES ('sun', 'mercury', 'venus', 'earth-moon-barycenter', 'earth', 'moon', 'mars', 'jupiter', 'saturn', 'uranus', 'neptune', 'pluto')