Expand description
§kshana — a validated, reproducible PNT simulation substrate
kshana is an open-source engine for positioning, navigation and timing
(PNT) analysis: GNSS geometry and integrity, clock holdover and time transfer,
inertial and alt-PNT navigation, orbit and mission analysis, lunar/cislunar
PNT, and RF resilience. It has no scientific runtime dependencies, and every
run is deterministic from its inputs.
§Entry points
api::run_tomlis the single dispatch entry: it parses a scenario TOML, detects its kind, runs it, and returns a structured result. Every language binding — the Python package, the MCP server, and the WASM playground — is a thin wrapper over it, so all surfaces run the identical engine.api::list_scenario_kindsis the machine-readable catalogue of the built-in scenario kinds, each with its description and required/optional fields — the same catalogue thedocs/SCENARIOS.mdreference is generated from.
§Honesty model
Every capability carries an explicit maturity tier, generated from source in
verification::verification_matrix (the single source of truth) and
CI-pinned so the labels cannot drift from the code:
Validated— checked against an independent external oracle (a published dataset, reference vectors, or a closed-form value). A self-consistency check can never be labelled Validated.Modelled— implemented from published or first-principles physics with tests, but not checked against an external oracle to a stated tolerance.PartnerOwned— a capability kshana deliberately does not provide, recorded as a gap rather than faked.
The per-figure-of-merit tier shown next to a result is derived from this same
matrix via fom_label. kshana makes no technology-readiness or heritage
claim and is not affiliated with, nor endorsed by, any space agency.
§Reproducibility
Runs are deterministic: a scenario, a seed, and a pinned engine version rebuild
the same figures byte-for-byte. The governing equations behind the physics are
collected, with their literature sources, in the docs/EQUATIONS.md
reference.
Modules§
- acquisition
- GNSS signal acquisition: square-law (non-coherent) detector statistics and the generalized Marcum Q-function.
- allan
- Allan-family frequency-stability estimators — overlapping ADEV, MDEV, TDEV and HDEV, and the IEEE-1139 power-law noise fit.
- altpnt
- Alternative-PNT (GPS-denied) navigation packs.
- antenna
- Orbital transmitter antenna pattern and surface capture footprint.
- api
- Scenario dispatch shared by the CLI and the language bindings.
- assurance
- Assurance primitives: provenance, uncertainty, and external-oracle attestation.
- attack_
surface - Lunar surface-navigation attack-surface scenario (P1): the binary-reachable
(
run_toml/ CLI / Python / MCP) face that composes the open signal-security analyses into one run.kind = "lunar-attack-surface". - attitude_
budget - 3-DOF attitude & pointing error budget: a scalar, pre-hardware AOCS/GNC complement to high-fidelity tools (Basilisk, 42) — the environmental gravity-gradient disturbance torque and a root-sum-square pointing-error budget over the contributing error sources, producing a single pointing figure of merit a systems engineer brackets before committing to a control design.
- attitude_
dynamics - Torque-free rigid-body attitude dynamics: Euler’s rotational equations of motion coupled to quaternion attitude kinematics, integrated with a fixed-step RK4 propagator.
- batch_
ls - Gauss–Newton weighted batch least squares — the batch differential corrector.
- body
- Central-body parameters — the gravitational and orientation constants that turn the Earth-hard-coded dynamics core into a body-agnostic one.
- bplane
- Hyperbolic-flyby B-plane targeting and patched-conic gravity assist.
- ccsds_
tdm - CCSDS Tracking Data Message (TDM) parser and writer — the standard interchange format for raw radiometric tracking measurements.
- chart
- Shared SVG charting helpers used by the per-pack chart renderers.
- cio
- IAU 2006/2000A CIO-based celestial-to-terrestrial reduction (GCRS↔CIRS↔ITRS).
- cislunar_
observability cislunar-observabilityscenario — planar cislunar constellation observability (P6).- cislunar_
srif - Independent SRIF cross-validation of the cislunar observability transition (paper P6, L32).
- clock_
specs - Named lunar-timing clock specifications as IEEE-1139 power-law coefficient sets.
- clock_
state - Three-state onboard clock error model: phase, fractional-frequency, frequency drift.
- conflict_
resilience conflict-resiliencescenario — layered-PNT resilience in a contested / conflict environment (paper P7).- conflict_
threat_ params - Sourced threat-parameter provenance catalog for the conflict-resilience pack (L36).
- cr3bp
- Circular restricted three-body problem (CR3BP) for the Earth–Moon system.
- cross_
raim - Cross-modality RAIM / protection level — receiver-autonomous integrity for a
heterogeneous pair of PNT solutions. Where
crate::raimmonitors many homogeneous RF pseudoranges of one constellation, this module treats an RF PVT/time solution and an optical PVT/time solution as two independent measurements of the same underlying geometry, with disparate covariances (RF loose — metres, nanoseconds; optical tight — centimetres, picoseconds), and monitors their consistency. - cross_
sensor_ integrity - Layer-2 cross-sensor integrity sizing: minimum detectable spoof walk.
- crossover
- Quantum-versus-classical resilience crossover study.
- crpa
- Controlled-reception-pattern antenna (CRPA) anti-jam beamforming: deterministic
null-steering and minimum-variance distortionless-response (MVDR) weights for an
N-element GNSS array. - cw_
dynamics - Clohessy–Wiltshire / Hill relative-motion dynamics: the linearised motion of a chaser relative to a target on a circular reference orbit, expressed in the target’s local-vertical/local-horizontal (LVLH) frame.
- deepspace_
od - Numerically-robust sequential orbit determination — a hand-rolled Square-Root Information
Filter (SRIF; Bierman 1977) with reduced-dynamic empirical accelerations, the factored
complement to the batch differential corrector of
crate::precise_od. - detection
- Detection-theory primitives for the spoof monitor.
- dro
- Planar distant-retrograde-orbit (DRO) seeder for the Earth–Moon CR3BP (paper P6, L29).
- egm2008_
data - EGM2008 geopotential spherical-harmonic coefficients to degree/order 70 —
AUTO-GENERATED from
tools/egm2008_to70.gfcbytools/gen_egm2008.py; do not edit by hand. Fully normalized, tide-free. The EGM2008 model is an NGA public-domain product (via ICGEM).EGM2008_COEFFSare(n, m, Cnm, Snm). - ensemble
- Monte Carlo ensembles for the clock-holdover scenario.
- eo_
payload - Earth-observation payload footprint & coverage geometry: the SMAD/Wertz “space triangle” relations that turn an orbit altitude and a sensor field of view into the angular radius of the Earth, the swath width, the nadir ground sample distance, the maximum off-nadir access, and the equatorial ground-track spacing that drives revisit.
- eop
- IERS Earth-orientation parameters from the official
finals2000Aproduct. - ephem
- Built-in low-precision analytical ephemerides for the third-body perturbing bodies, so
the numerical propagator’s third-body force (
crate::forces::third_body_accel) needs no external DE/SPK kernel for a low-fidelity run. - ephem_
provider - A pluggable ephemeris provider seam — the source of one body’s position relative to another in the inertial frame — abstracted so the fidelity of those positions can be swapped without touching the deep-space light-time correction (D0.7) or the interplanetary orbit determination (D2/D3) that will consume it.
- ephemeris
- Ephemeris & ground-track scenario — the user-facing surface for satellite VELOCITY, the full frame reductions, and the WGS-84 sub-satellite point.
- estimator
- Clock-holdover state estimators: the coasted time-error prediction a GNSS-denied clock free-runs on.
- eval_
stats - Hand-derived statistics for the impairment-evaluation study.
- filter_
health - Kalman filter-consistency health monitoring (NIS / NEES).
- fim
- Fisher information, the Cramér–Rao lower bound, and observability/datum-defect analysis — the information-geometry core for experiment design and rank diagnosis.
- fom
- Figures of merit — the scored timing, integrity and security metrics a scenario reports, and the samples that feed them.
- fom_
label - Per-figure-of-merit validation tier.
- forces
- Orbital force model: two-body gravity, the zonal-harmonic field, and third-body gravity.
- frame_
eop - Real-time frame / Earth-orientation prediction budget for lunar timing.
- frames
- Reference-frame reduction and a geodetic ground-station observer.
- frugal
- Frugal-engineering cost-per-coverage / ROI layer over constellation sizing.
- fusion
- Joint Kalman sensor-fusion estimator.
- geolocation
- Passive emitter geolocation by TDOA (time-difference-of-arrival) and FDOA (frequency-difference-of-arrival) across a network of receivers — the core of locating a jammer/spoofer, or reverse-PNT off an opportunistic emitter, when GNSS itself is the thing under attack.
- glonass
- GLONASS broadcast ephemeris: a PZ-90 state-vector model with RK4 propagation.
- gnss_
sim - Measurement-domain GNSS simulation: pseudoranges with ionospheric and tropospheric delays.
- gravimeter
- Cold-atom gravimeter measurement model and a spherical-harmonic gravity-anomaly reference field for gravity-map-matching navigation (GPS-denied alt-PNT).
- gravity_
sh - Full tesseral spherical-harmonic geopotential — the EGM2008 field to degree/order 70,
the high-degree gravity model the numerical propagator’s
crate::forceszonal-only field was missing. - gse_sim
- Ground-Support-Equipment signal-in-space / observable simulator and the end-to-end PNT performance loop — the GSE half of the deep-space build (D4.2 + D4.3).
- handoff
- Optical ↔ RF measurement handoff — the receiver state-and-covariance transfer when
the active PNT measurement type switches between a tight optical modality (small
measurement noise
R) and a loose RF modality (largeR). - holdover
- GNSS-denied clock holdover.
- hybrid
- Hybrid quantum + classical PNT: composing the clock-holdover and inertial models into one combined estimator.
- hybrid_
integrity - Joint availability / precision / integrity figure of merit for a heterogeneous
optical + RF PNT service (P5), plus the
hybrid-optical-rfscenario that drives it end-to-end. - igrf
- IGRF-14 geomagnetic main-field model — an alternative-PNT signal source.
- impairment_
eval - AI-algorithm evaluation testbed for RF-impairment detection — the “Characterisation and Evaluation of Machine-Learning Techniques” layer.
- impairment_
ml - Learned RF-impairment detectors for the optimism-gap study.
- impairment_
study - The optimism-gap study: per-class AUC, the distribution-shift optimism gap, the experiment grid, and the ID-only gap predictor.
- inertial
- Inertial navigation: strapdown INS mechanization and the accelerometer error models (classical and cold-atom) a GNSS-denied coast dead-reckons on.
- integrator
- Adaptive numerical ODE integration: classical RK4 with step-doubling control, and a Dormand–Prince RK5(4) embedded pair.
- integrity_
impact - Detection-miss → integrity-impact mapping (context-aware alert limits).
- interchange
- Kshana Interchange Format (KIF) — a neutral, versioned, self-describing envelope for Kshana artifacts (scenarios, run results, trade studies, …).
- intersat_
range - Inter-satellite range / range-rate observables and their planar measurement Jacobians — the per-link measurement model for cislunar observability analysis.
- ionex
- IONEX-style total-electron-content (TEC) maps and the ionospheric range delay.
- jamming
- RF interference (jamming) model: J/S → effective C/N₀ → loss of lock.
- jd2
- Two-part (high-precision) Julian dates.
- kalman
- Two-state Kalman clock estimator.
- lambda
- GNSS carrier-phase integer ambiguity resolution — the LAMBDA approach (Teunissen 1995): integer least-squares with a decorrelating integer (Z) transform and a closed-form bootstrapped success rate.
- launch
- Launch-window & ascent geometry: the two-body relations a mission analyst uses at the trade-study tier to turn a launch-site latitude and a target orbit into launch azimuth(s), the minimum reachable inclination, the Earth-rotation velocity bonus, plane-change (dogleg) Δv, and the number of daily launch opportunities.
- linkbudget
- Deep-space communications link budget — the Friis transmission account that turns transmit
power, antenna gains, range and noise temperature into the carrier-to-noise-density
C/N₀, the energy-per-bit-to-noise-densityEb/N₀, and the link margin over a requiredEb/N₀. This is the telecom-design half of a deep-space mission, the companion to the navigation observable model incrate::radiometric: the navigation kernel says where the spacecraft is from the signal’s timing; the link budget says whether the signal closes at all across the same Earth–Mars range. - lunar
- Cislunar PNT integrity: ARAIM for a LunaNet-style lunar navigation service.
- lunar_
beacon - Surface-beacon augmentation of a lunar navigation service (L08, L09).
- lunar_
combination - Joint multi-technique lunar OD + clock batch estimator (a SIMULATED network).
- lunar_
dpnt - Lunar differential PNT (a lunar DGNSS / SBAS analogue): a fixed reference station at a known lunar-surface location computes per-satellite differential corrections from a Moonlight / LCNS-class constellation, and a roving user applies them so the common-mode orbit + clock errors cancel — leaving only a residual that grows with the user↔reference baseline (spatial decorrelation) — plus user protection levels that reuse the crate’s DO-229E SBAS machinery.
- lunar_
frame - IAU 2015 / WGCCRE lunar body-fixed orientation — the Mean-Earth/polar-axis (ME) frame.
- lunar_
frame_ predict - Real-time lunar frame/ephemeris prediction error — derived endogenously.
- lunar_
frame_ realise - Lunar reference-frame realisation — estimate a frame datum from a network of points.
- lunar_
interop - Lunar interoperability export — the lunar reference frame, lunar time scale and lunar ephemeris emitted in LunaNet/IOAG-aligned, CCSDS-based interchange forms with round-trip / field conformance.
- lunar_
od - Moon-centred force model for lunar precise orbit determination — the selenocentric analogue
of
crate::precise_od::PreciseForceModel. - lunar_
perturbed - Perturbed lunar-constellation ephemeris: an Elliptical Lunar Frozen Orbit (ELFO) /
LCNS-class relay propagated under lunar
J2+C22plus Earth (and optional Sun) third-body gravity, in a Moon-centred inertial (MCI) frame. - lunar_
service - Lunar navigation service-volume analysis: DOP / coverage / availability and generalised lunar ARAIM protection levels over a lunar surface region, from a Moonlight / LCNS-class lunar-orbit constellation.
- lunar_
time - Lunar coordinate time scale (LTC/TCL) and the relativistic Earth↔Moon clock rate.
- lunar_
time_ budget - Coordinated Lunar Time (LTC) end-to-end time-error budget over a τ grid.
- lunar_
time_ budget_ scenario lunar-time-budgetscenario — a runnable wrapper over the Coordinated Lunar Time (LTC) end-to-end time-error budget (crate::lunar_time_budget).- lunar_
vlbi - Lunar geodetic VLBI delay observable for an Earth baseline observing a lunar beacon.
- maneuver
- Impulsive / finite-burn maneuvers, a Lambert two-body transfer solver, and a porkchop (departure × arrival C3 / arrival-V∞) sweep — the maneuver-modeling and trajectory-design beachhead.
- mapmatch
- Map-matching measurement model for terrain-/gravity-referenced navigation.
- mars_
atmos - Mars neutral-atmosphere density and atmospheric-drag acceleration.
- mars_
frame - IAU 2009 Mars body-fixed orientation — the rotation from Mars-centred inertial (≈J2000/ICRF) to the Mars body-fixed frame.
- mars_
pnt - Mars PNT — a simulated MARCONI-style relay constellation at Mars plus reference user scenarios, run through the D3.1 joint one-way + two-way radiometric fusion estimator (D3.2/D3.3).
- mcda
- Multi-Criteria Decision Analysis (MCDA).
- models
- Stochastic clock and error models — the noise processes a scenario samples to drive a run.
- monitor_
network - Sparse-monitor-network detection sizing: how many surveyed, known-location monitor receivers does it take to catch a wide-area / orbital-scale spoof or jam?
- navsignal
- Nav-signal modulation, correlation and code-tracking performance.
- nma_
budget - Navigation-message-authentication (TESLA/OSNMA) budget sizing: turns the assertion “an OSNMA-style authentication scheme fits an AFS (autonomous-formation-flying / augmented-navigation-service) message and timing budget” into a sized result — the authentication overhead as a fraction of the nav-data rate, a bounded authentication latency, and the forgery-resistance figures.
- nutation
- IAU 2000B nutation and the full TEME→GCRS/J2000 inertial reduction.
- observability_
gramian - Observability-Gramian-over-arc core for planar cislunar tracking (paper P6).
- oem
- CCSDS Orbit Ephemeris Message (OEM) writer.
- omm
- CCSDS OMM (Orbit Mean-Elements Message, 502.0-B-2) writer.
- optical_
availability - Optical ground-network availability — the clear-sky / pointing availability of a
free-space optical PNT link, and the diversity gain of an
N-station network. An optical link is weather-limited: a single site is available only when its sky is clear and the terminal can point and acquire. Distributing several sites across uncorrelated weather systems raises the network availability toward unity — the P5 Table 2 / Fig 1b argument. - optical_
linkbudget - Optical (1550 nm) two-way link budget — the photonic companion to the RF
crate::linkbudgetmodule. Where the RF budget turns EIRP /G/T/ range into a carrier-to-noise density, the optical budget turns transmit power, aperture, range and detection efficiency into a detected-photon rate, and from that photon count into a photon-limited ranging precision and a diffraction-limited beam footprint. This is the optical column of the P5 heterogeneous-PNT table. - orbit
- Keplerian-orbit propagation and GNSS line-of-sight visibility.
- orbit_
determination - Orbit determination: recover a satellite’s orbital state from ground-station tracking.
- particle_
filter - Sequential-importance-resampling (SIR) particle filter.
- passes
- Ground-station pass prediction: the time-domain rise/set scheduler that turns
an orbit + a ground station + an elevation mask into the list of visibility
passes (AOS, TCA, LOS, maximum elevation, duration) over a window — the
ground-segment planning query the static look-angle primitives in
crate::frames(look_angles/elevation/is_visible) do not provide on their own. - permalink
- Shareable scenario permalinks (self-contained Base64, RFC 4648).
- powerlaw
- IEEE-1139 power-law clock-noise model: the five-coefficient PSD ↔ Allan-variance conversion, with first-class support for the flicker-FM floor.
- precession
- IAU 2006 precession: Fukushima–Williams angles and the precession rotation matrix.
- precise_
od - Full-force precise orbit determination from position observations — the precise estimator that fits Kshana’s complete force model (EGM2008 tesseral gravity + solid/ocean/ atmospheric tides + Sun/Moon third body + SRP + drag + Schwarzschild/Lense–Thirring GR) to a track of inertial position fixes and reports the post-fit residuals in the radial/transverse/ normal (RTN) frame.
- propagator
- Numerical orbit propagator: a configurable force model integrated by the adaptive
Runge–Kutta driver, the first non-analytic propagator in Kshana (the rest of the
orbit stack is the analytic SGP4/SDP4 of
crate::sgp4). - pvt
- Single-point positioning (SPP): a position fix from real measurements.
- qtrade
- Unified quantum-vs-classical trade evidence.
- quantum_
devices - Quantum device error-model library + representativeness.
- quantum_
faults - Fault / anomaly detection for quantum PNT systems.
- quantum_
nav_ od - GNSS-free quantum spacecraft navigation.
- quantum_
trade - Quantum-vs-classical PNT trade engine + measured-ADEV ingestion + GNSS-denied resilience envelope — the ground-side decision artifacts a quantum-PNT consortium needs (ESA AO/1-13503).
- radiometric
- Radiometric observable corrections for deep-space tracking — the light-time solution and the Shapiro relativistic delay that turn a geometric range into the time a signal actually takes to travel between two bodies.
- raim
- Snapshot Receiver Autonomous Integrity Monitoring (RAIM).
- realdata
- Real-data ingest adapters for the optimism-gap probe.
- realtime_
frame_ eop realtime-frame-eopscenario — a runnable wrapper over the real-time lunar frame / Earth-orientation prediction budget (crate::frame_eop).- reentry
- Ballistic re-entry corridor (Allen–Eggers): the closed-form analytic entry of a non-lifting body through an exponential atmosphere at a constant flight-path angle. It turns an entry velocity + flight-path angle into peak deceleration, the velocity and altitude where that peak occurs, and the peak-heating velocity — the pre-Phase-A corridor numbers an EDL analyst brackets before any high-fidelity trajectory or aerothermal run.
- registry
- Scenario pack registry — the dispatch seam.
- report
- Result reporting: assembling a run’s figures of merit, samples and provenance into the structured result returned to callers.
- representativeness
- Representativeness & gaps-to-flight ledger.
- resilience
- PNT-resilience scoring & the decision-instability of single-number ratings.
- rinex
- RINEX 3 navigation-message (broadcast ephemeris) parser.
- rinex_
obs - RINEX 3.0x / 4.00 observation-file parser.
- run
- Single-run orchestration: driving a parsed scenario through the estimator and scoring it into a result.
- sbas
- SBAS / DO-229E integrity: weighted-least-squares protection levels, the L1/L5 dual-frequency ionosphere-free combination, and a DO-316/DO-229E compliance map.
- scenario
- Scenario model: the parsed TOML scenario the engine classifies, dispatches and runs.
- sdr
- Software-defined-receiver front end: raw IQ IF -> correlator taps.
- security
- Spoofing-detection security figure of merit.
- sgp4
- SGP4/SDP4 analytical orbit propagation.
- sp3
- SP3-c/d precise-ephemeris reader and writer.
- space_
packet - CCSDS Space Packet Protocol (CCSDS 133.0-B) primary-header framing: the standards-compliant TM/TC packet structure ground systems and on-board software exchange. This is the simulation/test-level bridge that lets any Kshana scenario output be wrapped as a conformant packet stream (or a captured stream be parsed back), the “speak the agency packet format” interop layer.
- space_
weather - Space-weather environment model: solar (F10.7) and geomagnetic (Kp/ap) activity
indices and their first-order effect on thermospheric neutral density — the
activity dependence the static US-Standard-Atmosphere-1976
(
crate::forces::atmospheric_density) deliberately omits. - spoof
- Active time-spoofing attack demonstrator.
- spoof_
capture - Tracking-loop pull-in spoof-capture model: does the spoofer actually capture the loop?
- spoof_
detect - The runnable
spoof-detectscenario — the product surface overcrate::spoof_monitors::CombinedSpoofDetector. - spoof_
monitors - RF-layer spoofing monitors: AGC received-power and signal-quality (SQM).
- study
studymode: run acrate::suite::Suiteinto one aggregated, comparable artifact.- suite
- Scenario-suite manifest: a named SET of scenarios run together.
- sweep
- Trade-study parameter sweeps.
- tides
- Solid Earth, ocean, and atmospheric tides on the geopotential (IERS Conventions 2010, Ch.6).
- timegeo
- Geometric time-transfer corrections: the Sagnac effect and GNSS common-view.
- timescales
- Time scales and the Julian-date API.
- timetransfer
- Time-and-frequency transfer: TWSTFT, GNSS common-view, PPP and free-space-optical link transfer precision.
- timetransfer_
adv - Advanced time-and-frequency transfer.
- timetransfer_
chain - Trusted quantum timing — end-to-end time-transfer chain, secure dissemination and a quantum-vs-classical trade.
- tle
- Two-line element set (TLE) ingestion.
- tpl
- Timing Protection Level (TPL) under time-synchronization attack.
- types
- Shared scalar and specification types used across the engine (e.g.
Seconds,ModelSpec). - verification
- Machine-checked verification matrix.
- wahba
- Wahba’s problem: optimal three-axis attitude from weighted vector observations.
- walker
- Walker-delta constellation design on the validated SGP4 core.