Skip to content

Ground Stations

Ground-based tracking and observation support.

Quick Example

import lox_space as lox

# Define a ground station
gs = lox.GroundLocation(
    origin=lox.Origin("Earth"),
    longitude=0.0 * lox.rad,    # Greenwich
    latitude=51.5 * lox.deg,    # ~51.5° N
    altitude=0.0 * lox.km,
)

# Calculate observables for a spacecraft state
obs = gs.observables(state)
print(f"Azimuth: {obs.azimuth().to_degrees():.2f} deg")
print(f"Elevation: {obs.elevation().to_degrees():.2f} deg")
print(f"Range: {obs.range().to_kilometers():.1f} km")

# Define elevation mask
mask = lox.ElevationMask.fixed(5 * lox.deg)

# Or variable mask based on azimuth
import numpy as np
azimuth = np.linspace(0, 2*np.pi, 36)
elevation = np.full(36, 0.1)  # radians
mask = lox.ElevationMask.variable(azimuth, elevation)

GroundLocation

Represents a location on the surface of a celestial body.

Parameters:

  • origin

    The central body (e.g., Earth, Moon).

  • longitude

    Geodetic longitude as Angle.

  • latitude

    Geodetic latitude as Angle.

  • altitude

    Altitude above the reference ellipsoid as Distance.

Examples:

>>> darmstadt = lox.GroundLocation(
...     lox.Origin("Earth"),
...     longitude=8.6512 * lox.deg,
...     latitude=49.8728 * lox.deg,
...     altitude=0.108 * lox.km,
... )

Methods:

  • altitude

    Return the altitude above the reference ellipsoid.

  • latitude

    Return the geodetic latitude.

  • longitude

    Return the geodetic longitude.

  • observables

    Compute observables to a target state.

  • origin

    Return the central body (origin).

  • rotation_to_topocentric

    Return the rotation matrix from body-fixed to topocentric frame.

altitude

altitude() -> Distance

Return the altitude above the reference ellipsoid.

latitude

latitude() -> Angle

Return the geodetic latitude.

longitude

longitude() -> Angle

Return the geodetic longitude.

observables

observables(
    state: Cartesian,
    provider: EOPProvider | None = None,
    frame: str | Frame | None = None,
) -> Observables

Compute observables to a target state.

origin

origin() -> Origin

Return the central body (origin).

rotation_to_topocentric

rotation_to_topocentric() -> ndarray

Return the rotation matrix from body-fixed to topocentric frame.


ElevationMask

Defines elevation constraints for visibility analysis.

An elevation mask specifies the minimum elevation angle required for visibility at different azimuth angles. Can be either fixed (constant) or variable (azimuth-dependent).

Parameters:

  • azimuth

    Array of azimuth angles in radians (for variable mask).

  • elevation

    Array of minimum elevations in radians (for variable mask).

  • min_elevation

    Fixed minimum elevation as Angle.

Examples:

>>> # Fixed elevation mask (5 degrees)
>>> mask = lox.ElevationMask.fixed(5.0 * lox.deg)
>>> # Variable mask based on terrain
>>> mask = lox.ElevationMask.variable(azimuth, elevation)

Methods:

  • azimuth

    Return the azimuth array (for variable masks only).

  • elevation

    Return the elevation array (for variable masks only).

  • fixed

    Create a fixed elevation mask with constant minimum elevation.

  • fixed_elevation

    Return the fixed elevation value (for fixed masks only).

  • min_elevation

    Return the minimum elevation at the given azimuth.

  • variable

    Create a variable elevation mask from azimuth-dependent data.

azimuth

azimuth() -> list[float] | None

Return the azimuth array (for variable masks only).

elevation

elevation() -> list[float] | None

Return the elevation array (for variable masks only).

fixed classmethod

fixed(min_elevation: Angle) -> Self

Create a fixed elevation mask with constant minimum elevation.

fixed_elevation

fixed_elevation() -> Angle | None

Return the fixed elevation value (for fixed masks only).

min_elevation

min_elevation(azimuth: Angle) -> Angle

Return the minimum elevation at the given azimuth.

variable classmethod

variable(azimuth: ndarray, elevation: ndarray) -> Self

Create a variable elevation mask from azimuth-dependent data.


Observables

Observation data from a ground station to a target.

Parameters:

  • azimuth

    Azimuth angle as Angle.

  • elevation

    Elevation angle as Angle.

  • range

    Distance to target as Distance.

  • range_rate

    Rate of change of range as Velocity.

Methods:

  • azimuth

    Return the azimuth angle.

  • elevation

    Return the elevation angle.

  • range

    Return the range (distance).

  • range_rate

    Return the range rate.

azimuth

azimuth() -> Angle

Return the azimuth angle.

elevation

elevation() -> Angle

Return the elevation angle.

range

range() -> Distance

Return the range (distance).

range_rate

range_rate() -> Velocity

Return the range rate.


Pass

Represents a visibility pass between a ground station and spacecraft.

A Pass contains the visibility interval (start and end times) along with observables computed at regular intervals throughout the pass.

Methods:

  • interpolate

    Interpolate observables at a specific time within the pass.

  • interval

    Return the visibility interval for this pass.

  • observables

    Return the observables at each time sample.

  • times

    Return the time samples during this pass.

interpolate

interpolate(time: Time) -> Observables | None

Interpolate observables at a specific time within the pass.

interval

interval() -> Interval

Return the visibility interval for this pass.

observables

observables() -> list[Observables]

Return the observables at each time sample.

times

times() -> list[Time]

Return the time samples during this pass.