Developers

One engine. Every door in.

One Rust engine for GNSS (Global Navigation Satellite System) and PNT (positioning, navigation and timing) resilience: a command-line interface (CLI), Rust, Python and JavaScript packages, Kshana Studio in the browser, a JetBrains IDE (integrated development environment) plugin and an MCP (Model Context Protocol) server, so an AI (artificial intelligence) assistant runs the validated engine instead of guessing the maths. Open source under the AGPL-3.0 (GNU Affero General Public License, version 3) or a commercial licence.

Terminal · kshana v0.29.1 Recorded run
The recorded session plays here with JavaScript.
Real commands, real output, replayed as captured. In the output: SVs, space vehicles (satellites); J/S, jammer-to-signal ratio; thr, threshold; RAIM, receiver autonomous integrity monitoring; SQM, signal quality monitoring; p95, the 95th percentile.

Release v0.29.1 75 scenario kinds 14 MCP tools AGPL-3.0 or commercial licence Generated from the repository
01Install · AI assistants

Install in one line. Or none.

Generated from the repository's manifests and cross-checked against its READMEs, so every command matches v0.29.1. kshana-mcp gives your AI assistant the same engine: a TOML (Tom's Obvious, Minimal Language) scenario in, JSON (JavaScript Object Notation) and CSV (comma-separated values) out.

InstallFrom the manifests

For anyone, nothing to install.

The engine runs locally as WebAssembly; nothing is uploaded.

Rust engineAGPL-3.0 or commercial licenceSoftware bill of materials and build provenance on every release

AI assistant + kshana-mcp Recorded session

The messages an assistant exchanges with kshana-mcp, captured from the server.

The recorded session plays here step by step.

Same run in the Studio: Engine v0.29.1 · clock-holdover.toml · seed 42Open in Kshana StudioReport

14 tools over the public Kshana API (application programming interface), in the official MCP registry as io.github.ashfordeOU/kshana-mcp. Orbit exports: SP3 (Standard Product 3) and CCSDS (Consultative Committee for Space Data Systems) OMM and OEM (orbit mean-elements and ephemeris messages, TEME: True Equator, Mean Equinox frame). Register it under AI assistant (MCP server) or Docker image. MCP server docs

run_scenario

Run a Kshana PNT-resilience scenario from a TOML definition and return its figures of merit. Returns the human-readable summary followed by the full result JSON (FoMs, curves). Kshana validates SGP4/SDP4, IAU reference frames, Allan deviations, GNSS availability/DOP, ARAIM protection levels, GNSS/INS fusion, and quantum-sensor models against published references. Every kind runs through this one tool, including spectrum (radio-frequency spectrum and waterfall), solar-system, constellation-design and body-pnt (constellations around any body), campaign (chained phases, parameter sweeps, Monte Carlo ensembles and composed scenarios) and the low-Earth-orbit navigation kinds leo-signal, leo-pass, leo-navmsg, leo-pvt, leo-ppp, ntn-positioning and leo-pnt-chain. Call list_scenario_kinds first to discover scenario types and their fields, and list_example_scenarios / get_example_scenario for a complete runnable scenario of a kind.

list_scenario_kinds

List every built-in Kshana scenario kind with its description and required/optional TOML fields, as a JSON array. Use this to discover what scenarios can be run and how to construct a valid scenario TOML for run_scenario.

validate_scenario

Pre-flight check of a Kshana scenario TOML: verify it parses as TOML and detect its scenario kind, without running it. Returns the detected kind, or a descriptive error for malformed TOML. (run_scenario performs the full validation by executing the scenario.)

list_example_scenarios

