kshana 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -33
- package/kshana_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="docs/assets/kshana-mark.svg" alt="Kshana mark — a
|
|
2
|
+
<img src="docs/assets/kshana-mark.svg" alt="Kshana mark — a compass reticle marking the precise instant" width="96" height="96">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="docs/assets/kshana-wordmark.png" alt="Kshana" width="300">
|
|
7
|
+
</p>
|
|
6
8
|
|
|
7
9
|
<p align="center">
|
|
8
10
|
<strong>क्षण</strong> — Sanskrit for <em>the precise instant</em>, the smallest measure of time.<br>
|
|
@@ -12,10 +14,10 @@
|
|
|
12
14
|
<p align="center">
|
|
13
15
|
<a href="https://ashfordeou.github.io/kshana/"><img src="https://img.shields.io/badge/playground-try%20in%20browser-c79e63" alt="Live playground — run in your browser, no install"></a>
|
|
14
16
|
<a href="tests/sgp4_verification.rs"><img src="https://img.shields.io/badge/SGP4-666%2F666%20AIAA%20vectors%20%C2%B7%204.12mm-3fb950" alt="SGP4 validated against all 666 AIAA 2006-6753 vectors, worst 4.12 mm"></a>
|
|
15
|
-
<a href="#validation-at-a-glance"><img src="https://img.shields.io/badge/validated-
|
|
17
|
+
<a href="#validation-at-a-glance"><img src="https://img.shields.io/badge/validated-15%20external%20oracles-3fb950" alt="15 capabilities validated against independent external oracles (real data, independent libraries, or published reference vectors); 42 more are honestly labelled MODELLED and 4 are PARTNER-owned — see Validation at a glance"></a>
|
|
16
18
|
<a href="https://github.com/ashfordeOU/kshana/actions/workflows/ci.yml"><img src="https://img.shields.io/badge/coverage-~96%25%20line-3fb950" alt="~96% line coverage on src/ (cargo-tarpaulin LLVM engine), gated at 85% in CI"></a>
|
|
17
19
|
<a href="https://github.com/ashfordeOU/kshana/actions/workflows/ci.yml"><img src="https://github.com/ashfordeOU/kshana/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
18
|
-
<a href="https://github.com/ashfordeOU/kshana/releases"><img src="https://img.shields.io/badge/release-v0.
|
|
20
|
+
<a href="https://github.com/ashfordeOU/kshana/releases"><img src="https://img.shields.io/badge/release-v0.21.0-c79e63" alt="Release v0.21.0"></a>
|
|
19
21
|
<a href="https://plugins.jetbrains.com/plugin/32181-kshana--pnt-simulator"><img src="https://img.shields.io/badge/JetBrains-Marketplace-c79e63" alt="Kshana on the JetBrains Marketplace"></a>
|
|
20
22
|
<a href="https://glama.ai/mcp/servers/ashfordeOU/kshana"><img src="https://glama.ai/mcp/servers/ashfordeOU/kshana/badges/score.svg" alt="kshana-mcp on Glama — MCP server quality score"></a>
|
|
21
23
|
<a href="LICENSE"><img src="https://img.shields.io/badge/License-AGPL_v3-blue.svg" alt="License: AGPL-3.0-only"></a>
|
|
@@ -46,10 +48,10 @@ citable table in [`docs/PROVENANCE.md`](docs/PROVENANCE.md).
|
|
|
46
48
|
|
|
47
49
|
*Free and open source under the GNU AGPL-3.0 — with a commercial licence available
|
|
48
50
|
from Ashforde OÜ for proprietary/closed integration (see [`LICENSING.md`](LICENSING.md)).
|
|
49
|
-
Professionally developed and maintained by Ashforde
|
|
50
|
-
integration, and proprietary extensions available.*
|
|
51
|
+
Professionally developed and maintained by [Ashforde OÜ](https://ashforde.org); commercial
|
|
52
|
+
support, integration, and proprietary extensions available.*
|
|
51
53
|
|
|
52
|
-
> **Status: v0.
|
|
54
|
+
> **Status: v0.21.0 · a simulation substrate, not yet a product.** A validated,
|
|
53
55
|
> fully reproducible engine spanning the PNT stack — orbit geometry and constellation
|
|
54
56
|
> design, a numerical (Cowell) propagator with a six-perturbation force model, maneuver
|
|
55
57
|
> and trajectory design, time systems, inertial navigation (incl. map-aided and
|
|
@@ -153,21 +155,23 @@ the P2 roadmap and [get in touch](#support--professional-services) to collaborat
|
|
|
153
155
|
| **Maneuvers & trajectory design** | Impulsive ΔV nodes with 6×6 covariance propagation (ECI / LVLH execution-error frames), finite-burn integration checked against the closed-form **Tsiolkovsky** rocket equation to < 0.01 %, an **Izzo-2015** single-revolution **Lambert** solver, an exact universal-variable **Kepler** propagator, and a **porkchop** (launch × arrival) C3 / arrival-V∞ sweep emitted as a JSON contour grid — the performance-simulation layer above GMAT/Orekit, with every Lambert output round-tripped against two-body truth and the porkchop minimum checked against the analytic Hohmann floor. |
|
|
154
156
|
| **Time systems & reference frames** | IERS leap-second **UTC / TAI / TT / UT1** scales, a Julian-date API, the IAU-2000 **Earth Rotation Angle**, GMST-based **TEME ↔ ECEF** with WGS-84 geodetic frames, IAU 2006 precession (Fukushima–Williams), full **IAU 2000A/2000B nutation**, IERS **polar motion**, and the equinox-free **CIO-based IAU 2006/2000A GCRS↔ITRS** reduction — all validated **bit-for-bit** against the SOFA/ERFA vectors, and **independently cross-checked against ANISE** (the pure-Rust NAIF/SPICE reimplementation): kshana's GCRS→ITRS vs ANISE's ITRF93 from JPL's `earth_latest_high_prec.bpc`, the same IERS Earth-orientation parameters fed to both, agree to **≤ 0.86 m on the ground / ≤ 3.6 m at GNSS orbit** (max 0.028″) across eight epochs 2020–2023. |
|
|
155
157
|
| **Inertial** | Three-axis strapdown INS — quaternion attitude, WGS-84 NED mechanization, coning/sculling compensation, and a deterministic IMU error model (scale-factor, misalignment, g-sensitivity, quantization, drift); a **first-principles cold-atom-interferometer accelerometer** (Mach–Zehnder phase, quantum projection noise, contrast decay, vibration coupling) that *derives* the velocity-random-walk coefficient; and a sequential-importance-resampling **particle filter** for map-aided (terrain-/gravity-referenced) GPS-denied navigation. |
|
|
156
|
-
| **Alt-PNT (GPS-denied)** | A cold-atom **gravimeter measurement model** whose white-noise floor (`σ = ASD/√τ`) is derived from the CAI accelerometer physics; a low-degree, fully-normalised **spherical-harmonic gravity-anomaly field** (validated against the closed-form Legendre functions and a hand-derived single-term anomaly) plus synthetic mascons; and a **gravity-map-matching particle filter** that recovers a GPS-denied track from the anomaly sequence it flies through. It extends to **terrain-referenced navigation** (TERCOM/SITAN against an SRTM `.hgt` DEM, `src/altpnt/terrain.rs`), an **IGRF-14 geomagnetic main field** to degree/order 13 (`src/igrf.rs`, validated against the tilted-dipole closed form and ∇V finite differences), and a **combined gravity + magnetic + terrain** navigator that fuses all three scalar channels through one particle filter (information is additive — no channel makes the fix worse). A **60-minute GPS-denied benchmark** (a ~700 km / one-hour outage where the inertial solution drifts to ~70 km) is recovered to **~145 m (< 500 m)** by a hierarchical coarse-to-fine matcher — the ESA NAVISP *Quantum Wayfarer* target. |
|
|
158
|
+
| **Alt-PNT (GPS-denied)** | A cold-atom **gravimeter measurement model** whose white-noise floor (`σ = ASD/√τ`) is derived from the CAI accelerometer physics; a low-degree, fully-normalised **spherical-harmonic gravity-anomaly field** (validated against the closed-form Legendre functions and a hand-derived single-term anomaly) plus synthetic mascons; the **gravity-functional synthesis kernel** (`gravity_sh::gravity_magnitude` / `gravity_disturbance_mgal`) — the "map reader" a gravity-aided navigator matches against — is validated against the **GRS80 normal-gravity standard**, reproducing the closed-form Somigliana normal gravity and the published γ_e / γ_p to **3.5e-12** and producing a physically-bounded disturbance map from the real ICGEM **EGM2008** field (RMS ≈ 26 mGal, max ≈ 89 mGal at d/o 70; `tests/icgem_gravity_reference.rs`); and a **gravity-map-matching particle filter** that recovers a GPS-denied track from the anomaly sequence it flies through. It extends to **terrain-referenced navigation** (TERCOM/SITAN against an SRTM `.hgt` DEM, `src/altpnt/terrain.rs`), an **IGRF-14 geomagnetic main field** to degree/order 13 (`src/igrf.rs`, validated against the tilted-dipole closed form and ∇V finite differences), and a **combined gravity + magnetic + terrain** navigator that fuses all three scalar channels through one particle filter (information is additive — no channel makes the fix worse). A **60-minute GPS-denied benchmark** (a ~700 km / one-hour outage where the inertial solution drifts to ~70 km) is recovered to **~145 m (< 500 m)** by a hierarchical coarse-to-fine matcher — the ESA NAVISP *Quantum Wayfarer* target. |
|
|
157
159
|
| **Fusion** | Loosely-coupled 15-state GNSS/INS error-state EKF with closed-loop feedback (the `gnss-ins` pack); a **tightly-coupled** pseudorange update that keeps correcting with fewer than four satellites; a coupled **clock + position** filter; a general **unscented (sigma-point) Kalman** estimator for strongly nonlinear measurements; a tightly-coupled GNSS/INS **UKF navigator** (pseudorange + Doppler) whose force-model orbital coast is validated to **0.77 m RMS** over a 30-minute curving LEO pass that includes a 120-second GNSS outage; and a full **17-state tightly-coupled GNSS/INS UKF** (position, velocity, attitude error, accelerometer and gyro biases, clock bias and drift) whose **quantum-CAI dead-reckoning** coasts a 120-second outage on the cold-atom accelerometer's derived velocity-random-walk. |
|
|
158
160
|
| **Orbit determination** | Recovery of an orbital state `[r, v]` from ground-station range tracking, composing the two-body + J2 force model and RK4 integrator with a **Gauss–Newton batch** corrector (`determine_orbit_batch`, sub-metre / mm·s⁻¹ from noiseless ranges, ~2 m at a 5 m noise floor) and a **sequential** unscented-filter variant (`determine_orbit_sequential`). |
|
|
159
161
|
| **Lunar & cislunar** | An Earth–Moon **circular restricted three-body (CR3BP)** propagator in the rotating frame — conserved Jacobi constant and all five Lagrange points (`src/cr3bp.rs`) — now with a **6×6 state-transition matrix and a single-shooting differential corrector** (`cr3bp_jacobian`, `propagate_state_stm`, `differential_correct_halo`) that produces genuinely periodic **halo / NRHO** orbits: the STM is validated against finite differences, corrected orbits close to machine precision, and seeding the published apolune state reproduces the **L2 southern 9:2 NRHO** (the Gateway orbit) at period ≈ 6.57 d / perilune ≈ 3,250 km, consistent with the published ≈ 6.56 d / ≈ 3,370 km (a CR3BP — circular, Sun-free — solution, **not** validated against a real LANS/Gateway ephemeris; the selenocentric MCI/MCMF transform of the corrected orbit is a follow-on); plus **LunaNet / LNIS** cislunar PNT geometry (MCI↔MCMF reduction, selenographic coordinates) with a **lunar south-pole ARAIM** pass that honestly surfaces the integrity gap: a ~30 m σ_URE drives the protection level well above a 50 m alert limit (`src/lunar.rs`, `scenarios/lunanet-araim.toml`). |
|
|
162
|
+
| **Lunar PNT suite** | A modelled lunar/cislunar navigation suite layered on the CR3BP core, each a runnable `kind`: **Lunar Coordinate Time** (`lunar-time-offset`, `src/lunar_time.rs` — the secular LTC/TCL − TT rate from the self-potential difference + kinetic term, reported with the published 56–59 µs/day band); a geodetic **lunar VLBI** delay observable (`lunar-vlbi`, `src/lunar_vlbi.rs` — an Earth-baseline near-field two-range-difference delay + rate, cross-checked against the same-codebase plane-wave Δ-DOR in the far-field limit, partials finite-difference-verified); a **joint multi-technique OD + clock** batch estimator (`lunar-joint-od-clock`, `src/lunar_combination.rs` — a Gauss–Newton fit fusing VLBI + lunar-local ranges + inter-satellite ranges that makes a surface station's full 3-D position observable where local ranging alone leaves a weak direction); **reference-frame realisation** (`lunar-frame-realisation`, `src/lunar_frame_realise.rs` — a 7-parameter Helmert datum fit + IAU 2015 WGCCRE orientation tie); a **Moonlight/LCNS-class service-volume** analysis (`moonlight-service-volume`, `src/lunar_service.rs` — DOP / coverage / availability + a generalised lunar ARAIM HPL/VPL envelope, reusing the gnss_lib_py-validated DOP kernel and the LunaNet σ_URE≈30 m machinery); **lunar differential PNT** (`lunar-differential-pnt`, `src/lunar_dpnt.rs` — a lunar DGNSS/SBAS analogue: exact common-mode clock cancellation + first-order spatial decorrelation vs baseline, reusing the DO-229E SBAS protection level); and a **LunaNet/IOAG-aligned interoperability export** (`lunar-interop-export`, `src/lunar_interop.rs` — CCSDS-OEM + lunar-time-scale round-trip in the IAU 2015 lunar body frame, wrapped in the KIF envelope). All **MODELLED** against internal consistency / reference implementations from **illustrative public-source parameters** — **not** validated against real VLBI/Gateway tracking, **not** affiliated with or endorsed by any agency, no TRL / heritage claim. |
|
|
160
163
|
| **Deep-space & Mars PNT** | An open **radiometric navigation engine**: iterative light-time + **Shapiro** relativistic delay, two-/one-/three-way **Doppler & range** (Moyer two-leg), coherent transponder turnaround ratios, regenerative/PN ranging (CCSDS 414), and **Δ-DOR** plane-of-sky (CCSDS 506), with solar-plasma/tropo/iono media; **CCSDS-TDM (503)** tracking-data-message parse + emit; a **reduced-dynamic Square-Root Information Filter** (RTN empirical accelerations + a 3-state onboard clock + Mars atmospheric drag) that does **Mars-LMO orbit determination to ≈ 0.2 m** in a synthetic closed loop; a joint **one-way + two-way fusion** estimator; a multi-body dynamics core (`Body{μ, re, zonals, gravity, IAU-pole}`, Mars GMM-3 gravity, an IAU body-fixed Mars frame, a pluggable `EphemerisProvider` seam, two-part Julian dates + TT↔TDB); and the **`mars-pnt`** relay-PNT scenario (a MARCONI areostationary relay constellation) with an end-to-end **GSE performance simulator** (geometry → link budget → observables → SRIF → covariance). **Simulation-validated** (covariance / closed-loop figures of merit); the Sun-central Mars dynamics are cross-checked against JPL **DE440** (137 m @ 1-day arc, `xval/anise-mars-od`). Real DSN/ESTRACK tracking-data validation is on the roadmap. |
|
|
161
|
-
| **Integrity** | Snapshot and solution-separation (ARAIM-style) RAIM with horizontal/vertical protection levels (HPL/VPL), fault detection & exclusion, and Stanford integrity diagrams; an explicit integrity-risk-budget (**MHSS**) protection level, including the **dual-/multi-constellation constellation-wide fault mode** (EU ARAIM / DO-316), exercised on a real GPS + Galileo snapshot (`scenarios/araim-gps-galileo.toml`). The protection level applies the one-sided **nominal-bias** projection `b_k = Σ_i|s_i|·b_nom` per fault mode and the **integrity** sigma σ_URA (distinct from the accuracy σ_URE) from the Integrity Support Message — see [`docs/ARAIM_REFERENCE.md`](docs/ARAIM_REFERENCE.md). |
|
|
162
|
-
| **Augmentation (SBAS)** | **SBAS / WAAS protection levels** in the DO-229E weighted-least-squares form (precision-approach and en-route K-factors) and the **L1/L5 dual-frequency ionosphere-free** combination (IS-GPS-705, γ₁₅ ≈ 1.793) that underpins DO-316 — `src/sbas.rs
|
|
163
|
-
| **Clock & timing** | Two-state Kalman holdover (Joseph-form covariance, NIS/NEES consistency health); Allan-family stability (ADEV / MDEV / TDEV / HDEV) with noise-type-specific confidence intervals and a full **IEEE-1139 five-coefficient power-law fit
|
|
164
|
+
| **Integrity** | Snapshot and solution-separation (ARAIM-style) RAIM with horizontal/vertical protection levels (HPL/VPL), fault detection & exclusion, and Stanford integrity diagrams; an explicit integrity-risk-budget (**MHSS**) protection level, including the **dual-/multi-constellation constellation-wide fault mode** (EU ARAIM / DO-316), exercised on a real GPS + Galileo snapshot (`scenarios/araim-gps-galileo.toml`). The protection level applies the one-sided **nominal-bias** projection `b_k = Σ_i|s_i|·b_nom` per fault mode and the **integrity** sigma σ_URA (distinct from the accuracy σ_URE) from the Integrity Support Message — see [`docs/ARAIM_REFERENCE.md`](docs/ARAIM_REFERENCE.md). The detection kernel (the χ²/non-central-χ²/normal thresholds and K-multipliers) is **externally validated against SciPy** across 171 cases (`tests/raim_reference.rs`); the geometry reuses the gnss_lib_py-validated DOP kernel. The ARAIM MHSS integrity-risk *budget allocation* itself has no published numeric oracle and stays honestly Modelled. |
|
|
165
|
+
| **Augmentation (SBAS)** | **SBAS / WAAS protection levels** in the DO-229E weighted-least-squares form (precision-approach and en-route K-factors) and the **L1/L5 dual-frequency ionosphere-free** combination (IS-GPS-705, γ₁₅ ≈ 1.793) that underpins DO-316 — `src/sbas.rs`. The protection-level algorithm is **externally validated against the RTKLIB SBAS-PL fork** (`zsiki/rtklib_ws` `waasprotlevels()`, Siki & Takács 2017, DO-229D App. J) run on **real EGNOS data**, reproducing its HPL to < 2e-3 m (`tests/sbas_reference.rs`); gLAB v6.0.0 confirmed the identical convention. |
|
|
166
|
+
| **Clock & timing** | Two-state Kalman holdover (Joseph-form covariance, NIS/NEES consistency health); Allan-family stability (ADEV / MDEV / TDEV / HDEV) with noise-type-specific confidence intervals and a full **IEEE-1139 five-coefficient power-law fit** — the estimators are validated on real hardware against **Stable32**: a **real 5071A caesium primary standard vs a hydrogen maser** (556,990 phase samples, 16 averaging factors, OADEV/OHDEV to 1e-3; `tests/cs5071a_reference.rs`) and the **canonical Stable32 PHASE.DAT** regression series (139 averaging factors, OADEV/MDEV/TDEV to 1e-3; `tests/phasedat_reference.rs`); geometric corrections (Sagnac, GNSS common-view); and the operational transfer methods — **TWSTFT** with the BIPM Sagnac closed form, **GNSS common-view**, **PPP** ionosphere-free time transfer, a free-space **optical** link with turbulence scintillation, and an inverse-variance **clock-ensemble (paper) timescale** below the best contributing clock. A **GNSS-denied clock-holdover calculator** (`src/holdover.rs`) exposes the closed-form van-Loan coast-error growth as a *holdover-to-threshold* inversion — how long a clock free-runs before its timing error exceeds budget — across representative classical and quantum-clock classes; **modelled** (cross-checked against the multi-step `clock_state` covariance recursion), and honest that for a very stable clock the holdover to a tight threshold is set by the *assumed* long-tau noise floor, not the cited ADEV. A **conditional Timing Protection Level** (`src/tpl.rs`) extends holdover to spoofing: a bound on the *undetected* time error, given an independent cross-check, that composes a k-sigma monitor floor, the van-Loan coast variance over the detection latency, and a CUSUM time-to-alarm. Calibrated on a real recorded spoof (JammerTest 2024) and reproducible via `cargo run --example tpl_jammertest`; **MODELLED** composition (no integrity-risk-per-hour budget), conditional on detection — there is no finite *unconditional* bound. |
|
|
164
167
|
| **GNSS measurement domain** | Forward pseudorange / Doppler synthesis with **Klobuchar** (broadcast) and **IONEX / TEC-grid** (measured) ionosphere — including an IONEX file parser, time interpolation between maps, and the thin-shell slant-obliquity mapping — **Saastamoinen + Niell** troposphere, and snapshot RAIM (HPL/VPL). |
|
|
165
|
-
| **Resilience** | Link-budget **jamming** (J/S → effective C/N₀ → loss of lock, with the anti-jam spectral-separation factor `Q` now **derived from the actual signal and jammer power spectra** via `src/navsignal.rs` — `Q = 1/(R_c·κ)`, cross-checked in CI against the previous representative constant); a stochastic **time-spoof detector** (Neyman–Pearson / χ²₁ energy test with closed-form and Monte-Carlo P_fa/P_md and a Security FoM of 1 − P_md); and a **multi-layer spoof detector** fusing a RAIM-consistency parity test (with the common-mode blind spot modelled honestly), an RF AGC-power monitor, and a signal-quality (SQM early-minus-late) monitor; and a **quantum-inertial dead-reckoning error budget** (`QuantumNavBudget`, `src/inertial/quantum_imu.rs`) composing the cold-atom-interferometer white-noise velocity-random-walk with residual bias (cross-checked against the independent `AccelModel` integrator) and scale-factor error into a position-drift-over-holdover figure — the inertial twin of the clock holdover. |
|
|
168
|
+
| **Resilience** | Link-budget **jamming** (J/S → effective C/N₀ → loss of lock, with the anti-jam spectral-separation factor `Q` now **derived from the actual signal and jammer power spectra** via `src/navsignal.rs` — `Q = 1/(R_c·κ)`, cross-checked in CI against the previous representative constant); a stochastic **time-spoof detector** (Neyman–Pearson / χ²₁ energy test with closed-form and Monte-Carlo P_fa/P_md and a Security FoM of 1 − P_md); and a **multi-layer spoof detector** fusing a RAIM-consistency parity test (with the common-mode blind spot modelled honestly), an RF AGC-power monitor, and a signal-quality (SQM early-minus-late) monitor; and a **quantum-inertial dead-reckoning error budget** (`QuantumNavBudget`, `src/inertial/quantum_imu.rs`) composing the cold-atom-interferometer white-noise velocity-random-walk with residual bias (cross-checked against the independent `AccelModel` integrator) and scale-factor error into a position-drift-over-holdover figure — the inertial twin of the clock holdover. A **framework-aligned resilience-scoring engine** (`src/resilience/`) maps an architecture's simulated behaviour to per-dimension sub-scores across the DHS RPCF categories, then studies the **decision-stability** of any single composite score or maturity Level under a Dirichlet weighting simplex and a five-threat ensemble — Kendall-τ rank instability, top-1 winner flip rate, and common-mode **diversity collapse** (Hill-N2), with an integrity-hashed assurance report (35 hand-derived oracle tests). Reproducible via `cargo run --example resilience_report`; **MODELLED** synthetic architectures, a self-assessment aligned to RPCF v2.0, **not** a certification. See [`docs/RESILIENCE-CROSSWALK.md`](docs/RESILIENCE-CROSSWALK.md). |
|
|
166
169
|
| **Nav-signal & code tracking** | The **signal level** between the link budget and the measurement domain (`src/navsignal.rs`): unit-area **power spectral densities** for **BPSK-R(n)** and **sine-BOC(m,n)**; the **spectral-separation coefficient** κ = ∫ G_s·G_i df, which **derives the anti-jam `Q`** the jamming model uses (`Q = 1/(R_c·κ)`) from the actual signal/jammer spectra instead of a representative constant; the **RMS (Gabor) bandwidth** (BOC > BPSK — the ranging-information / Cramér–Rao measure); the **coherent early–late DLL code-tracking thermal-noise jitter** (Kaplan & Hegarty; ~sub-metre for C/A at 45 dB-Hz); and the **multipath error envelope** (coherent EML — narrow-correlator suppression). Validated against closed-form anchors (BPSK self-SSC = 2/(3·R_c), unit-area PSDs, sub-metre C/A jitter). This is signal-**performance** analysis, **not** antenna / RF-payload hardware design (a payload partner's role). |
|
|
167
170
|
| **Interoperability** | **RINEX-3** multi-GNSS broadcast-ephemeris ingestion (GPS, Galileo, QZSS, BeiDou MEO/IGSO via IS-GPS-200; GLONASS via PZ-90 state-vector RK4) usable as a constellation source (RINEX in, PNT geometry out); a **RINEX-3/4** observation parser (pseudorange, carrier phase, Doppler, signal strength) that now **feeds a single-point-positioning solver** (`pvt`) — real code observations in, a real **receiver position** out, validated on IGS data; an **SP3-c/d** precise-ephemeris reader/writer with 9th-order Lagrange interpolation; and **CCSDS OEM 2.0 + OMM** (mean-elements) export for flight-dynamics tools (GMAT, Orekit, STK); and **CCSDS-TDM (503)** tracking-data-message parse + emit for deep-space radiometric tracking. |
|
|
168
171
|
| **Mission analysis (systems engineering)** | First-order mission-design budgets, each a runnable kind: two-body **launch & ascent geometry** (`launch-window` — launch azimuth `sin Az = cos i/cos lat`, minimum inclination, Earth-rotation bonus, dogleg plane-change Δv, daily opportunities; `src/launch.rs`); an **Allen–Eggers ballistic re-entry corridor** (`reentry` — peak deceleration, peak-g velocity/altitude, peak-heating velocity; `src/reentry.rs`); **Earth-observation coverage geometry** (`eo-coverage` — swath / nadir GSD / off-nadir access / revisit via the SMAD space triangle; `src/eo_payload.rs`); a **3-DOF attitude & pointing error budget** (`attitude-budget` — worst-case gravity-gradient torque + RSS pointing budget; `src/attitude_budget.rs`); **ground-station pass prediction** (`passes` — AOS/TCA/LOS, max elevation, access time; `src/passes.rs`); and a **one-way link budget** over the CCSDS 401 / DSN 810-005 link equation (`link-budget` — FSPL, C/N₀, Eb/N₀, margin, closure; `src/linkbudget.rs`). **MODELLED** first-order analytic budgets — the pre-hardware layer below STK/GMAT/Basilisk, not a 6-DoF or radiometric replacement. |
|
|
169
172
|
| **Space environment** | A **space-weather environment model** (`space-weather`, `src/space_weather.rs`): solar (F10.7 / centred-81-day F10.7a) and geomagnetic (Kp, with the definitional Kp↔ap table) activity indices, the **Jacchia-1971** exospheric temperature they drive (validated vs published solar min/mean/max), and the activity-corrected vs static thermospheric neutral density at altitude — the solar-cycle density dependence the static USSA76 atmosphere omits. **MODELLED**: a calibrated first-order scale-height coupling, **not** a data-validated (NRLMSISE) atmosphere. |
|
|
170
|
-
| **AI/ML evaluation & trade** | An **RF-impairment detection evaluation testbed** (`impairment-eval`, `src/impairment_eval.rs`): a labelled, parameter-grounded **synthetic** corpus (nominal / jamming / spoof-time / spoof-position / multipath), a detector-agnostic **ROC/AUC** harness scoring any detector (energy \| agc \| sqm \| parity \| fused) with per-class Pd at a target Pfa, and the in- vs out-of-distribution **optimism gap** (distribution-shift mode). Plus a **quantum-vs-classical PNT trade** (`quantum-trade`, `src/quantum_trade.rs`) quantifying a candidate clock's timing/inertial holdover benefit from a **measured-ADEV** curve vs a classical baseline, with the long-τ floor caveat carried on the artifact and a GNSS-denied resilience-vs-time envelope. The evaluation **metrics** (AUC / confusion / Pd-Pmd) are **validated to an exact match against scikit-learn 1.9.0
|
|
173
|
+
| **AI/ML evaluation & trade** | An **RF-impairment detection evaluation testbed** (`impairment-eval`, `src/impairment_eval.rs`): a labelled, parameter-grounded **synthetic** corpus (nominal / jamming / spoof-time / spoof-position / multipath), a detector-agnostic **ROC/AUC** harness scoring any detector (energy \| agc \| sqm \| parity \| fused) with per-class Pd at a target Pfa, and the in- vs out-of-distribution **optimism gap** (distribution-shift mode). Plus a **quantum-vs-classical PNT trade** (`quantum-trade`, `src/quantum_trade.rs`) quantifying a candidate clock's timing/inertial holdover benefit from a **measured-ADEV** curve vs a classical baseline, with the long-τ floor caveat carried on the artifact and a GNSS-denied resilience-vs-time envelope. The evaluation **metrics** (AUC / confusion / Pd-Pmd) are **validated to an exact match against scikit-learn 1.9.0** — including on **real ESA OPS-SAT telemetry** (the OPSSAT-AD dataset, Ruszczak et al. 2025, CC BY 4.0), where Kshana's Mann–Whitney ROC AUC reproduces scikit-learn's `roc_auc_score` to < 1e-9 on the held-out test split and a transparent peak-count detector separates the labelled anomalies at AUC ≈ 0.85 (`tests/opssat_ad_reference.rs`) — and the trade engine's numerical **kernels** (ADEV NNLS fit, χ² consistency bands, van-Loan clock Q) **against scipy 1.17.1**; the device-benefit numbers built on top stay **MODELLED** operating characteristics — never field/IQ data, no good/bad verdict. Building on the testbed, a deeper **optimism-gap study** (`src/impairment_study.rs`, `impairment_ml.rs`, `eval_stats.rs`) scores a **13-detector** panel (energy/AGC/SQM/parity plus seeded logistic-regression and one-hidden-layer-MLP detectors), fits in- vs out-of-distribution **scaling laws** with a permutation null, and learns a **leave-one-out predictor** of out-of-distribution degradation from in-distribution statistics (`cargo run --example optimism_study`). A **software-defined-receiver front end** (`src/sdr.rs` — raw IQ/IF → correlator early/prompt/late taps → SQM) and **real-data ingest adapters** (`src/realdata/` — RINEX, u-blox UBX, GnssLogger, JammerTest, Yunnan, SatGrid) let the same detectors run over recordings supplied locally (no datasets are committed). The **quantum-vs-classical resilience crossover map** under parameter uncertainty (`src/crossover.rs`; `cargo run --bin crossover_study`) regenerates the inertial and clock crossover studies behind the Results figures. |
|
|
174
|
+
| **Quantum-Enabled PNT demonstrator** | Three runnable, **MODELLED** application areas behind the open engine, each emitting honest `TradeEvidence` + a representativeness / gaps-to-flight record (`src/representativeness.rs`): **trusted quantum time transfer** (`quantum-time-transfer`, `src/timetransfer_chain.rs` — an end-to-end optical-lattice-clock + photonic-link vs CSAC + RF two-way budget, with a reused timing protection level, a delay/replay-attack security FoM (1 − P_md), and clock-anomaly detection + CUSUM latency); **GNSS-free quantum navigation** (`quantum-gnss-free-nav`, `src/quantum_nav_od.rs` — a cold-atom-interferometer inertial coast vs a navigation-grade INS over a GNSS outage, honest that with no external fix the accelerometer bias is unobservable so the error still grows); and quantum-system **fault/anomaly detection** (`quantum-anomaly-detect`, `src/quantum_faults.rs` — a labelled fault catalogue with a bootstrap-CI ROC AUC from the externally-validated `eval_stats` and a minimum-detectable-fault at a fixed false-alarm rate). A shared **quantum device error-model library** (`src/quantum_devices.rs`) and a unified **quantum-vs-classical trade harness** (`src/qtrade.rs`) underpin them. The validated kernels they ride (eval-metrics vs scikit-learn, trade kernels vs scipy) are reused; the device-benefit numbers built on top stay **MODELLED** — **illustrative public-source** device/link parameters, models the *class*, no TRL / flight heritage / certification, no agency endorsement. |
|
|
171
175
|
| **Frugal engineering & integrity impact** | A **cost-per-coverage ROI** lens (`src/frugal.rs`) — cost per unit of delivered coverage for an architecture trade — and a **detection-miss → integrity-impact** mapping (`src/integrity_impact.rs`) that turns a monitor's missed-detection rate into its integrity-risk contribution. **MODELLED** decision-support budgets, additive. |
|
|
172
176
|
| **Artifact interchange** | The **Kshana Interchange Format (KIF)** (`src/interchange.rs`) — a versioned, self-describing envelope wrapping a scenario result with its kind, schema version, and MODELLED/VALIDATED labels, so a stored artifact stays self-documenting and older envelopes remain forward-compatibly readable. |
|
|
173
177
|
|
|
@@ -278,6 +282,25 @@ cargo run -- scenarios/orbit-sgp4-gps.toml --export-omm gps.omm
|
|
|
278
282
|
cargo run -- scenarios/orbit-sgp4-gps.toml --export-oem gps.oem
|
|
279
283
|
```
|
|
280
284
|
|
|
285
|
+
**Other CLI modes** — lint a scenario, feed real Earth-orientation data, or run a whole suite:
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
# Lint a scenario without running it (checks the kind + required fields):
|
|
289
|
+
cargo run -- --validate scenarios/integrity-raim.toml
|
|
290
|
+
|
|
291
|
+
# Feed a real IERS Earth-orientation file (finals2000A) for frame precision:
|
|
292
|
+
cargo run -- scenarios/orbit-sgp4-gps.toml --eop tests/fixtures/agency/eop/finals2000A_2022001.txt
|
|
293
|
+
|
|
294
|
+
# Run a SUITE of scenarios into one aggregated, stamped study artifact
|
|
295
|
+
# (writes <suite>.study.json + <suite>.study.html next to the manifest):
|
|
296
|
+
cargo run -- --study scenarios/quantum-pnt-demonstrator.suite.toml --study-name "Quantum-Enabled PNT demonstrator"
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
A **suite** manifest is a small TOML — a `title` and a `scenarios = [ … ]` array of
|
|
300
|
+
scenario paths — that the engine runs in turn, folding every result (with its
|
|
301
|
+
MODELLED / VALIDATED labels) into one self-describing study artifact. See
|
|
302
|
+
[`scenarios/quantum-pnt-demonstrator.suite.toml`](scenarios/quantum-pnt-demonstrator.suite.toml).
|
|
303
|
+
|
|
281
304
|
**Interoperability role.** Kshana is the *performance-simulation* layer that sits
|
|
282
305
|
alongside the post-processing toolchain, not a replacement for it: feed its **RINEX**
|
|
283
306
|
output into RTKLIB or gLAB for a position solution, and use its **SP3** output as a
|
|
@@ -317,6 +340,34 @@ accuracy — alongside the clock result.
|
|
|
317
340
|
> fraction of epochs that meet the configured alert limits, with a Stanford
|
|
318
341
|
> integrity diagram for error-vs-PL classification.
|
|
319
342
|
|
|
343
|
+
### Reproducible study artifacts
|
|
344
|
+
|
|
345
|
+
Four open studies each regenerate a byte-deterministic artifact (fixed seed) from one
|
|
346
|
+
command — the numbers behind the quantum-vs-classical crossover, RF-impairment
|
|
347
|
+
optimism-gap, PNT-resilience-scoring, and timing-protection-level studies:
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
# Quantum-vs-classical resilience crossover map (writes paper/crossover/*.json):
|
|
351
|
+
cargo run --release --bin crossover_study -- paper/crossover
|
|
352
|
+
|
|
353
|
+
# RF-impairment optimism-gap study (13-detector panel, scaling laws, LOO predictor):
|
|
354
|
+
cargo run --release --example optimism_study -- paper-artifacts/optimism-study.json
|
|
355
|
+
|
|
356
|
+
# Framework-aligned PNT-resilience scoring + decision-instability study:
|
|
357
|
+
cargo run --release --example resilience_report -- paper-artifacts/resilience-study.json
|
|
358
|
+
|
|
359
|
+
# Conditional Timing Protection Level, calibrated on a real recorded spoof:
|
|
360
|
+
cargo run --release --example tpl_jammertest
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Each artifact records its engine version, seeds, and a config hash and carries an honest
|
|
364
|
+
MODELLED/VALIDATED label. The real-data probes (`*_probe`) run the same pipeline over
|
|
365
|
+
recordings you supply locally; no datasets are shipped in the repo. The RF-impairment
|
|
366
|
+
optimism-gap study is written up in the preprint
|
|
367
|
+
[arXiv:2606.22054](https://arxiv.org/abs/2606.22054), and the conditional timing
|
|
368
|
+
protection level (`tpl_jammertest` above) in the preprint
|
|
369
|
+
[arXiv:2606.24210](https://arxiv.org/abs/2606.24210) (see [Citing](#citing)).
|
|
370
|
+
|
|
320
371
|
### Python
|
|
321
372
|
|
|
322
373
|
An optional Python extension (PyO3, abi3) wraps the same engine. Build and install
|
|
@@ -338,6 +389,11 @@ result_json, chart_svg, summary = kshana.run_full(open("scenarios/orbit-gnss-cha
|
|
|
338
389
|
print(kshana.version(), summary)
|
|
339
390
|
```
|
|
340
391
|
|
|
392
|
+
Beyond `run` / `run_full` / `version`, the module exposes `run_typed` (a structured
|
|
393
|
+
result object), `validate_toml` (lint → list of error strings), `list_kinds` /
|
|
394
|
+
`scenario_kinds` (the dispatchable kinds), and `error_kind` (the `KshanaError` tag for
|
|
395
|
+
a rejected scenario) — see [`docs/PYTHON_API.md`](docs/PYTHON_API.md).
|
|
396
|
+
|
|
341
397
|
Wheels are built for Linux, macOS, and Windows by the `wheels` workflow on each
|
|
342
398
|
release tag.
|
|
343
399
|
|
|
@@ -356,6 +412,11 @@ const result = JSON.parse(run(tomlText));
|
|
|
356
412
|
console.log(version(), result.classical.fom.timing_p95_ns);
|
|
357
413
|
```
|
|
358
414
|
|
|
415
|
+
The module also exports `summary` (the one-line result string), `list_kinds` /
|
|
416
|
+
`error_kind` (introspection), and `encode_permalink` / `decode_permalink` — the
|
|
417
|
+
shareable-URL codec the playground uses to round-trip a whole scenario through the
|
|
418
|
+
address-bar fragment.
|
|
419
|
+
|
|
359
420
|
### AI agents (MCP)
|
|
360
421
|
|
|
361
422
|
[](https://glama.ai/mcp/servers/ashfordeOU/kshana)
|
|
@@ -384,9 +445,9 @@ plugin from the JetBrains Marketplace (or *Settings → Plugins → Marketplace
|
|
|
384
445
|
|
|
385
446
|
## Scenario format
|
|
386
447
|
|
|
387
|
-
Scenarios are declarative TOML. A top-level `kind` selects the pack — **
|
|
448
|
+
Scenarios are declarative TOML. A top-level `kind` selects the pack — **forty-four** in
|
|
388
449
|
all (`clock` is the default if omitted): `inertial`, `timetransfer`, `hybrid`, `hybrid-ukf`, `fusion`,
|
|
389
|
-
`gnss-ins`, `orbit`, `ephemeris`, `gnss-sim`, `integrity`, `lunar-integrity`, `spoof`,
|
|
450
|
+
`gnss-ins`, `orbit`, `ephemeris`, `gnss-sim`, `integrity`, `lunar-integrity`, `lunar-time-offset`, `spoof`,
|
|
390
451
|
`spoof-detect`, `jamming`, `sweep`, `sweep-nd`, `gravity-map`, `terrain-nav`, `terrain-slam`,
|
|
391
452
|
`combined-altpnt`, `pvt`, `mars-pnt`, `impairment-eval` (AI/ML RF-impairment detection
|
|
392
453
|
evaluation testbed — labelled synthetic corpus + detector-agnostic ROC/AUC harness +
|
|
@@ -402,7 +463,11 @@ plane-change / opportunities), `reentry` (Allen-Eggers ballistic re-entry corrid
|
|
|
402
463
|
`attitude-budget` (3-DOF gravity-gradient torque + RSS pointing error budget),
|
|
403
464
|
`passes` (ground-station rise/set pass prediction — AOS/TCA/LOS, max elevation,
|
|
404
465
|
access), and `link-budget` (one-way CCSDS/DSN link equation — FSPL / Eb·N₀ /
|
|
405
|
-
margin / closure)
|
|
466
|
+
margin / closure); the **lunar-PNT suite** `lunar-vlbi`, `lunar-joint-od-clock`,
|
|
467
|
+
`lunar-frame-realisation`, `moonlight-service-volume`, `lunar-differential-pnt`,
|
|
468
|
+
`lunar-interop-export`; and the **Quantum-Enabled PNT demonstrator**
|
|
469
|
+
`quantum-time-transfer`, `quantum-gnss-free-nav`, `quantum-anomaly-detect` — the
|
|
470
|
+
mission-analysis trio and these later kinds all MODELLED.
|
|
406
471
|
Common fields: `seed`, a `[time]` grid, a `[gnss]` availability timeline (the outage
|
|
407
472
|
driver), and per-sensor blocks with `provenance` strings citing the source of every
|
|
408
473
|
figure. Example (clock):
|
|
@@ -559,7 +624,22 @@ integrity gap — a ~30 m lunar σ_URE drives the protection level well above a
|
|
|
559
624
|
limit, so the service is *unavailable* under aviation-style integrity rules
|
|
560
625
|
(`scenarios/lunanet-araim.toml`).
|
|
561
626
|
|
|
562
|
-
|
|
627
|
+
A `lunar-time-offset` scenario reports the **relativistic Earth–Moon clock rate** — the
|
|
628
|
+
basis of a Lunar Coordinate Time scale (LTC/TCL). A first-principles post-Newtonian
|
|
629
|
+
identity sums the self-potential difference (IAU `L_G` geoid potential minus the Moon's
|
|
630
|
+
surface self-potential) and the Moon's kinetic (second-order Doppler) term to a secular
|
|
631
|
+
rate of ≈ 57 µs/day, reported with the published 56–59 µs/day band; it also gives the
|
|
632
|
+
accumulated LTC−TT offset over a horizon and an inverse-variance ensemble (a lunar
|
|
633
|
+
paper-clock). **MODELLED** — the headline figure is *reference-dependent* (Earth geoid
|
|
634
|
+
vs lunar selenoid, averaging window), which is why a band, not a single certified
|
|
635
|
+
number, is reported (`scenarios/lunar-time-offset.toml`).
|
|
636
|
+
|
|
637
|
+
See `scenarios/` for at least one worked example of every kind (44 kinds, 57 `.toml`
|
|
638
|
+
files — several kinds ship more than one example). A few kinds have an example file
|
|
639
|
+
whose name differs from the kind: `lunar-integrity` → `scenarios/lunanet-araim.toml`,
|
|
640
|
+
`gravity-map` → `scenarios/gps-denied-gravity-nav.toml`. List the dispatchable kinds at
|
|
641
|
+
any time with `cargo run -- --validate <file>` errors, the Python `list_kinds()`, or the
|
|
642
|
+
MCP `list_scenario_kinds` tool.
|
|
563
643
|
|
|
564
644
|
## Output
|
|
565
645
|
|
|
@@ -610,8 +690,14 @@ precession–nutation and the CIO-based GCRS↔ITRS reduction), an **astrodynami
|
|
|
610
690
|
layer** (analytic SGP4/SDP4 **and** a numerical Cowell propagator with its
|
|
611
691
|
EGM2008/perturbation force model, maneuver design, and orbit determination), an
|
|
612
692
|
**integrity/GNSS layer** (RAIM/ARAIM, SBAS, the measurement domain, jamming, cislunar),
|
|
613
|
-
|
|
614
|
-
map-matchers)
|
|
693
|
+
a **fusion / alt-PNT layer** (the GNSS/INS estimators and the gravity/terrain/magnetic
|
|
694
|
+
map-matchers), a **deep-space & lunar layer** (radiometric Mars-PNT and the MODELLED
|
|
695
|
+
lunar PNT suite — LTC time, VLBI, joint OD+clock, frame realisation, service-volume,
|
|
696
|
+
differential PNT, interop), a **mission-analysis layer** (launch / re-entry / coverage /
|
|
697
|
+
pointing / pass / link budgets and the space-weather environment), and the open
|
|
698
|
+
**resilience & AI/ML study layer** (RPCF resilience scoring, the RF-impairment optimism
|
|
699
|
+
gap, and the quantum-enabled PNT demonstrator) whose reproducible artifacts ride the
|
|
700
|
+
validated kernels.
|
|
615
701
|
|
|
616
702
|
Two standalone, **workspace-excluded** crates sit beside the core — `mcp/kshana-mcp`
|
|
617
703
|
(the MCP server, built on the edition-2024 `rmcp` SDK) and `xval/anise-frames` (the
|
|
@@ -633,7 +719,7 @@ flowchart LR
|
|
|
633
719
|
|
|
634
720
|
```mermaid
|
|
635
721
|
flowchart TD
|
|
636
|
-
cli["CLI · Python · WebAssembly · MCP server · JetBrains plugin"] --> api["api — run_toml: typed dispatch over
|
|
722
|
+
cli["CLI · Python · WebAssembly · MCP server · JetBrains plugin"] --> api["api — run_toml: typed dispatch over 44 kinds"]
|
|
637
723
|
subgraph shared["Shared core"]
|
|
638
724
|
types["types · scenario · GNSS timeline"]
|
|
639
725
|
allan["allan — ADEV/MDEV/TDEV/HDEV"]
|
|
@@ -677,14 +763,33 @@ flowchart TD
|
|
|
677
763
|
dso["deepspace_od — reduced-dynamic SRIF"]
|
|
678
764
|
dsm["mars_pnt · gse_sim — relay-PNT + GSE sim"]
|
|
679
765
|
end
|
|
766
|
+
subgraph lunx["Lunar PNT suite (MODELLED)"]
|
|
767
|
+
lsx["lunar_time · lunar_vlbi · lunar_combination — LTC time · geodetic VLBI · joint OD+clock"]
|
|
768
|
+
lsy["lunar_frame_realise · lunar_service · lunar_dpnt · lunar_interop — frame realisation · Moonlight service-volume · differential PNT · LunaNet/IOAG interop"]
|
|
769
|
+
end
|
|
770
|
+
subgraph mission["Mission analysis & environment"]
|
|
771
|
+
ma["launch · reentry · eo_payload · attitude_budget · passes · linkbudget — first-order budgets"]
|
|
772
|
+
sw["space_weather — Jacchia-71 thermospheric density"]
|
|
773
|
+
end
|
|
680
774
|
subgraph io["Interop formats"]
|
|
681
775
|
iofmt["rinex · sp3 · oem · omm · glonass · ccsds_tdm"]
|
|
682
776
|
end
|
|
777
|
+
subgraph resil["Resilience studies & AI/ML — open, reproducible artifacts"]
|
|
778
|
+
tpl["tpl — conditional Timing Protection Level"]
|
|
779
|
+
resc["resilience — RPCF scoring + decision-instability"]
|
|
780
|
+
opt["impairment_eval · impairment_study · impairment_ml · eval_stats — optimism gap"]
|
|
781
|
+
sdrr["sdr · realdata — IQ/IF front end + ingest adapters"]
|
|
782
|
+
cross["crossover · quantum_trade — quantum-vs-classical map + trade"]
|
|
783
|
+
qd["quantum_devices · quantum_faults · quantum_nav_od · qtrade · timetransfer_chain · representativeness — Quantum-Enabled PNT demonstrator"]
|
|
784
|
+
end
|
|
785
|
+
gen["study generators<br/>cargo run --example/--bin"] --> resil
|
|
683
786
|
api --> packs
|
|
684
787
|
api --> astro
|
|
685
788
|
api --> intg
|
|
686
789
|
api --> fnav
|
|
687
790
|
api --> ds
|
|
791
|
+
api --> lunx
|
|
792
|
+
api --> mission
|
|
688
793
|
packs --> shared
|
|
689
794
|
astro --> frames
|
|
690
795
|
orbit --> sgp4
|
|
@@ -701,6 +806,10 @@ flowchart TD
|
|
|
701
806
|
p4 -. composes .-> p1
|
|
702
807
|
p4 -. composes .-> p2
|
|
703
808
|
p4 -. composes .-> p3
|
|
809
|
+
tpl -. uses .-> allan
|
|
810
|
+
resc -. uses .-> intg
|
|
811
|
+
opt -. uses .-> sdrr
|
|
812
|
+
cross -. uses .-> packs
|
|
704
813
|
```
|
|
705
814
|
|
|
706
815
|
**Components & distribution.** The core crate ships through the Rust, Python, and
|
|
@@ -733,13 +842,14 @@ flowchart LR
|
|
|
733
842
|
```
|
|
734
843
|
kshana/
|
|
735
844
|
├── src/ # the kshana core crate (library + CLI)
|
|
736
|
-
│ ├── api.rs · main.rs · lib.rs # typed dispatch (
|
|
845
|
+
│ ├── api.rs · main.rs · lib.rs # typed dispatch (44 kinds) + CLI + crate root
|
|
737
846
|
│ ├── python.rs · wasm.rs # optional PyO3 / wasm-bindgen bindings
|
|
738
847
|
│ ├── types.rs · scenario.rs · allan.rs # shared core (time grid, GNSS timeline, Allan)
|
|
739
848
|
│ │
|
|
740
849
|
│ ├── models.rs · estimator.rs · kalman.rs # Pack 1 — clock holdover + integrity
|
|
741
850
|
│ ├── security.rs · detection.rs · spoof.rs · spoof_monitors.rs # spoof detection
|
|
742
|
-
│ ├── filter_health.rs · fom.rs · report.rs · chart.rs · run.rs # health · scoring · output
|
|
851
|
+
│ ├── filter_health.rs · fom.rs · fom_label.rs · report.rs · chart.rs · run.rs # health · FoM scoring + labelling · output
|
|
852
|
+
│ ├── suite.rs · study.rs # scenario suites + aggregated multi-scenario study artifacts (`--study`)
|
|
743
853
|
│ ├── inertial/ # Pack 2 — strapdown INS (attitude · mechanization · imu_errors · quantum_imu)
|
|
744
854
|
│ ├── timetransfer.rs · timetransfer_adv.rs · timegeo.rs # Pack 3 — TWSTFT/CV/PPP/optical, Sagnac
|
|
745
855
|
│ ├── hybrid.rs · ensemble.rs · sweep.rs # Pack 4 — fused PNT, Monte-Carlo, trade sweeps
|
|
@@ -751,7 +861,8 @@ kshana/
|
|
|
751
861
|
│ ├── orbit.rs · sgp4.rs · tle.rs · walker.rs # geometry, SGP4/SDP4, TLE, Walker design
|
|
752
862
|
│ ├── propagator.rs · forces.rs · gravity_sh.rs · integrator.rs # Cowell + perturbations (EGM2008 d/o70, GR) + RK4/DOPRI
|
|
753
863
|
│ ├── maneuver.rs · batch_ls.rs · orbit_determination.rs # burns/Lambert/porkchop, Gauss-Newton, OD
|
|
754
|
-
│ ├── cr3bp.rs · lunar.rs
|
|
864
|
+
│ ├── cr3bp.rs · lunar.rs · lunar_frame.rs · lunar_od.rs # Earth–Moon CR3BP + halo/NRHO STM corrector, cislunar/LunaNet ARAIM, MCI↔MCMF, lunar OD
|
|
865
|
+
│ ├── lunar_time.rs · lunar_vlbi.rs · lunar_combination.rs · lunar_frame_realise.rs · lunar_service.rs · lunar_dpnt.rs · lunar_interop.rs # MODELLED lunar PNT suite — LTC time · geodetic VLBI · joint OD+clock · frame realisation · Moonlight service-volume · differential PNT · LunaNet/IOAG interop export
|
|
755
866
|
│ ├── body.rs · mars_frame.rs · ephem_provider.rs · radiometric.rs · ccsds_tdm.rs # deep-space: multi-body · Mars frame · ephemeris seam · radiometric obs + CCSDS-TDM
|
|
756
867
|
│ ├── deepspace_od.rs · clock_state.rs · mars_atmos.rs · mars_pnt.rs · linkbudget.rs · gse_sim.rs # SRIF OD · onboard clock · Mars drag · relay-PNT · link budget · GSE sim
|
|
757
868
|
│ │
|
|
@@ -762,15 +873,21 @@ kshana/
|
|
|
762
873
|
│ ├── gravimeter.rs · igrf.rs · mapmatch.rs · particle_filter.rs · altpnt/ # gravity/magnetic/terrain alt-PNT
|
|
763
874
|
│ ├── rinex.rs · rinex_obs.rs · glonass.rs · sp3.rs · oem.rs · omm.rs · permalink.rs # interop formats
|
|
764
875
|
│ ├── launch.rs · reentry.rs · eo_payload.rs · attitude_budget.rs · passes.rs · space_packet.rs # mission-analysis budgets + CCSDS Space Packet
|
|
765
|
-
│ ├── space_weather.rs · holdover.rs
|
|
766
|
-
│ ├──
|
|
876
|
+
│ ├── space_weather.rs · holdover.rs · tpl.rs # space-weather environment · GNSS-denied clock-holdover calculator · conditional Timing Protection Level (under spoofing)
|
|
877
|
+
│ ├── resilience/ # framework-aligned PNT-resilience scoring + decision-instability study (RPCF · Dirichlet · Kendall-τ · diversity collapse · assurance report)
|
|
878
|
+
│ ├── impairment_eval.rs · impairment_study.rs · impairment_ml.rs · eval_stats.rs # AI/ML RF-impairment eval testbed · optimism-gap study · LR/MLP detectors · bootstrap/DeLong/Spearman stats
|
|
879
|
+
│ ├── sdr.rs · realdata/ # software-defined-receiver front end (IQ/IF → E/P/L taps → SQM) + real-data ingest adapters (RINEX · UBX · GnssLogger · JammerTest · Yunnan · SatGrid)
|
|
880
|
+
│ ├── crossover.rs · quantum_trade.rs · frugal.rs · integrity_impact.rs # quantum-vs-classical crossover map · PNT trade · cost-per-coverage ROI · integrity impact
|
|
881
|
+
│ ├── quantum_devices.rs · quantum_faults.rs · quantum_nav_od.rs · qtrade.rs · timetransfer_chain.rs · representativeness.rs # Quantum-Enabled PNT demonstrator — device error models · fault catalogue · GNSS-free quantum OD · unified trade harness · quantum time-transfer chain · representativeness / gaps-to-flight ledger
|
|
767
882
|
│ ├── interchange.rs · verification.rs # KIF artifact envelope · machine-checked verification matrix
|
|
768
|
-
│ └── bin/validation_report.rs
|
|
883
|
+
│ └── bin/crossover_study.rs · bin/validation_report.rs # crossover-study artifact generator · release validation-summary HTML
|
|
769
884
|
│
|
|
770
885
|
├── mcp/kshana-mcp/ # standalone, workspace-EXCLUDED crate — the MCP server (+ Dockerfile, server.json)
|
|
771
886
|
├── ide/jetbrains/ # standalone Kotlin/Gradle IntelliJ-Platform plugin
|
|
772
887
|
├── xval/anise-{frames,lunar-od,mars-od}/ # standalone, workspace-EXCLUDED ANISE/SPICE cross-checks (frames · lunar DE440 · Mars DE440)
|
|
773
888
|
│
|
|
889
|
+
├── examples/ # reproducible study generators: tpl_jammertest · resilience_report · optimism_study + real-data probes (jammertest_probe · yunnan_probe · satgrid_probe · texbat_probe · ingest_realdata)
|
|
890
|
+
├── paper-artifacts/ # byte-deterministic study artifacts, regenerable from examples/ (optimism-study.json · resilience-study.json); raw datasets stay out
|
|
774
891
|
├── scenarios/ # one cited .toml per kind + geometry-driven + GPS-denied
|
|
775
892
|
├── scripts/ # reproducibility + repo-hygiene + SBOM guards
|
|
776
893
|
├── docs/ # CONCEPTS, ARCHITECTURE, CAPABILITY, VALIDATION, PROVENANCE, GLOSSARY, …
|
|
@@ -830,12 +947,14 @@ kshana/
|
|
|
830
947
|
|
|
831
948
|
### Validation at a glance
|
|
832
949
|
|
|
833
|
-
Every row is enforced by a named test in CI
|
|
834
|
-
|
|
950
|
+
Every row is enforced by a named test in CI. This table is a **curated highlight**;
|
|
951
|
+
the full machine-checked matrix is **61 rows — 15 VALIDATED, 42 MODELLED, 4 PARTNER**
|
|
952
|
+
(`src/verification.rs`), with the complete evidence (and what is honestly *not* yet
|
|
953
|
+
validated) in [`docs/VALIDATION.md`](docs/VALIDATION.md) and the per-release
|
|
835
954
|
[`kshana-validation-summary.html`](https://github.com/AshfordeOU/kshana/releases)
|
|
836
955
|
artifact (generated by `cargo run --bin validation_report`, SLSA-attested).
|
|
837
956
|
|
|
838
|
-
The **Status** column states the *kind* of evidence, matching the validation ladder above: **VALIDATED** = checked against an independent external oracle (real data, an independent library, or published reference vectors); **MODELLED** = checked against analytic truth or simulation self-consistency (no independent external dataset). VALIDATED describes the *method* of checking, not a pass/fail — an honest miss against real data (the LRO row) is still VALIDATED. `CI` rows are process guards, not figures of merit.
|
|
957
|
+
The **Status** column states the *kind* of evidence, matching the validation ladder above: **VALIDATED** = checked against an independent external oracle (real data, an independent library, or published reference vectors); **MODELLED** = checked against analytic truth or simulation self-consistency (no independent external dataset). VALIDATED describes the *method* of checking, not a pass/fail — an honest miss against real data (the LRO row) is still VALIDATED. `CI` rows are process guards, not figures of merit. A few real-data islands (the measured caesium clock, Stable32 PHASE.DAT, and the OPS-SAT/ICGEM checks where the raw inputs carry no redistribution licence) are **data-gated**: the test prints a skip notice and stays green when the input is absent, and the public reference numbers are committed under `tests/fixtures/`. Reproduce the raw inputs with the matching `scripts/fetch_*.sh`.
|
|
839
958
|
|
|
840
959
|
| Status | Capability | Agreement | Reference / oracle |
|
|
841
960
|
|--------|------------|-----------|--------------------|
|
|
@@ -843,7 +962,10 @@ The **Status** column states the *kind* of evidence, matching the validation lad
|
|
|
843
962
|
| **VALIDATED** | Reference frames — IAU 2000A/B nutation, IAU 2006/2000A CIO chain, ERA | **bit-for-bit** (X,Y to 1e-14, s to 1e-18, ERA to 1e-12) | ERFA/SOFA `eraXys06a` · `eraC2ixys` · `eraEra00` · `eraNut00a/b` |
|
|
844
963
|
| **VALIDATED** | GCRS→ITRS vs an independent SPICE engine | max **0.028″** → ≤ 0.86 m ground, ≤ 3.6 m GNSS orbit | ANISE (pure-Rust NAIF/SPICE), same IERS `finals2000A` EOP, 8 epochs 2020–2023 |
|
|
845
964
|
| **MODELLED** | EGM2008 geopotential (degree/order 70) | acceleration = ∇V to **< 1e-6**; zonal collapse to validated J2 | NGA EGM2008 coefficients + analytic ∇V identity |
|
|
965
|
+
| **VALIDATED** | Gravity-functional synthesis (gravity-aided / GNSS-free nav map) | GRS80 Somigliana + γ_e/γ_p to **3.5e-12**; real EGM2008 disturbance map physical (RMS ≈ 26 mGal, d/o 70) | GRS80 (Moritz 1980, IAG) Somigliana normal gravity + real ICGEM EGM2008 (`tests/icgem_gravity_reference.rs`) |
|
|
846
966
|
| **VALIDATED** | Allan estimators (ADEV/MDEV/TDEV/HDEV) + confidence bands | reproduce reference deviations; χ² bands match | NIST SP 1065 (Riley), 1000-point Table 31/32 |
|
|
967
|
+
| **VALIDATED** | Allan estimators on a **real measured caesium clock** | OADEV/OHDEV to **1e-3** (observed ≤ 3e-5), 16 averaging factors | Stable32 on a real 5071A Cs vs H-maser, 556,990 pts (`tests/cs5071a_reference.rs`, data-gated) |
|
|
968
|
+
| **VALIDATED** | Allan estimators on the **canonical Stable32 PHASE.DAT** | OADEV/MDEV/TDEV to **1e-3** (observed ≤ 5e-5), 139 averaging factors | Stable32 reference deviations for PHASE.DAT (`tests/phasedat_reference.rs`, data-gated) |
|
|
847
969
|
| **MODELLED** | IMU error model — ARW / VRW / bias-instability | recovered to **< 5 %** (bias-instability < 15 %) | Analog Devices ADIS16465 datasheet; NaveGo reference profile |
|
|
848
970
|
| **MODELLED** | Numerical (Cowell) propagator, unperturbed | **sub-metre over 24 h**; energy/momentum conserve ~1e-9 | exact universal-variable Kepler |
|
|
849
971
|
| **MODELLED** | Lambert · Tsiolkovsky · porkchop | round-trip to two-body truth; ΔV **< 0.01 %** | Izzo 2015 · rocket equation · analytic Hohmann floor |
|
|
@@ -863,7 +985,11 @@ The **Status** column states the *kind* of evidence, matching the validation lad
|
|
|
863
985
|
| **VALIDATED** | ARAIM dual-constellation integrity | constellation-wide fault mode on real GPS + Galileo | EU ARAIM TR / DO-316; Celestrak `gps-ops` 2021-07-28 |
|
|
864
986
|
| **VALIDATED** | GNSS geometry / DOP (GDOP/PDOP/HDOP/VDOP/TDOP) | match to **1e-6 relative** across 8 geometries (well-conditioned → near-singular) | gnss_lib_py 1.0.4 (Stanford NAV Lab) — independent library (`tests/dop_reference.rs`) |
|
|
865
987
|
| **VALIDATED** | ML detector-evaluation metrics (AUC/ROC/confusion/Pd-Pmd/precision/F1) | **exact counts + < 1e-9** over 5 datasets × 24 thresholds | scikit-learn 1.9.0 (Pedregosa et al., JMLR 2011) — independent library (`tests/eval_metrics_reference.rs`) |
|
|
988
|
+
| **VALIDATED** | Anomaly-detection ROC AUC on **real ESA OPS-SAT telemetry** | AUC reproduces scikit-learn to **< 1e-9**; peak-count detector AUC **≈ 0.85** on the labelled test split | scikit-learn `roc_auc_score` on the OPSSAT-AD test split (Ruszczak et al. 2025, CC BY 4.0) — real OPS-SAT telemetry (`tests/opssat_ad_reference.rs`) |
|
|
866
989
|
| **VALIDATED** | Quantum-trade numerical kernels (ADEV NNLS fit · χ² consistency bands · van-Loan clock Q) | NNLS + Q **exact**; χ² **< 5e-4** at operating dof ≥ 48 | scipy 1.17.1 — `optimize.nnls` / `stats.chi2.ppf` / `linalg.expm` (`tests/scipy_reference.rs`) |
|
|
990
|
+
| **MODELLED** | Conditional Timing Protection Level (holdover-limited undetected time error under spoofing) | composition reproduces the multi-step `clock_state` covariance recursion; calibrated on a real recorded spoof | JammerTest 2024 (Zenodo 15911589) scalars + van-Loan / CUSUM closed forms (`examples/tpl_jammertest`) |
|
|
991
|
+
| **MODELLED** | PNT-resilience scoring + decision-instability | 35 hand-derived oracle tests; byte-deterministic study artifact (fixed seed) | DHS RPCF v2.0 mapping + Dirichlet / Kendall-τ / Hill-N2 closed forms — synthetic architectures, not a certification |
|
|
992
|
+
| **MODELLED** | RF-impairment optimism-gap study (scaling laws + leave-one-out predictor) | permutation-null significance; byte-deterministic artifact (5 seeds) | synthetic parameter-grounded corpus — the eval *metrics* are VALIDATED vs scikit-learn (above); the study is MODELLED |
|
|
867
993
|
| CI | Cross-platform reproducibility | bit-identical input + shape goldens on 3 OSes | Linux / macOS / Windows CI matrix, SHA-256 goldens |
|
|
868
994
|
| CI | Test coverage | **~96 % line** on `src/`, gated ≥ 85 % | cargo-tarpaulin (LLVM engine) |
|
|
869
995
|
|
|
@@ -963,12 +1089,19 @@ entry for every user-visible change. Participation is governed by our
|
|
|
963
1089
|
|
|
964
1090
|
If you use Kshana in academic or technical work, please cite it. Machine-readable
|
|
965
1091
|
metadata is in [`CITATION.cff`](CITATION.cff) (GitHub renders a "Cite this repository"
|
|
966
|
-
button from it); cite the version you used (e.g. `v0.
|
|
1092
|
+
button from it); cite the version you used (e.g. `v0.21.0`) together with the
|
|
967
1093
|
scenario and seed for full reproducibility. Every release is archived on Zenodo with
|
|
968
1094
|
a citable DOI — the concept DOI [10.5281/zenodo.20528627](https://doi.org/10.5281/zenodo.20528627)
|
|
969
1095
|
always resolves to the latest version.
|
|
970
1096
|
|
|
971
|
-
> Baweja, C. (2026). *Kshana — a PNT-resilience simulator with quantum-sensor performance models*. Ashforde
|
|
1097
|
+
> Baweja, C. (2026). *Kshana — a PNT-resilience simulator with quantum-sensor performance models*. [Ashforde OÜ](https://ashforde.org). https://doi.org/10.5281/zenodo.20528627
|
|
1098
|
+
|
|
1099
|
+
**Related publications.** Studies built on the open engine are written up separately; their
|
|
1100
|
+
numbers regenerate from the [reproducible study artifacts](#reproducible-study-artifacts) above.
|
|
1101
|
+
|
|
1102
|
+
> Baweja, C. (2026). *Anticipating the Optimism Gap: Predicting Distribution-Shift Degradation of RF-Impairment Detectors from In-Distribution Statistics*. arXiv:2606.22054. https://doi.org/10.48550/arXiv.2606.22054
|
|
1103
|
+
>
|
|
1104
|
+
> Baweja, C. (2026). *A Conditional Timing Protection Level: Holdover-Limited Undetected Time Error Under GNSS Spoofing*. arXiv:2606.24210. https://doi.org/10.48550/arXiv.2606.24210
|
|
972
1105
|
|
|
973
1106
|
## Versioning & releases
|
|
974
1107
|
|
|
@@ -981,7 +1114,7 @@ the [`CHANGELOG.md`](CHANGELOG.md). Every result is reproducible from
|
|
|
981
1114
|
|
|
982
1115
|
| Channel | Install / get | Contents |
|
|
983
1116
|
|---------|---------------|----------|
|
|
984
|
-
| [crates.io](https://crates.io/crates/kshana) | `cargo install kshana` · `kshana = "0.
|
|
1117
|
+
| [crates.io](https://crates.io/crates/kshana) | `cargo install kshana` · `kshana = "0.20"` | Rust library + CLI |
|
|
985
1118
|
| [crates.io](https://crates.io/crates/kshana-mcp) | `cargo install kshana-mcp` | the MCP server |
|
|
986
1119
|
| [PyPI](https://pypi.org/project/kshana/) | `pip install kshana` | abi3 wheels (Linux/macOS/Windows) + sdist |
|
|
987
1120
|
| [npm](https://www.npmjs.com/package/kshana) | `npm install kshana` | WebAssembly module + JS wrapper |
|
|
@@ -1027,7 +1160,7 @@ own. For organisations that need more, Ashforde OÜ offers:
|
|
|
1027
1160
|
|
|
1028
1161
|
This is the open-core model: the engine is, and stays, openly licensed; the sustaining
|
|
1029
1162
|
business is expertise, support, and the proprietary extensions — not license fees.
|
|
1030
|
-
Contact **contact@ashforde.org
|
|
1163
|
+
Contact **contact@ashforde.org** · [ashforde.org](https://ashforde.org).
|
|
1031
1164
|
|
|
1032
1165
|
## Key references
|
|
1033
1166
|
|
package/kshana_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED