kshana 0.7.0 → 0.9.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 +98 -32
- package/kshana_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/assets/kshana-mark.svg" alt="Kshana mark — a precision reticle hung from the Devanagari shirorekha" width="104" height="104">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
<h1 align="center">
|
|
2
6
|
<img src="docs/assets/kshana-banner.svg" alt="Kshana — the precise instant. Open, reproducible hybrid quantum/classical PNT performance simulation." width="760">
|
|
3
7
|
</h1>
|
|
4
8
|
|
|
9
|
+
<p align="center"><em><strong>Kshana</strong> · <span lang="sa">क्षण</span> — Sanskrit for <em>the precise instant</em>, the smallest measure of time.</em></p>
|
|
10
|
+
|
|
5
11
|
<p align="center">
|
|
12
|
+
<a href="https://ashfordeou.github.io/kshana/"><img src="https://img.shields.io/badge/playground-try%20in%20browser-2dd4bf" alt="Live playground — run in your browser, no install"></a>
|
|
13
|
+
<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>
|
|
6
14
|
<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>
|
|
7
15
|
<a href="https://github.com/ashfordeOU/kshana/releases"><img src="https://img.shields.io/github/v/release/ashfordeOU/kshana?sort=semver" alt="Release"></a>
|
|
8
16
|
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache-2.0"></a>
|
|
@@ -11,7 +19,10 @@
|
|
|
11
19
|
|
|
12
20
|
<p align="center">
|
|
13
21
|
<strong>Kshana</strong> (क्षण, Sanskrit: <em>"the precise instant"</em>) is an open, reproducible
|
|
14
|
-
|
|
22
|
+
<strong>PNT-resilience simulator with quantum-sensor performance models</strong> —
|
|
23
|
+
positioning, navigation, and timing. It compares quantum and classical sensors using
|
|
24
|
+
published Allan/noise-budget coefficients; it is not a first-principles quantum-physics
|
|
25
|
+
simulator (see <a href="docs/QUANTUM-MODELS.md">docs/QUANTUM-MODELS.md</a>).
|
|
15
26
|
</p>
|
|
16
27
|
|
|
17
28
|
It quantifies, in hard and reproducible numbers, what quantum clocks, quantum
|
|
@@ -23,20 +34,36 @@ and every sensor parameter is traceable to a published source.
|
|
|
23
34
|
*Free and open source under Apache-2.0, professionally developed and maintained by
|
|
24
35
|
Ashforde OÜ — commercial support, integration, and proprietary extensions available.*
|
|
25
36
|
|
|
26
|
-
> **Status:
|
|
27
|
-
> operational figures of merit (including a clock-
|
|
28
|
-
>
|
|
29
|
-
>
|
|
30
|
-
>
|
|
31
|
-
>
|
|
32
|
-
>
|
|
33
|
-
>
|
|
34
|
-
>
|
|
35
|
-
>
|
|
36
|
-
>
|
|
37
|
+
> **Status: v0.9.0 — a simulation substrate, not yet a product.** Four sensor packs
|
|
38
|
+
> that each report all six operational figures of merit (including a clock-stability-based
|
|
39
|
+
> spoof-*detectability* bound — analytic, meaningful only with a configured attack —
|
|
40
|
+
> demonstrated by an active spoofing-attack scenario), two independent Kalman error
|
|
41
|
+
> budgets (clock and position) reported as a combined FoM, and a filter
|
|
42
|
+
> self-consistency bound, multi-constellation geometry-derived GNSS availability *and*
|
|
43
|
+
> dilution of precision from orbits — synthetic Walker, Keplerian mean elements, or
|
|
44
|
+
> full two-line element sets propagated with **SGP4/SDP4** (validated against the AIAA
|
|
45
|
+
> 2006-6753 vectors) — a single-axis (1-DOF) IMU error budget in the shipped
|
|
46
|
+
> inertial pack (velocity/angle random walk and bias-instability), Monte Carlo
|
|
47
|
+
> confidence bands, trade-study parameter sweeps, and a shareable HTML scorecard.
|
|
48
|
+
> As of v0.9.0 the library also carries a genuine **three-axis strapdown INS**
|
|
49
|
+
> (quaternion attitude, WGS-84 NED mechanization, coning/sculling, a five-term IMU
|
|
50
|
+
> error model), a **loosely-coupled GNSS/INS error-state EKF** with closed-loop
|
|
51
|
+
> feedback, **real snapshot and solution-separation (ARAIM-style) RAIM** with
|
|
52
|
+
> HPL/VPL and a runnable `integrity` scenario, and **RINEX-3 GPS ephemeris
|
|
53
|
+
> ingestion** (broadcast orbit + clock). All calibrated to published data and
|
|
54
|
+
> validated against the standard relations, with optional Python and WebAssembly
|
|
55
|
+
> bindings and a browser playground. Read [`docs/VALIDATION.md`](docs/VALIDATION.md)
|
|
37
56
|
> before citing any number — each noise term is labelled `validated` or `not modeled`,
|
|
38
57
|
> and optical-clock figures are *space goals on ground hardware* (no strontium optical
|
|
39
|
-
> clock has flown).
|
|
58
|
+
> clock has flown). What it is still **not**: the shipped `inertial` scenario pack
|
|
59
|
+
> remains the 1-DOF budget (the three-axis navigator is library-level, not yet wired
|
|
60
|
+
> into a pack); the GNSS/INS filter is *loosely* coupled only (tight/pseudorange
|
|
61
|
+
> coupling is a documented stub); the RAIM is real but **not** formally certified to
|
|
62
|
+
> DO-229/DO-178C aviation standards; and the quantum models are phenomenological, not
|
|
63
|
+
> a first-principles quantum simulator. The full
|
|
64
|
+
> honest scope map is in [`docs/CAPABILITY.md`](docs/CAPABILITY.md); see also
|
|
65
|
+
> [`docs/INTEGRITY.md`](docs/INTEGRITY.md) and the claims table in
|
|
66
|
+
> [`docs/VALIDATION.md`](docs/VALIDATION.md).
|
|
40
67
|
|
|
41
68
|
> **Try it in your browser:** the [playground](web/) runs the engine client-side as
|
|
42
69
|
> WebAssembly — pick a scenario, edit the parameters, and see the result, with nothing
|
|
@@ -148,6 +175,7 @@ cargo run -- scenarios/timetransfer.toml
|
|
|
148
175
|
cargo run -- scenarios/hybrid-pnt.toml
|
|
149
176
|
cargo run -- scenarios/orbit-gnss-challenged.toml
|
|
150
177
|
cargo run -- scenarios/orbit-sgp4-gps.toml
|
|
178
|
+
cargo run -- scenarios/integrity-raim.toml
|
|
151
179
|
```
|
|
152
180
|
|
|
153
181
|
Example output (clock holdover — note the Integrity and Security figures of merit):
|
|
@@ -163,6 +191,20 @@ spoof-detection margin (`security 0.000`). The orbit scenario additionally repor
|
|
|
163
191
|
geometry block — fraction of samples with a fix, and best/median PDOP and position
|
|
164
192
|
accuracy — alongside the clock result.
|
|
165
193
|
|
|
194
|
+
> **Read these two numbers carefully.** `security` is an *analytic spoof-detectability
|
|
195
|
+
> bound* derived from each clock's stability — it is meaningful only against a
|
|
196
|
+
> configured spoofing scenario and is **not** a multi-satellite RAIM detector. `integrity`
|
|
197
|
+
> here is the filter's *self-consistency* (fraction of outage samples inside its own k-sigma
|
|
198
|
+
> bound), **not** an aviation HPL/VPL integrity figure. See
|
|
199
|
+
> [`docs/INTEGRITY.md`](docs/INTEGRITY.md).
|
|
200
|
+
>
|
|
201
|
+
> For genuine receiver-autonomous integrity, the **`integrity` scenario kind**
|
|
202
|
+
> (`scenarios/integrity-raim.toml`) runs real snapshot and solution-separation
|
|
203
|
+
> (ARAIM-style) RAIM over the propagated constellation geometry: it computes
|
|
204
|
+
> horizontal/vertical **protection levels (HPL/VPL)** per epoch and reports the
|
|
205
|
+
> fraction of epochs that meet the configured alert limits, with a Stanford
|
|
206
|
+
> integrity diagram for error-vs-PL classification.
|
|
207
|
+
|
|
166
208
|
### Python
|
|
167
209
|
|
|
168
210
|
An optional Python extension (PyO3, abi3) wraps the same engine. Build and install
|
|
@@ -240,15 +282,27 @@ drift = 0.0
|
|
|
240
282
|
Optional fields (off when absent): a clock may add `flicker_floor` (1/f FM Allan
|
|
241
283
|
floor); an inertial sensor may add `gyro_bias` and `q_arw` (gyro bias and angular
|
|
242
284
|
random walk), and `bias_instability` and `q_aa` (the Allan bias-instability floor and
|
|
243
|
-
acceleration random walk)
|
|
285
|
+
acceleration random walk) — together a **single-axis (1-DOF) accelerometer error
|
|
286
|
+
budget** (VRW/ARW and bias-instability). This is the error budget the shipped
|
|
287
|
+
`inertial` scenario *pack* runs. Separately, the library now carries a verified
|
|
288
|
+
**3-axis strapdown navigator** (`src/inertial/{attitude,mechanization,imu_errors}.rs`):
|
|
289
|
+
quaternion attitude with coning/sculling compensation, a full NED mechanization
|
|
290
|
+
(Earth-rate and transport-rate terms, WGS-84 Somigliana gravity), and a
|
|
291
|
+
deterministic IMU error model in which **scale-factor, misalignment,
|
|
292
|
+
g-sensitivity, quantization, and rate-ramp are modelled** (IEEE Std 952-1997
|
|
293
|
+
§A.2; Groves 2013 §4.3). That 3-axis path is **not yet wired into the scenario
|
|
294
|
+
pack/FoM** — switching the pack over, with a loosely-coupled GNSS/INS filter, is
|
|
295
|
+
the next inertial milestone. A
|
|
244
296
|
clock-holdover scenario may add `runs` (> 1) to run a **Monte Carlo ensemble** — each
|
|
245
297
|
figure of merit is then reported as a mean with a 5th–95th-percentile spread and the
|
|
246
298
|
chart shades the error confidence band (see `scenarios/clock-ensemble.toml`).
|
|
247
299
|
|
|
248
|
-
A `fusion` scenario (same blocks as `hybrid`) runs
|
|
249
|
-
|
|
250
|
-
optical time transfer
|
|
251
|
-
|
|
300
|
+
A `fusion` scenario (same blocks as `hybrid`) runs **two independent Kalman estimators**
|
|
301
|
+
— one for the clock state, one for the position state — disciplined by GNSS and aided by
|
|
302
|
+
optical time transfer, and reports a combined holdover FoM. The two blocks share no
|
|
303
|
+
cross-covariance: this is a stacked pair of error budgets, **not** a true coupled
|
|
304
|
+
clock+position joint filter (cross-block covariance is a roadmap item). See
|
|
305
|
+
`scenarios/fusion-pnt.toml`.
|
|
252
306
|
|
|
253
307
|
A `spoof` scenario injects a ramping false-time spoof (an `[attack]` block with
|
|
254
308
|
`start_s` and `rate_ns_per_s`) and runs each clock's integrity monitor, reporting
|
|
@@ -300,18 +354,24 @@ See `scenarios/` for one example of every kind.
|
|
|
300
354
|
## Output
|
|
301
355
|
|
|
302
356
|
The result artifact is versioned, self-describing JSON: per-step time series, the
|
|
303
|
-
scored figures of merit, the active model specs (with provenance), the seed,
|
|
304
|
-
**scenario hash** — so any chart can be reproduced from the file
|
|
357
|
+
scored figures of merit, the active model specs (with provenance), the seed, a
|
|
358
|
+
**scenario hash** — so any chart can be reproduced from the file — and, for each clock,
|
|
359
|
+
an `adev_curve` (`[{tau_s, adev, n_samples}]`): the overlapping Allan deviation across
|
|
360
|
+
octave-spaced averaging times, the standard way to read a clock's stability. The
|
|
361
|
+
browser playground renders it as a log-log "Clock stability (ADEV)" chart. (MDEV/TDEV/HDEV
|
|
362
|
+
and confidence intervals are not yet computed — roadmap.) Every field, with units and a
|
|
363
|
+
source pointer, is documented in [`docs/SCHEMA.md`](docs/SCHEMA.md). The figures of
|
|
305
364
|
merit follow the standard operational PNT figures of merit:
|
|
306
365
|
|
|
307
366
|
| Figure of merit | How Kshana computes it |
|
|
308
367
|
|-----------------|------------------------|
|
|
309
|
-
|
|
|
310
|
-
|
|
|
368
|
+
| Timing Performance (clock/orbit packs) | clock-phase error RMS + 95th-percentile over the outage, in **nanoseconds** (`timing_rms_ns`) — a timing metric, not position |
|
|
369
|
+
| Positioning Performance (inertial/hybrid packs) | 1-DOF position-error RMS + 95th-percentile over the outage, in **metres** (`pos_rms_m`); single-axis. A single run is flagged `monte_carlo: false`; set `runs = N` for a Monte Carlo ensemble that reports each metric's mean, spread, and bootstrap 95% CI. Still **not** a 2-D CEP/2DRMS or DOP-weighted accuracy (those need the 3-axis model — roadmap) |
|
|
370
|
+
| Autonomy | holdover duration — time in-spec after GNSS loss (grid-quantised: a lower bound) |
|
|
311
371
|
| Resilience | error-growth slope during the outage |
|
|
312
372
|
| Availability | fraction of the run with an in-spec solution |
|
|
313
|
-
| Integrity |
|
|
314
|
-
| Security |
|
|
373
|
+
| Integrity | filter **self-consistency** — fraction of outage samples whose error stays inside the Kalman filter's own k-sigma bound. **Not** an aviation HPL/VPL/RAIM integrity figure (see [`docs/INTEGRITY.md`](docs/INTEGRITY.md)) |
|
|
374
|
+
| Security | **analytic spoof-*detectability* bound** from clock stability — how small/slow a time-spoof a single-clock consistency monitor could flag. Meaningful only with a configured attack; **not** a multi-satellite RAIM detector |
|
|
315
375
|
|
|
316
376
|
New to these terms? Each is defined in plain language in the [glossary](docs/GLOSSARY.md).
|
|
317
377
|
|
|
@@ -343,7 +403,7 @@ flowchart TD
|
|
|
343
403
|
models["models — ClockModel (+ flicker)"]
|
|
344
404
|
estimator["estimator — holdover"]
|
|
345
405
|
kalman["kalman — Integrity bound"]
|
|
346
|
-
security["security — spoof-
|
|
406
|
+
security["security — analytic spoof-detectability bound"]
|
|
347
407
|
fom["fom · report · run"]
|
|
348
408
|
end
|
|
349
409
|
p2["Pack 2 · inertial — accel + gyro"]
|
|
@@ -403,6 +463,9 @@ kshana/
|
|
|
403
463
|
| [Glossary](docs/GLOSSARY.md) | everyone | plain-language definitions of every term |
|
|
404
464
|
| [Architecture](docs/ARCHITECTURE.md) | developers / reviewers | module map, engine pipeline, dispatch, and diagrams |
|
|
405
465
|
| [Validation status](docs/VALIDATION.md) | reviewers / citers | what is `validated` vs `not modeled`, with evidence |
|
|
466
|
+
| [Reproducibility & provenance](docs/REPRODUCIBILITY.md) | reviewers / packagers | determinism guarantees, golden-pinning, SBOM, build provenance |
|
|
467
|
+
| [Positioning](docs/POSITIONING.md) | evaluators | where Kshana sits vs RTKLIB/gLAB (complementary), and the zero-install browser tier |
|
|
468
|
+
| [SGP4 validation](docs/SGP4-VALIDATION.md) | reviewers / citers | agreement with the AIAA 2006-6753 reference (666 states, ~4 mm) |
|
|
406
469
|
| [Changelog](CHANGELOG.md) | everyone | released history (Keep a Changelog + SemVer) |
|
|
407
470
|
| [Contributing](CONTRIBUTING.md) | contributors | build, guards, test/citation discipline, DCO |
|
|
408
471
|
| [Code of Conduct](CODE_OF_CONDUCT.md) | community | expected conduct (Contributor Covenant) |
|
|
@@ -476,12 +539,15 @@ CPython versions).
|
|
|
476
539
|
## Roadmap
|
|
477
540
|
|
|
478
541
|
See [`CHANGELOG.md`](CHANGELOG.md) for released history and the `[Unreleased]`
|
|
479
|
-
section for what's next (
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
542
|
+
section for what's next (Earth-fixed frame reduction — TEME→ECEF/ITRF — and
|
|
543
|
+
explicit time systems: UTC/UT1/TAI/TT with leap seconds). SGP4/SDP4 orbit
|
|
544
|
+
propagation has **shipped** (v0.7.0, validated against the AIAA 2006-6753 vectors),
|
|
545
|
+
and its inertial velocity is now exposed downstream. An active
|
|
546
|
+
spoofing-attack demonstrator, multi-constellation availability, a single-axis (1-DOF)
|
|
547
|
+
IMU error budget, two independent (clock + position) Kalman estimators reported as a
|
|
548
|
+
combined FoM, real constellation geometry from TLEs, an HTML scorecard report, a
|
|
549
|
+
clock-stability-based spoof-detectability bound, geometry-derived GNSS availability
|
|
550
|
+
*and* dilution of precision from Keplerian orbits with eccentricity and J2 drift,
|
|
485
551
|
Monte Carlo confidence bands, trade-study parameter sweeps, an in-browser WebAssembly
|
|
486
552
|
playground, and optional Python (PyO3) and WebAssembly (wasm-bindgen) bindings have
|
|
487
553
|
landed on `main`.
|
|
@@ -498,7 +564,7 @@ entry for every user-visible change. Participation is governed by our
|
|
|
498
564
|
|
|
499
565
|
If you use Kshana in academic or technical work, please cite it. Machine-readable
|
|
500
566
|
metadata is in [`CITATION.cff`](CITATION.cff) (GitHub renders a "Cite this repository"
|
|
501
|
-
button from it); cite the version you used (e.g. `v0.
|
|
567
|
+
button from it); cite the version you used (e.g. `v0.7.0`).
|
|
502
568
|
|
|
503
569
|
## License
|
|
504
570
|
|
package/kshana_bg.wasm
CHANGED
|
Binary file
|