List the bundled reference scenarios as JSON: count, and scenarios, an array of name, kind and about (the first sentence of the file's own header comment). Every one is a complete scenario that runs as it stands, so this is the quickest way to a valid TOML for a kind: pick a name, fetch it with get_example_scenario, edit it, run it. Pass kind to list only the examples of one kind (for example spectrum, solar-system, constellation-design, campaign, leo-signal, leo-pass, leo-navmsg, leo-pvt).

get_example_scenario

Return the TOML text of one bundled reference scenario, byte for byte the file the repository ships under scenarios/. Pass the text (edited or not) to run_scenario, report_scenario, animate_scenario or an export tool. Names come from list_example_scenarios. A scenario that exists in the repository but is not bundled is refused with the reason.

report_scenario

Run a Kshana scenario and return its report: an executive summary, the inputs, every result figure with its unit and its VALIDATED or MODELLED label, the events, the capability rows the run exercised, and a reproducibility record (engine version, scenario and result SHA-256 digests, seed, the command that reproduces it). format is json (default; the machine-readable report.json) or html (the printable, self-contained report.html with the chart embedded). A campaign's report also carries its sweep table or Monte Carlo distribution. The report is a pure function of the scenario: no clock is read.

animate_scenario

Run a Kshana scenario and return its time series as an animation. format is svg (default: one animated SVG, no script), html (one self-contained player page) or frames (numbered static SVG frames plus manifest.json, at most 120 frames in a reply). Optional fps (1 to 60, default 12), duration_s (0.5 to 600, default 8) and width (480 to 3840 pixels, default 960). The first content item is a JSON summary of what was drawn: the time range and unit, the chart titles, the number of phases and events, whether a spectrum waterfall is present, the result paths the traces were read from, any series left out, and the file names. The files follow, one content item each, in the order the summary's files lists them. A kind whose result has no sampled time axis is refused with a message that says so. The animation is MODELLED presentation of the run's own numbers; the same scenario and options give byte-identical files.

list_export_formats

Report which interoperability export formats apply to a Kshana scenario, without running it: a JSON array with one entry per format (czml, kml, geojson, stk, sigmf) giving applies, the reason when it does not, and spec_url, the published specification the writer follows. CZML (Cesium Language), KML (Keyhole Markup Language), GeoJSON and the STK (Systems Tool Kit) ephemeris .e describe the scenario's geometry; SigMF (Signal Metadata Format) records the samples a spectrum scenario with an [iq] block synthesises. Call this before export_interop.

export_interop

Export a Kshana scenario in one interoperability format: czml (Cesium Language, for CesiumJS), kml (Keyhole Markup Language, for Google Earth and geographic information system tools), geojson (RFC 7946), stk (Systems Tool Kit ephemeris .e, one file per satellite) or sigmf (Signal Metadata Format recording of a spectrum scenario's synthesised samples). The first content item is a JSON index: format, spec_url and files, each with its suffix (what the command line appends to the output name, for example .czml or .G01.e), bytes, sha256 and encoding. The files follow, one content item each, in index order: utf-8 files as their text, the binary SigMF sample file as base64. A campaign exports each member scenario the format applies to. A format that does not apply is refused with the reason; list_export_formats reports all five at once. Times are Coordinated Universal Time (UTC); the same scenario gives byte-identical files.

import_route

Write a GeoJSON route into a Kshana scenario that flies a waypoint track, and return the new scenario TOML (run it with run_scenario). The route is a LineString (or a Feature / FeatureCollection holding one) of longitude, latitude positions; it replaces the scenario's start_lat_deg, start_lon_deg, step_lat_deg, step_lon_deg and waypoints. The kinds that take a route are terrain-nav, terrain-slam, gravity-map and combined-altpnt; any other kind is refused with the reason. Give the two ends of the track, or evenly spaced positions along a straight line: the track kinds fly start + i*step, so any other shape is refused.

export_sp3

Export an orbit scenario's propagated constellation as SP3-c precise-ephemeris text (the standard GNSS post-processing format). Errors if the scenario is not an orbit kind.

export_omm

Export an orbit scenario's mean elements as a CCSDS 502.0-B-2 OMM (Orbit Mean-Elements Message) catalogue — one OMM per satellite. Errors if the scenario is not an orbit kind.

export_oem

Export an orbit scenario's propagated constellation as CCSDS OEM 2.0 ephemeris text — the inertial (TEME) state time series carrying position AND velocity, which flight-dynamics tools (GMAT / Orekit / STK) read. This is the velocity-carrying complement of the position-only export_sp3. Errors if the scenario is not an orbit kind.

export_table_csv

Run a Kshana scenario and return its reproducibility table as CSV text — the byte-stable table the CLI writes as <scenario>.table.csv and the papers cite. Only these kinds emit one: realtime-frame-eop, lunar-time-budget, lunar-jamming, telecom-timing, leo-navmsg when its encode-decode analysis runs on a kepler16 or kepler-rac message model (the broadcast ephemeris table), and moonlight-service-volume when both export_site_lat_deg and export_site_lon_deg are set. Errors for any other kind (or an invalid scenario); use run_scenario for the figures of merit.

02Ways to use it

Eleven ways in.

From a browser tab to a continuous integration (CI) regression suite. Every door runs the same engine and writes the same JSON result, SVG (Scalable Vector Graphics) chart and HTML (HyperText Markup Language) report. Pick one; every command is real and copies with one click.

Kshana Studio

Any bundled scenario, run on your machine as WebAssembly; nothing installed, nothing uploaded. Tune it, compare runs, sweep a parameter and export a reproducible report.

03Command line · libraries · formats

One call, three languages, the same answer.

The command line, the Rust, Python and JavaScript bindings and the file formats the engine reads and writes, side by side. Everything here is the free open core.

Command line · kshana --helpFrom the binary

Command-line reference, from the binary's own usage text

kshana <scenario.toml> [--study-name <s>] [--eop <finals2000A>] [--export-sp3 <out.sp3>] [--export-omm <out.omm>] [--export-oem <out.oem>] [--export <czml|kml|geojson|stk|sigmf|all|list>]... [--import-route <route.geojson>]
kshana <scenario.toml> --animate <svg|html|frames|all> [--animate-fps <n>] [--animate-duration <s>]
kshana --study <suite.toml>
kshana --validate <scenario.toml>
kshana kinds [--json]
kshana example [<name>]
kshana --help | --version

A run writes result.json, chart.svg, report.html, report.json, table.csv next to the scenario; --export-sp3, --export-omm and --export-oem write orbit files; --animate also writes the run as something that moves (animation.svg, animation.html, frames: an animated SVG, a self-contained HTML player or a folder of numbered frames), with --animate-fps and --animate-duration for the playback rate and length; --export writes the scenario's geometry or its synthesised signal for other tools: CZML (Cesium Language), KML (Keyhole Markup Language), GeoJSON (geographic JSON), an STK (Systems Tool Kit) ephemeris file, SigMF (Signal Metadata Format); --import-route reads a route drawn as a GeoJSON line; --eop injects Earth-orientation parameters from a finals2000A file; --study runs a free suite of scenarios into study.json and study.html; kshana kinds --json lists every kind with its fields; kshana example prints a scenario to start from. Results can travel in the Kshana Interchange Format (KIF) envelope. The MCP server exposes the orbit exports as tools.

kshana --study is the free suite runner. If you want the analysis done for you instead, that is a paid custom study.

Every runDeterministic
  • Writes result.json, chart.svg, report.html and the same report as report.json, plus a CSV (comma-separated values) table for the kinds that publish one. On request it also writes an animation of the run (--animate) and the scenario in the formats other tools read (--export).
  • Reproducible from scenario, seed and engine version, with a CycloneDX SBOM (software bill of materials) and SLSA (Supply-chain Levels for Software Artifacts) build provenance on every release.
  • Documented: concepts, scenario schema, Python API, validation and every tutorial, generated from the repository. Docs
Rust, Python, JavaScriptRun against v0.29.1

Each program runs the bundled clock-holdover scenario (write it with kshana example clock-holdover > clock-holdover.toml) and prints the same one-line summary. The package READMEs carry the full versions.

src/main.rs · after cargo add kshana
use kshana::api;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let toml = std::fs::read_to_string("clock-holdover.toml")?;
    let out = api::run_toml(&toml)?;              // RunOutput { json, svg, summary, csv }
    println!("{}", out.summary);                  // the one-line result string
    std::fs::write("clock-holdover.result.json", &out.json)?;
    Ok(())
}

kshana::api also has run_scenario, validate_scenario, list_scenario_kinds and the orbit exporters. Rust docs

Open in Kshana Studio: clock-holdover

Interoperability · read and writeEach row names its check

Formats the engine handles today, from the repository's standards page (Docs: standards). Open a row for how to reach it and what it was checked against.

  • CCSDS OEM Consultative Committee for Space Data Systems, Orbit Ephemeris Messageread · write
    How
    --export-oem, MCP export_oem
    Checked against
    The CCSDS Blue Book example, recovered verbatim
  • CCSDS OMM Orbit Mean-Elements Messagewrite
    How
    --export-omm, MCP export_omm
    Checked against
    Round-trip test on real two-line element sets
  • SP3-c / SP3-d Standard Product 3, precise ephemerisread · write
    How
    --export-sp3, MCP export_sp3
    Checked against
    Round trip on a real GPS (Global Positioning System) constellation snapshot
  • CCSDS TDM Tracking Data Messageread · write
    How
    Rust library
    Checked against
    The CCSDS Blue Book example, recovered verbatim
  • CCSDS Space Packet telemetry and telecommand packetsread · write
    How
    space-packet scenarios
    Checked against
    An independent library's published byte-level test vectors
  • RINEX Receiver Independent Exchange Format, navigation and observationread
    How
    Scenario inputs, such as pvt
    Checked against
    Observation files from a real International GNSS (Global Navigation Satellite System) Service station
  • TLE two-line element setread
    How
    orbit scenarios
    Checked against
    The official AIAA (American Institute of Aeronautics and Astronautics) reference vectors
  • IONEX IONosphere map EXchange formatread
    How
    Rust library
    Checked against
    Reads the International GNSS Service product; no external check listed yet
  • IERS Earth orientation International Earth Rotation and Reference Systems Serviceread
    How
    --eop with a finals2000A file
    Checked against
    The official product, including predicted rows
  • KIF Kshana Interchange Formatread · write
    How
    Envelope around any result
    Checked against
    Kshana's own versioned envelope, not an external standard; each consumer gets a compatibility verdict
  • JSON, SVG, HTML, CSV the run outputswrite
    How
    Every run; MCP export_table_csv
    Checked against
    Deterministic from scenario, seed and engine version
JetBrains IDE pluginIntelliJ · PyCharm · CLion

Prefer to click?

The "Kshana — PNT simulator" plugin: right-click any scenario .toml, choose Run Kshana Scenario, and read the figures of merit in a tool window.