1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
// SPDX-License-Identifier: AGPL-3.0-only
// Panic-surface gate: a bare `.unwrap()` in non-test code is a lint. Combined with the
// CI `-D warnings`, this makes any new `.unwrap()` outside `#[cfg(test)]` fail the build.
// Retained non-test panics use `.expect("<provable invariant>")` instead, which carries
// the proof in-source; `expect_used` is intentionally NOT enabled.
#![cfg_attr(not(test), warn(clippy::unwrap_used))]
// Memory-safety gate: the crate has never contained an `unsafe` block, fn, impl or
// extern, and this makes that a compiler-enforced property rather than an accident of
// discipline. Unguarded on purpose: the pyo3 (`--features python`) and wasm-bindgen
// (`--features wasm`) macro expansions both compile clean under it, and the wheel is
// the one surface where FFI would ever plausibly be introduced, so exempting it would
// exempt the only place that matters.
#![forbid(unsafe_code)]
//! # 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_toml`] is 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_kinds`] is the machine-readable catalogue of the
//! built-in scenario kinds, each with its description and required/optional
//! fields — the same catalogue the [`docs/SCENARIOS.md`] reference is generated
//! from.
//!
//! [`docs/SCENARIOS.md`]: https://github.com/AshfordeOU/kshana/blob/main/docs/SCENARIOS.md
//!
//! ## 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`](verification::VerificationStatus::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`](verification::VerificationStatus::Modelled) — implemented from
//! published or first-principles physics with tests, but not checked against an
//! external oracle to a stated tolerance.
//! * [`PartnerOwned`](verification::VerificationStatus::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.
//!
//! [`docs/EQUATIONS.md`]: https://github.com/AshfordeOU/kshana/blob/main/docs/EQUATIONS.md
pub mod acquisition;
pub mod adm;
pub mod advanced_report;
pub mod allan;
pub mod altpnt;
pub mod animation;
pub mod antenna;
pub mod aocs;
pub mod aocs_kind;
pub mod aocs_mekf;
pub mod aperture_duty;
pub mod api;
pub mod araim_reference;
pub mod assurance;
pub mod attack_surface;
pub mod attitude_budget;
pub mod attitude_dynamics;
pub mod batch_ls;
pub mod benchmark;
pub mod body;
pub mod body_pnt;
pub mod bplane;
/// The bundled reference scenarios, present only with the `bundled-scenarios` feature.
#[cfg(feature = "bundled-scenarios")]
pub mod bundled_scenarios;
/// Calibration ensembles (CAP-10): single-seed checks re-run over many seeds.
pub mod calibration_ensembles;
pub mod campaign;
pub mod ccsds_tdm;
/// The optional Celeste IOD preset: compiled in only when `src/celeste_iod.rs` exists.
#[cfg(kshana_celeste)]
pub mod celeste_iod;
pub mod chart;
pub mod cio;
mod cio_s06_data;
pub mod cislunar_arc_recovery;
pub mod cislunar_observability;
pub mod cislunar_srif;
pub mod clock_integrity;
pub mod clock_library;
pub mod clock_log;
pub mod clock_specs;
pub mod clock_state;
pub mod compliance;
pub mod conflict_resilience;
pub mod conflict_threat_params;
pub mod constellation;
pub mod contact_schedule;
pub mod cr3bp;
/// Not validated (finding, 0.36): see the module's Status section. Hidden from the documented API.
#[doc(hidden)]
pub mod cr3bp_family;
pub mod cross_raim;
pub mod cross_sensor_integrity;
pub mod crossover;
pub mod crpa;
pub mod cw_dynamics;
pub mod deepspace_od;
pub mod detection;
pub mod dop_error_ci;
pub mod dop_error_mc;
pub mod dro;
pub mod earth_gnss_lunar;
pub mod egm2008_data;
pub mod ensemble;
pub mod entry_eo_ascent;
pub mod eo_payload;
pub mod eop;
/// Least-squares plus autoregressive Earth-orientation prediction with the zonal tides removed.
pub mod eop_ls_ar;
pub mod ephem;
pub mod ephem_provider;
pub mod ephemeris;
pub mod estimator;
pub mod eval_stats;
mod fes2004_data;
pub mod field_schema;
pub mod filter_health;
pub mod fim;
pub mod fom;
pub mod fom_label;
pub mod forces;
pub mod frame_eop;
pub mod frames;
pub mod frugal;
pub mod fusion;
pub mod geolocation;
pub mod geometry;
pub mod glonass;
pub mod gnss_navmsg;
pub mod gnss_sim;
pub mod gps_lnav;
pub mod gravimeter;
pub mod gravity_pds;
pub mod gravity_sh;
pub mod gse_sim;
pub mod handoff;
pub mod hatch;
pub mod holdover;
pub mod hybrid;
pub mod hybrid_integrity;
pub mod igrf;
mod igrf_data;
pub mod impairment_eval;
pub mod impairment_ml;
pub mod impairment_study;
pub mod inertial;
pub mod inline_only;
pub mod integrator;
pub mod integrity;
pub mod integrity_impact;
pub mod interchange;
pub mod interop;
pub mod intersat_range;
pub mod ionex;
pub mod iq;
pub mod jamming;
pub mod jamming_rx;
pub mod jamming_terrain;
pub mod jd2;
pub mod kalman;
pub mod kepler;
pub mod lambda;
pub mod launch;
pub mod leo_fusion;
pub mod leo_link;
pub mod leo_navmsg;
pub mod leo_pass;
pub mod leo_pnt_chain;
pub mod leo_signal;
pub mod linalg_sr;
pub mod linkbudget;
pub mod lunar;
pub mod lunar_afs;
pub mod lunar_beacon;
pub mod lunar_combination;
pub mod lunar_common_mode;
pub mod lunar_datum;
pub mod lunar_dpnt;
pub mod lunar_ephemeris;
pub mod lunar_faultobs;
pub mod lunar_frame;
pub mod lunar_frame_campaign;
pub mod lunar_frame_predict;
pub mod lunar_frame_realise;
pub mod lunar_gauge;
pub mod lunar_identifiability;
pub mod lunar_interop;
pub mod lunar_interop_budget;
pub mod lunar_jamming;
pub mod lunar_llr;
pub mod lunar_llr_geometry;
pub mod lunar_od;
pub mod lunar_orientation;
pub mod lunar_perturbed;
pub mod lunar_receiver;
pub mod lunar_service;
pub mod lunar_solution;
pub mod lunar_station;
pub mod lunar_techniques;
pub mod lunar_terrain;
pub mod lunar_time;
pub mod lunar_time_budget;
pub mod lunar_time_budget_scenario;
pub mod lunar_time_lab;
pub mod lunar_vlbi;
/// Station-coordinate covariance from a lunar-VLBI schedule: the delay partials of
/// [`lunar_vlbi`] accumulated over baselines and epochs into a Fisher information matrix.
pub mod lunar_vlbi_fim;
pub mod maneuver;
pub mod mapmatch;
pub mod mars_atmos;
pub mod mars_frame;
pub mod mars_od;
pub mod mars_pnt;
pub mod mcda;
pub mod models;
pub mod monitor_network;
pub mod naif_kernel;
pub mod navsignal;
pub mod ndm_xml;
pub mod nma_budget;
pub mod nrlmsise00;
mod nrlmsise00_data;
pub mod nutation;
mod nutation_iau2000a_data;
pub mod observability_gramian;
pub mod odf;
pub mod odm;
pub mod oem;
pub mod omm;
pub mod optical_atmosphere;
pub mod optical_atmosphere_scenario;
pub mod optical_availability;
pub mod optical_linkbudget;
pub mod optical_outage_holdover;
pub mod optical_sitediv;
pub mod optical_techniques;
pub mod optical_weather;
pub mod orbit;
pub mod orbit_determination;
pub mod orbital_timing;
pub mod osnma;
pub mod palette;
pub mod particle_filter;
pub mod passes;
pub mod permalink;
// Transcendental functions that return the same bits on every platform, for the
// modules whose output is discrete (an encoded frame) and must not depend on the host.
pub mod interference_map;
pub mod nmea_synth;
mod portable_distr;
mod portable_distr_tables;
#[doc(hidden)]
pub mod portable_math;
pub mod powerlaw;
pub mod ppp_real;
pub mod precession;
pub mod precise_od;
pub mod precise_products;
pub mod propagator;
pub mod pvt;
#[cfg(feature = "python")]
pub mod python;
pub mod qtrade;
pub mod quantum_devices;
pub mod quantum_faults;
pub mod quantum_nav_od;
pub mod quantum_trade;
pub mod radiometric;
pub mod raim;
pub mod realdata;
pub mod realtime_frame_eop;
pub mod receiver_trust;
pub mod reentry;
pub mod registry;
pub mod report;
pub mod representativeness;
pub mod resilience;
pub mod rinex;
pub mod rinex_obs;
pub mod rtk_real;
pub mod run;
pub mod sbas;
pub mod scenario;
pub mod sdr;
pub mod security;
pub mod sgp4;
pub mod sigmf;
pub mod skyline;
pub mod slot_timing;
pub mod solar_system;
pub mod sp3;
pub mod space_packet;
pub mod space_weather;
pub mod spectrum;
pub mod spk_writer;
pub mod spoof;
pub mod spoof_capture;
pub mod spoof_detect;
pub mod spoof_monitors;
/// Box-wing flat-plate and ECOM2 solar radiation pressure (opt-in; DS-PA-14).
pub mod srp_boxwing;
pub mod srp_shadow;
pub mod study;
pub mod suite;
pub mod surface;
pub mod sweep;
pub mod telecom_timing;
// Comparison helpers shared by the byte-identity guards. Test-only: it exists so those
// guards can assert the exact pin where it is true and a portable one everywhere else.
pub mod evidence;
pub mod telemetry;
#[cfg(test)]
mod test_support;
pub mod tides;
pub mod time_transfer_budget;
pub mod timegeo;
pub mod timescales;
pub mod timetransfer;
pub mod timetransfer_adv;
pub mod timetransfer_chain;
pub mod tle;
pub mod tpl;
pub mod tracking_loop;
pub mod twstft_budget;
pub mod types;
pub mod utck_bound;
pub mod verification;
pub mod wahba;
pub mod walker;
#[cfg(feature = "wasm")]
pub mod wasm;
mod worldmap;