Skip to content

Ephemeris queries

Use GetEphemerisAsStateVectors to get state vectors of any SPICE-known body observed from any other. The server already has the standard generic kernels loaded; you don't manage them.

Earth as seen from the Sun

{
  "observerName": "SUN",
  "targetName": "EARTH",
  "frame": "ICRF",
  "startTime": "2024-06-21T12:00:00",
  "endTime": "2024-06-21T12:00:00",
  "timeStep": 86400,
  "aberrationCorrection": "None"
}

Returns one state vector — position (m) and velocity (m/s) of Earth in ICRF, with the Sun as observer.

The Moon over a day, hourly samples

{
  "observerName": "EARTH",
  "targetName": "MOON",
  "frame": "ICRF",
  "startTime": "2024-06-21T00:00:00",
  "endTime": "2024-06-22T00:00:00",
  "timeStep": 3600,
  "aberrationCorrection": "LT+S"
}

24 state vectors come back. Aberration LT+S applies one-way light time and stellar aberration — appropriate for what a telescope would actually see.

What about properties?

For intrinsic body properties (radii, GM, J2, frame name), use GetCelestialBodyProperties instead.

{ "celestialBodyName": "MARS" }

Choosing a frame

ICRF is the safe default for inertial work. For body-fixed Earth coordinates you usually want ITRF93 (high-precision Earth orientation) or the body's IAU_* frame for first-order needs. See Standards & Units → Reference frames.

Aberration

If you are asking "where is this body physically right now"None.

If you are asking "where will I see it from here" (telescope, antenna pointing) — LT+S.

Other variants (CN, CN+S, XLT, XLT+S) match SPICE's aberration codes and are documented in the IO.Astrodynamics docs.