pylupnt

Classes

Agent

Polymorphic base for a physical platform (spacecraft, rover, lander) that hosts Applications.

AlmanacFitOptions

Configuration for LansAlmanac.fit/eval.

AnalyticalOrbitDynamics

Base class for analytical (closed-form) orbit propagation.

Antenna

Antenna gain pattern loaded from a named pattern file.

AntexLoader

Loader for ANTEX antenna files: provides satellite antenna phase-center offsets (PCO) and the SP3 PCO-correction workflow

Application

Polymorphic base for a scenario application (estimator/logic) hosted on an Agent.

Body

A celestial body: gravity parameter, radius, rotation rate, frames, optional gravity field.

BodyId

NAIF-style identifier for a solar-system body or barycenter.

BracketedListDumper(stream[, default_style, ...])

BroadcastMessage

One generated broadcast navigation message (ephemeris or almanac) valid over a single fitting window.

CartesianTwoBodyDynamics

Numerical Cartesian two-body (point-mass) orbit dynamics.

CesiumScene([body, name, epoch, multiplier, ...])

Builds a CZML document and renders it as an interactive CesiumJS scene.

Colors()

Commands()

Config

YAML-backed config node with dict- and attribute-style access.

ConstellationSourceConfig

Truth GNSS constellation source: precise SP3+BRDC or numerically propagated almanac, with satellite selection and broadcast-error options

CoordinateScale

Relativistic coordinate time scale of a quantity.

DateTime

Calendar date/time as year, day-of-year, hour, minute, second.

DesignConfig

Receiver/antenna design and C/N0-threshold config for the link budget

Dynamics

Base interface for state-propagation models (orbit, attitude, clock, ...).

EphemerisApp

Coordinator application for the ephemeris/almanac datasize-accuracy study (Example 9), hosted on an EphemerisManager agent.

EphemerisFitErrorStats

Position/velocity fit-error statistics in Radial/Transverse/Normal (RTN) components plus the combined 3-D norm.

EphemerisFitOptions

Configuration for LansEphemeris.fit/eval.

EphemerisGenApp

LunaNet sub-app that generates broadcast ephemeris and almanac messages from the satellite's own predicted trajectory.

EphemerisGenConfig

Configuration for EphemerisGenApp.

EphemerisOrbitConfig

Initial classical orbital elements for the study's truth trajectory.

EphemerisResults

Full result payload of an ephemeris datasize/accuracy sweep (SI units, output_frame).

EphemerisSimulationConfig

Configuration for the ephemeris/almanac datasize-accuracy study.

EphemerisWindowResult

Fit-accuracy / broadcast-datasize summary for one fit_window_minutes entry.

Frame

Reference frames (Earth, Moon, and solar-system planet frames).

GNSSMeasurements

Receiver-side GNSS measurement generator: builds visible channels and computes pseudorange/Doppler/carrier-phase observables from one or more constellations

GNSSMeasurementsEpoch

GNSS measurements at a single receive epoch: the visible channels plus their stacked observable values/Jacobian

GnssAttitude

GNSS satellite nominal (Sun-pointing yaw-steering) attitude: computes and caches the orthonormal body triad (ex, ey, ez) from orbit and Sun geometry

GnssChannel

A single transmitter-receiver GNSS signal channel: transmitter identity/state plus per-channel delays, CN0, and observable noise sigmas

GnssConst

GNSS constellation / system identifier

GnssConstellation

Constellation of GNSS satellites with precomputed ephemerides; provides satellite state interpolation and transmitter antenna/power metadata

GnssFreq

GNSS carrier frequency band identifier

GnssMeasurementOptions

Configuration for GNSS measurement construction: frames, time scales, and light-time/relativity/visibility/CN0 modeling toggles used by BuildChannels()/Compute()

GnssOccludingBody

Spherical body (e.g. Earth or Moon) that can occlude the transmitter-receiver line of sight during visibility checks.

GnssReceiverParams

Receiver tracking-loop and link-budget parameters used to derive per-channel measurement-noise sigmas and CN0

GnssYawSteering

