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,          # radians (Greenwich)
    latitude=0.9,           # radians (~51.5° N)
    altitude=0.0,           # km
)

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

# Define elevation mask
mask = lox.ElevationMask.fixed(0.1)  # ~5.7° minimum elevation

# Or variable mask based on azimuth
import numpy as np
azimuth = np.linspace(0, 2*np.pi, 36)
elevation = np.full(36, 0.1)  # same minimum everywhere
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 in radians.

  • latitude

    Geodetic latitude in radians.

  • altitude

    Altitude above the reference ellipsoid in km.

Examples:

>>> import math
>>> darmstadt = lox.GroundLocation(
...     lox.Origin("Earth"),
...     longitude=math.radians(8.6512),
...     latitude=math.radians(49.8728),
...     altitude=0.108,
... )

Methods:

  • altitude

    Return the altitude above the reference ellipsoid in km.

  • latitude

    Return the geodetic latitude in radians.

  • longitude

    Return the geodetic longitude in radians.

  • observables

    Compute observables to a target state.

  • rotation_to_topocentric

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

altitude

altitude() -> float

Return the altitude above the reference ellipsoid in km.

latitude

latitude() -> float

Return the geodetic latitude in radians.

longitude

longitude() -> float

Return the geodetic longitude in radians.

observables

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

Compute observables to a target state.

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 in radians.

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: float) -> Self

Create a fixed elevation mask with constant minimum elevation.

fixed_elevation

fixed_elevation() -> float | None

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

min_elevation

min_elevation(azimuth: float) -> float

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 in radians (measured from north, clockwise).

  • elevation

    Elevation angle in radians (above local horizon).

  • range

    Distance to target in km.

  • range_rate

    Rate of change of range in km/s.

Methods:

  • azimuth

    Return the azimuth angle in radians.

  • elevation

    Return the elevation angle in radians.

  • range

    Return the range (distance) in km.

  • range_rate

    Return the range rate in km/s.

azimuth

azimuth() -> float

Return the azimuth angle in radians.

elevation

elevation() -> float

Return the elevation angle in radians.

range

range() -> float

Return the range (distance) in km.

range_rate

range_rate() -> float

Return the range rate in km/s.


Pass

Represents a visibility pass between a ground station and spacecraft.

A Pass contains the visibility window (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.

  • observables

    Return the observables at each time sample.

  • times

    Return the time samples during this pass.

  • window

    Return the visibility window for this pass.

interpolate

interpolate(time: Time) -> Observables | None

Interpolate observables at a specific time within the pass.

observables

observables() -> list[Observables]

Return the observables at each time sample.

times

times() -> list[Time]

Return the time samples during this pass.

window

window() -> Window

Return the visibility window for this pass.