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:
-
–originThe central body (e.g., Earth, Moon).
-
–longitudeGeodetic longitude in radians.
-
–latitudeGeodetic latitude in radians.
-
–altitudeAltitude 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.
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:
-
–azimuthArray of azimuth angles in radians (for variable mask).
-
–elevationArray of minimum elevations in radians (for variable mask).
-
–min_elevationFixed 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.
fixed
classmethod
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
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:
-
–azimuthAzimuth angle in radians (measured from north, clockwise).
-
–elevationElevation angle in radians (above local horizon).
-
–rangeDistance to target in km.
-
–range_rateRate 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.
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.