Ephemerides¶
Celestial body position calculations for Sun, Moon, and planets.
Analytical Models¶
sun_position builtin ¶
Calculate the position of the Sun in the GCRF inertial frame using low-precision analytical methods.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Sun's position | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Sun in the GCRF frame. Units: (m) |
moon_position builtin ¶
Calculate the position of the Moon in the GCRF inertial frame using low-precision analytical methods.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Moon's position | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Moon in the GCRF frame. Units: (m) |
DE440 Ephemerides¶
sun_position_spice builtin ¶
Calculate the position of the Sun in the GCRF inertial frame using NAIF DE ephemeris.
This function uses the high-precision NAIF DE ephemeris kernel (DE440s or DE440) for solar position computation. The kernel is loaded once and cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Sun's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Sun in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
sun_velocity_spice builtin ¶
Calculate the velocity of the Sun in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Sun's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Sun in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
sun_state_spice builtin ¶
Calculate the state (position and velocity) of the Sun in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Sun's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Sun in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
moon_position_spice builtin ¶
Calculate the position of the Moon in the GCRF inertial frame using NAIF DE ephemeris.
This function uses the high-precision NAIF DE ephemeris kernel (DE440s or DE440) for lunar position computation. The kernel is loaded once and cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Moon's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Moon in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
moon_velocity_spice builtin ¶
Calculate the velocity of the Moon in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Moon's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Moon in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
moon_state_spice builtin ¶
Calculate the state (position and velocity) of the Moon in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Moon's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Moon in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
mercury_position_spice builtin ¶
Calculate the position of Mercury in the GCRF inertial frame using NAIF DE ephemeris.
This function uses the high-precision NAIF DE ephemeris kernel (DE440s or DE440) for Mercury position computation. The kernel is loaded once and cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Mercury's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of Mercury in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
mercury_velocity_spice builtin ¶
Calculate the velocity of Mercury in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Mercury's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of Mercury in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
mercury_state_spice builtin ¶
Calculate the state (position and velocity) of Mercury in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Mercury's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of Mercury in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
venus_position_spice builtin ¶
Calculate the position of Venus in the GCRF inertial frame using NAIF DE ephemeris.
This function uses the high-precision NAIF DE ephemeris kernel (DE440s or DE440) for Venus position computation. The kernel is loaded once and cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Venus's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of Venus in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
venus_velocity_spice builtin ¶
Calculate the velocity of Venus in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Venus's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of Venus in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
venus_state_spice builtin ¶
Calculate the state (position and velocity) of Venus in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Venus's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of Venus in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
mars_position_spice builtin ¶
Calculate the position of Mars (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Mars body center, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Mars satellite ephemeris kernel (mar099s, ~68 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer mars_barycenter_position_spice, which needs only the DE kernel. Loaded kernels are cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Mars's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of Mars (body center) in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
mars_velocity_spice builtin ¶
Calculate the velocity of Mars (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Mars body-center velocity, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Mars satellite ephemeris kernel (mar099s, ~68 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer mars_barycenter_velocity_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Mars's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of Mars (body center) in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
mars_state_spice builtin ¶
Calculate the state (position and velocity) of Mars (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Mars body-center state, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Mars satellite ephemeris kernel (mar099s, ~68 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer mars_barycenter_state_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Mars's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of Mars (body center) in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
jupiter_position_spice builtin ¶
Calculate the position of Jupiter (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Jupiter body center, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Jupiter satellite ephemeris kernel (jup365, ~1.1 GB), which is auto-downloaded and loaded on first use. For third-body force applications prefer jupiter_barycenter_position_spice, which needs only the DE kernel. Loaded kernels are cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Jupiter's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of Jupiter (body center) in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
jupiter_velocity_spice builtin ¶
Calculate the velocity of Jupiter (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Jupiter body-center velocity, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Jupiter satellite ephemeris kernel (jup365, ~1.1 GB), which is auto-downloaded and loaded on first use. For third-body force applications prefer jupiter_barycenter_velocity_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Jupiter's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of Jupiter (body center) in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
jupiter_state_spice builtin ¶
Calculate the state (position and velocity) of Jupiter (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Jupiter body-center state, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Jupiter satellite ephemeris kernel (jup365, ~1.1 GB), which is auto-downloaded and loaded on first use. For third-body force applications prefer jupiter_barycenter_state_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Jupiter's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of Jupiter (body center) in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
saturn_position_spice builtin ¶
Calculate the position of Saturn (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Saturn body center, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Saturn satellite ephemeris kernel (sat441, ~662 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer saturn_barycenter_position_spice, which needs only the DE kernel. Loaded kernels are cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Saturn's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of Saturn (body center) in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
saturn_velocity_spice builtin ¶
Calculate the velocity of Saturn (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Saturn body-center velocity, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Saturn satellite ephemeris kernel (sat441, ~662 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer saturn_barycenter_velocity_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Saturn's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of Saturn (body center) in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
saturn_state_spice builtin ¶
Calculate the state (position and velocity) of Saturn (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Saturn body-center state, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Saturn satellite ephemeris kernel (sat441, ~662 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer saturn_barycenter_state_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Saturn's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of Saturn (body center) in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
uranus_position_spice builtin ¶
Calculate the position of Uranus (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Uranus body center, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Uranus satellite ephemeris kernel (ura184, ~387 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer uranus_barycenter_position_spice, which needs only the DE kernel. Loaded kernels are cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Uranus's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of Uranus (body center) in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
uranus_velocity_spice builtin ¶
Calculate the velocity of Uranus (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Uranus body-center velocity, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Uranus satellite ephemeris kernel (ura184, ~387 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer uranus_barycenter_velocity_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Uranus's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of Uranus (body center) in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
uranus_state_spice builtin ¶
Calculate the state (position and velocity) of Uranus (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Uranus body-center state, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Uranus satellite ephemeris kernel (ura184, ~387 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer uranus_barycenter_state_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Uranus's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of Uranus (body center) in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
neptune_position_spice builtin ¶
Calculate the position of Neptune (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Neptune body center, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Neptune satellite ephemeris kernel (nep097, ~105 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer neptune_barycenter_position_spice, which needs only the DE kernel. Loaded kernels are cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Neptune's position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of Neptune (body center) in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
neptune_velocity_spice builtin ¶
Calculate the velocity of Neptune (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Neptune body-center velocity, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Neptune satellite ephemeris kernel (nep097, ~105 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer neptune_barycenter_velocity_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Neptune's velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of Neptune (body center) in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
neptune_state_spice builtin ¶
Calculate the state (position and velocity) of Neptune (body center) in the GCRF inertial frame using NAIF DE and satellite ephemeris kernels.
This function returns the Neptune body-center state, combining the planetary-system barycenter from the DE kernel (DE440s or DE440) with the body-center offset from the Neptune satellite ephemeris kernel (nep097, ~105 MB), which is auto-downloaded and loaded on first use. For third-body force applications prefer neptune_barycenter_state_spice, which needs only the DE kernel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate Neptune's state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of Neptune (body center) in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
Planetary-System Barycenters¶
The *_position_spice, *_velocity_spice, and *_state_spice functions for Mars, Jupiter, Saturn, Uranus, and Neptune return the planet body center, which auto-downloads the planet's satellite ephemeris kernel on first use. The *_barycenter_*_spice variants below return the planetary-system barycenter using only the DE kernel and are preferred for third-body force applications.
mars_barycenter_position_spice builtin ¶
Calculate the position of the Mars system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required. This is the position used by third-body force models. For the true Mars body center use mars_position_spice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Mars system barycenter position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Mars system barycenter in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
mars_barycenter_velocity_spice builtin ¶
Calculate the velocity of the Mars system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter velocity using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Mars system barycenter velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Mars system barycenter in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
mars_barycenter_state_spice builtin ¶
Calculate the state (position and velocity) of the Mars system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter state using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Mars system barycenter state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Mars system barycenter in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
jupiter_barycenter_position_spice builtin ¶
Calculate the position of the Jupiter system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required. This is the position used by third-body force models. For the true Jupiter body center use jupiter_position_spice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Jupiter system barycenter position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Jupiter system barycenter in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
jupiter_barycenter_velocity_spice builtin ¶
Calculate the velocity of the Jupiter system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter velocity using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Jupiter system barycenter velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Jupiter system barycenter in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
jupiter_barycenter_state_spice builtin ¶
Calculate the state (position and velocity) of the Jupiter system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter state using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Jupiter system barycenter state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Jupiter system barycenter in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
saturn_barycenter_position_spice builtin ¶
Calculate the position of the Saturn system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required. This is the position used by third-body force models. For the true Saturn body center use saturn_position_spice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Saturn system barycenter position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Saturn system barycenter in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
saturn_barycenter_velocity_spice builtin ¶
Calculate the velocity of the Saturn system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter velocity using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Saturn system barycenter velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Saturn system barycenter in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
saturn_barycenter_state_spice builtin ¶
Calculate the state (position and velocity) of the Saturn system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter state using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Saturn system barycenter state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Saturn system barycenter in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
uranus_barycenter_position_spice builtin ¶
Calculate the position of the Uranus system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required. This is the position used by third-body force models. For the true Uranus body center use uranus_position_spice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Uranus system barycenter position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Uranus system barycenter in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
uranus_barycenter_velocity_spice builtin ¶
Calculate the velocity of the Uranus system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter velocity using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Uranus system barycenter velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Uranus system barycenter in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
uranus_barycenter_state_spice builtin ¶
Calculate the state (position and velocity) of the Uranus system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter state using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Uranus system barycenter state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Uranus system barycenter in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
neptune_barycenter_position_spice builtin ¶
Calculate the position of the Neptune system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required. This is the position used by third-body force models. For the true Neptune body center use neptune_position_spice.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Neptune system barycenter position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Neptune system barycenter in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
neptune_barycenter_velocity_spice builtin ¶
Calculate the velocity of the Neptune system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter velocity using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Neptune system barycenter velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Neptune system barycenter in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
neptune_barycenter_state_spice builtin ¶
Calculate the state (position and velocity) of the Neptune system barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Returns the planetary-system barycenter state using only the DE kernel (DE440s or DE440); no satellite ephemeris kernel is required.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Neptune system barycenter state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Neptune system barycenter in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
solar_system_barycenter_position_spice builtin ¶
Calculate the position of the Solar System Barycenter in the GCRF inertial frame using NAIF DE ephemeris.
This function uses the high-precision NAIF DE ephemeris kernel (DE440s or DE440) for Solar System Barycenter position computation. The kernel is loaded once and cached in a global thread-safe context, making subsequent calls very efficient.
If the ephemeris has not been initialized, it will be automatically loaded on the first call. For more control over initialization and error handling, use load_common_spice_kernels() explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Solar System Barycenter position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Solar System Barycenter in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
solar_system_barycenter_velocity_spice builtin ¶
Calculate the velocity of the Solar System Barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Solar System Barycenter velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Solar System Barycenter in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
solar_system_barycenter_state_spice builtin ¶
Calculate the state (position and velocity) of the Solar System Barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Solar System Barycenter state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Solar System Barycenter in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
ssb_position_spice builtin ¶
Convenience alias for solar_system_barycenter_position_spice.
Calculate the position of the Solar System Barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Solar System Barycenter position | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Position of the Solar System Barycenter in the GCRF frame. Units: (m) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
ssb_velocity_spice builtin ¶
Convenience alias for solar_system_barycenter_velocity_spice.
Calculate the velocity of the Solar System Barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Solar System Barycenter velocity | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: Velocity of the Solar System Barycenter in the GCRF frame. Units: (m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
ssb_state_spice builtin ¶
Convenience alias for solar_system_barycenter_state_spice.
Calculate the state (position and velocity) of the Solar System Barycenter in the GCRF inertial frame using NAIF DE ephemeris.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
epc | Epoch | Epoch at which to calculate the Solar System Barycenter state | required |
source | EphemerisSource | Ephemeris source to use (DE440s or DE440) | required |
Returns:
| Type | Description |
|---|---|
ndarray | np.ndarray: State [x, y, z, vx, vy, vz] of the Solar System Barycenter in the GCRF frame. Units: (m, m/s) |
Raises:
| Type | Description |
|---|---|
Exception | If the DE kernel cannot be loaded or ephemeris query fails |
See Also¶
- Third-Body Perturbations - Third-body acceleration calculations
- SPICE Kernels - Kernel registry, generic NAIF-ID queries, and PCK orientation
- Datasets: NAIF - DE440s ephemeris data
- Orbital Dynamics Module - Complete orbit dynamics API reference