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:
-
–originThe central body (e.g., Earth, Moon).
-
–longitudeGeodetic longitude as Angle.
-
–latitudeGeodetic latitude as Angle.
-
–altitudeAltitude 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.
observables
observables(
state: Cartesian,
provider: EOPProvider | None = None,
frame: str | 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 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.
fixed
classmethod
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
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 as Angle.
-
–elevationElevation angle as Angle.
-
–rangeDistance to target as Distance.
-
–range_rateRate 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.
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.