Stateless GNSS yaw-attitude steering laws (Cheng et al., 2025, https://doi.org/10.1016/j.asr.2024.10.064); non-instantiable, all methods are static

GravityField

Spherical-harmonic gravity field coefficients and metadata.

GroundOdtsApp

Centralized ground-segment ODTS filter hosted on a SurfaceStationManager; a single EKF estimating every satellite's 8-state orbit+clock from station beacon pseudoranges (no inter-satellite links)

GroundStationManagerApp

Centralized ground-segment orbit-determination app: aggregates all stations' range/range-rate observations and runs a weighted-least-squares batch filter plus an SRIF forward filter and smoother over the arc

GroundStationTrackingApp

Ground-station tracking (sensor) app: generates one station's noisy two-way range/range-rate observations of a target satellite above the elevation mask and reports them to the GroundStationManagerApp

IRI2007Option

Configuration flags for the IRI-2007 model.

IRI2020Option

Configuration flags for the IRI-2020 model.

IntegratorParams

Integrator tolerances, iteration limit, and optional early-termination predicate.

IntegratorType

Selects which numerical integrator NumericalOrbitDynamics uses.

J2KeplerianDynamics

Numerical Keplerian dynamics with secular J2 perturbation.

JToCartTwoBodyDynamics

Numerical Cartesian two-body dynamics with J2 oblateness perturbation.

KeplerianDynamics

Analytical Keplerian propagation of classical orbital elements.

LanderGncApp

Co-hosted lander guidance/control application that owns the descent truth trajectory (built-in smoothstep descent or a supplied ENU reference path).

LanderNavApp

Strapdown-INS multiplicative EKF (MEKF) for a lunar lander on powered descent, fusing a full IMU, radar altimeter, crater-landmark bearings, and LunaNet (LANS) pseudoranges, with the IMU biases estimated online.

LansAlmanac

Coarse almanac-style orbit model (low-order polynomial + Fourier per osculating element); GNSS-almanac style, long validity / small size.

LansEphemeris

Piecewise ephemeris model: an osculating two-body Kepler orbit plus a Chebyshev correction on the Cartesian position residual (GNSS broadcast-ephemeris style).

Logger()

LolaSite

Metadata for one NASA PGDA product-78 LOLA south-pole site.

LunarDem

Loaded (cropped, downsampled) lunar digital elevation model.

LunarGnssODTSConfig

Top-level lunar GNSS ODTS scenario config: Monte-Carlo/timing, receiver orbit+clock, dynamics fidelity, measurements, filter tuning, and nested design/plasma/constellation configs

LunarGnssODTSSummary

Per-seed ODTS run summary (final and RMS estimation errors)

LunarGnssOdtsApp

Coordinator app for the lunar GNSS ODTS scenario, hosted on a Spacecraft receiver; its scheduled Step runs the whole Monte-Carlo EKF body and writes the CSV outputs

Measurement

Polymorphic base for a measurement model.

NBodyDynamics

Numerical point-mass, gravity-field, SRP, drag, and relativity orbit dynamics.

NumericalOrbitDynamics

Numerically integrated orbit dynamics driven by an ODE right-hand side and an integrator.

PathProfile

Result of tracing a ray: per-step samples plus summary quantities.

PhysicalConstants

Physical constants expressed in a chosen unit system.

PlasmaDelayConfig

Ionosphere/plasmasphere delay config: truth/filter application flags plus the ray-trace parameters used to build the delay table

Plot3D([azim, elev, figsize])

ProgressBar

Terminal progress bar.

RayTraceConfig

Configuration for ionospheric ray tracing.

ReceiverAppConfig

Receiver application scheduling config

RinexNavLoader

Loader for RINEX navigation (broadcast-ephemeris) files: Keplerian propagation of GNSS satellite ECEF state and clock correction

Satellite

Keplerian satellite propagated with Earth two-body dynamics (km units).

SatelliteOdtsApp

Onboard distributed ISL ODTS filter hosted on a Spacecraft; generates its own crosslink and surface-station measurements, runs a Schmidt-EKF, and periodically exchanges posteriors with neighbors

Simulation

Agent-based simulation: holds the agents, the shared World, and the timed event queue; run() drives the event loop to completion.

Sp3Loader

Loader for SP3 precise-ephemeris files: parses and interpolates GNSS satellite ECEF position/velocity and clock bias

SurfaceRoverNavApp

Strapdown-INS error-state EKF for a lunar surface rover, fusing a full IMU, LCRNS (LANS) pseudoranges, and a DEM altitude constraint, with the IMU biases estimated online.

TLE

Two-line element set describing a satellite's mean orbital elements.

TerminationInfo

Outcome of a PropagateEx call: whether/why it stopped, stop time, and step count.

TerminationReason

Why a PropagateEx call stopped.

Time

Time system / scale identifier.

UnitSystem

Length/time/mass scale factors defining a working unit system.

World

Shared, read-only physical environment for a Simulation: epoch, reference frame, force model, optional terrain/DEM, and a truth facade (get_state_at).

ostream_redirect_plasma

Functions

add_config_search_dir(dir)

Add a directory to the config file search path.

are_coordinate_scales_convertible(from, to)

True if the two coordinate scales are related by a constant factor.

az_el_range_to_cart(*args, **kwargs)

Overloaded function.

az_el_range_to_east_north_up(*args, **kwargs)

Overloaded function.

cart2coe(posvel, GM)

Convert a Cartesian state to classical orbital elements given GM [km^3/s^2].

cart_to_az_el_range(*args, **kwargs)

Overloaded function.

cart_to_classical(*args, **kwargs)

Overloaded function.

cart_to_east_north_up(*args, **kwargs)

Overloaded function.

cart_to_lat_lon_alt(*args, **kwargs)

Overloaded function.

cart_to_stereographic(*args, **kwargs)

Overloaded function.

classical_to_cart(*args, **kwargs)

Overloaded function.

classical_to_delaunay(*args, **kwargs)

Overloaded function.

classical_to_equinoctial(*args, **kwargs)

Overloaded function.

classical_to_quasi_nonsingular(*args, **kwargs)

Overloaded function.

coe2cart(coe, GM)

Convert classical orbital elements to a Cartesian state given GM [km^3/s^2].

compute_B(t_j2000, pos_geo, config[, debug])

Magnetic field vector [nT] at a given ECEF position.

compute_eop_from_spice(t_tdb)

Derive (x_pole [rad], y_pole [rad], UT1-UTC [s]) at t_tdb from SPICE

compute_min_altitude(pos1, pos2, radius)

Minimum altitude [km] of the line segment pos1-pos2 above a sphere of given radius [km].

compute_ne(t_j2000, pos_geo, config[, debug])

Electron density [cm^-3] at a given position and time.

compute_vis(pos1, pos2, radius, max_angle)

True if pos1 and pos2 [km] have line-of-sight past a blocking sphere of given radius [km] and within max_angle [rad].

config_to_string(config)

Serialize a config to a YAML string.

convert_coordinate_time(*args, **kwargs)

Overloaded function.

convert_frame(*args, **kwargs)

Overloaded function.

convert_time(*args, **kwargs)

Overloaded function.

coordinate_scale_factor(scale)

Rate factor of a coordinate scale relative to its proper coordinate time.

coordinate_scale_ratio(from, to)

Ratio to convert a quantity from one coordinate scale to another; throws if incompatible.

create_body(*args, **kwargs)

Overloaded function.

datetime_to_itime(datetime)

Convert a DateTime to an itime array [year+doy, milliseconds-of-day].

datetime_to_mjd(datetime)

Convert a DateTime to a Modified Julian Date.

decibel_to_decimal(*args, **kwargs)

Overloaded function.

decimal_to_decibel(*args, **kwargs)

Overloaded function.

deg_min_sec_to_degrees(hms)

Convert (degrees, arcminutes, arcseconds) to decimal degrees.

degrees_to_deg_min_sec(deg)

Convert decimal degrees to (degrees, arcminutes, arcseconds).

delaunay_to_classical(*args, **kwargs)

Overloaded function.

download_lola_dem(site_id)

Download (and cache under LUPNT_DATA_PATH) a site's DEM GeoTIFF; return its path.

east_north_up_to_az_el_range(*args, **kwargs)

Overloaded function.

east_north_up_to_cart(*args, **kwargs)

Overloaded function.

ecc2true(E, e)

Eccentric anomaly [rad] to true anomaly [rad] for eccentricity e.

eccentric_to_mean_anomaly(*args, **kwargs)

Overloaded function.

eccentric_to_true_anomaly(*args, **kwargs)

Overloaded function.

equinoctial_to_classical(*args, **kwargs)

Overloaded function.

finalize_lunar_gnss_odts_link_cache(config)

Write the config fingerprint metadata for an externally assembled links CSV

find_file_in_dir(*args, **kwargs)

Overloaded function.

gcpm_v24(datetime, r_RE, amlt, alatr[, akp])

C++ GCPM v2.4: returns [ne_cm3, H+, He+, O+].

gcpm_v24_fortran(datetime, r_RE, amlt, alatr)

Fortran GCPM v2.4: returns [ne_cm3, H+, He+, O+].

get_ascii_kernel_dir()

Path to the ASCII (text) SPICE kernel directory.

get_body_pos(*args, **kwargs)

Overloaded function.

get_body_pos_vel(*args, **kwargs)

Overloaded function.

get_cspice_kernel_dir()

Path to the CSPICE binary kernel directory.

get_data_path()

Path to the LuPNT data directory (LUPNT_DATA_PATH).

get_eop_data(mjd_utc)

Interpolate Earth orientation parameters at mjd_utc [MJD, UTC] from the loaded IERS EOP table, as a dict (x_pole/y_pole [rad], ut1_utc [s], lod [s], dpsi/deps [rad], dx_pole/dy_pole [rad], tai_utc [s]).

get_eop_file_data()

Return the full raw loaded IERS EOP table (time series + formal errors) as a dict of arrays, loading the bundled file first if none is loaded yet.

get_file_path(arg0)

Resolve a filename to a full path within the LuPNT data search dirs.

get_frame_center(frame)

NAIF body id of the frame's central body (e.g. GCRF/ITRF -> Earth, MOON_CI -> Moon, ICRF -> solar-system barycenter).

get_frame_rotation_translation(t_tdb, ...)

Affine position transform (R, t) with r_out = R*r_in + t, from frame_in to frame_out at t_tdb (R dimensionless, t [m]).

get_frame_rotation_translation_rv(t_tdb, ...)

Affine state transform (R6, t6) with x_out = R6*x_in + t6, from frame_in to frame_out at t_tdb (t6 [m, m/s]).

get_iono_params(t_j2000[, kp])

Returns [f107, rz12, hmf2_km] ionospheric parameters.

get_iri_model()

Name of the currently selected IRI model.

get_kp_index(datetime)

Kp geomagnetic activity index at a given DateTime.

get_lola_sites()

List the PGDA product-78 LOLA 5 m/pixel south-pole DEM sites.

get_lunar_orientation_angles(t_tdb)

Get lunar mantle rotation angles

get_lupnt_epoch()

Global LuPNT reference epoch [s past J2000, TDB] that propagation time is added to.

get_orbital_period(*args, **kwargs)

Overloaded function.

get_physical_constants(*args, **kwargs)

Overloaded function.

get_plasma_base_path()

Get the base path used to locate plasma runtime data (iri/, kp/).

get_proper_time_correction_tcl(*args, **kwargs)

Overloaded function.

gregorian_to_mjd(*args, **kwargs)

Overloaded function.

gregorian_to_time(*args, **kwargs)

Overloaded function.

init_default_config_search_dirs()

Initialize the config search path with LuPNT's default directories.

is_coordinate_time_scale(time)

True if time is a coordinate time scale (TCB, TCG, TCL).

itime_to_datetime(itime)

Convert an itime array [year+doy, milliseconds-of-day] to a DateTime.

lat_lon_alt_to_cart(*args, **kwargs)

Overloaded function.

lat_lon_alt_to_stereographic(*args, **kwargs)

Overloaded function.

load_config(*args, **kwargs)

Overloaded function.

load_eop_file_data(filepath[, force])

Parse an IERS EOP 14 C04 (IAU1980) file at filepath into the global EOP table.

load_latest_eop_from_iers([force])

Download the latest IERS EOP 14 C04 (IAU1980) series and load it; returns False (falling back to bundled data) on download failure.

load_lola_dem(lat_deg, lon_deg[, ...])

Load the appropriate NASA PGDA DEM for a query latitude/longitude [deg].

load_tiff(path, xlims, ], ylims, ], max_res)

Load, crop to (xlims, ylims) [m], and downsample a GeoTIFF DEM to a grid spacing no coarser than max_res [m]; returns (x, y, elevation) grids [m].

lola_dem_url(site_id)

NASA PGDA download URL for a site's 5 m/pixel surface DEM GeoTIFF.

long_to_lt(longitude)

Convert longitude [rad] to local time [hours].

lt_to_long(amlt)

Convert magnetic local time [hours] to longitude [rad].

lunar_gnss_odts_link_cache_valid(config)

True when config.links_file exists and its metadata matches the config fingerprint

lunar_gnss_odts_precompute_epoch_count(config)

Return the number of receiver epochs used by GNSS link precompute

mean2ecc(M, e)

Mean anomaly [rad] to eccentric anomaly [rad] for eccentricity e.

mean2true(M, e)

Mean anomaly [rad] to true anomaly [rad] for eccentricity e.

mean_to_eccentric_anomaly(*args, **kwargs)

Overloaded function.

mean_to_true_anomaly(*args, **kwargs)

Overloaded function.

mjd_to_datetime(mjd)

Convert a Modified Julian Date to a DateTime.

mjd_to_gregorian(mjd)

Modified Julian Date to Gregorian (year, month, day, hour, min, sec).

mjd_to_gregorian_string(mjd[, precision])

Format a Modified Julian Date as a Gregorian date string (precision fractional-second digits).

mjd_to_time(mjd)

mjd_to_tj2000(mjd)

Convert a Modified Julian Date to seconds past J2000.

normalize_quat(*args, **kwargs)

Overloaded function.

precompute_lunar_gnss_odts_links_range(...)

Build GNSS link/CN0 geometry for the half-open epoch range [epoch_begin, epoch_end), writing config.links_file

propagate_coe(coe, GM, dt)

Propagate classical orbital elements by dt [s] under two-body motion.

quasi_nonsingular_to_classical(*args, **kwargs)

Overloaded function.

quat_to_rot(qw)

refractive_index_neB(ne_m3, freq_Hz[, B, ...])

Refractive index of the ionosphere for given ne and frequency.

register_agent(name, cls)

Register a Python Agent subclass under name so a config class: name builds it.

register_application(name, cls)

Register a Python Application subclass under name so a config class: name builds it.

roll_pitch_yaw_to_rot(rpy)

rot_to_quat(rot)

rot_to_roll_pitch_yaw(rot)

rot_x(angle)

3x3 passive (frame) rotation matrix about the x-axis by angle [rad].

rot_y(angle)

3x3 passive (frame) rotation matrix about the y-axis by angle [rad].

rot_z(angle)

3x3 passive (frame) rotation matrix about the z-axis by angle [rad].

rotation_angle(R)

Rotation angle [rad] of a 3x3 rotation matrix.

save_config(config, path)

Write a config to a YAML file.

scalar_first_to_last(*args, **kwargs)

Overloaded function.

scalar_last_to_first(*args, **kwargs)

Overloaded function.

scale_gm_for_coordinate_scale(value, from, to)

Rescale a gravitational parameter from one coordinate scale to another.

scale_length_for_coordinate_scale(value, ...)

Rescale a length from one coordinate scale to another; throws if incompatible.

select_lola_site(lat_deg, lon_deg)

Nearest PGDA product-78 site to a query latitude/longitude [deg].

set_iri2007_option(option)

Set the global IRI-2007 configuration.

set_iri2020_option(option)

Set the global IRI-2020 configuration.

set_iri_model([model_name])

Select the IRI ionosphere model ("IRI2007" or "IRI2020").

set_lupnt_epoch(arg0)

Set the global LuPNT reference epoch [s past J2000, TDB].

set_plasma_base_path(path)

Override the base path used to locate plasma runtime data.

setup_gnss_constellation(filename)

Build a list of Satellites for a GNSS constellation from a definition file.

skew(x)

3x3 skew-symmetric cross-product matrix [x]_x of a 3-vector.

solve_lt(sat, rx_pos, epoch_utc_rx)

Solve light time to find the transmitter position [km] seen by a receiver at rx_pos.

stereographic_to_cart(*args, **kwargs)

Overloaded function.

stereographic_to_lat_lon_alt(*args, **kwargs)

Overloaded function.

tcb_to_tcl(*args, **kwargs)

Overloaded function.

tcl_to_tcb(*args, **kwargs)

Overloaded function.

time_to_gregorian_string(t[, precision])

Format a time [s] as a Gregorian date string (precision fractional-second digits).

time_to_mjd(t)

tj2000_to_mjd(t_j2000)

Convert seconds past J2000 to a Modified Julian Date.

tle_to_classical(arg0, arg1)

GM

trace_ray(epoch, pos_tx, pos_rx, config[, ...])

Trace a ray from pos_tx to pos_rx and return a PathProfile.

true2mean(nu, e)

True anomaly [rad] to mean anomaly [rad] for eccentricity e.

true_to_eccentric_anomaly(*args, **kwargs)

Overloaded function.

true_to_mean_anomaly(*args, **kwargs)

Overloaded function.

wrap2pi(angle)

Wrap an angle [rad] to [0, 2*pi).

wrap_to_pi(*args, **kwargs)

Overloaded function.

wrap_to_two_pi(*args, **kwargs)

Overloaded function.