Kshana PNT-resilience simulator

io.github.ashfordeOU由 GitHub 账号 ashfordeOU 发布v0.41.0更新于 Nov 20, 2026

Validated Kshana PNT simulator: orbits, GNSS, fusion, receiver trust, interference maps.

概览

AI 生成的概览

在本地运行 Kshana PNT 韧性仿真器,让助手执行场景并获得经过验证的指标、报告、导出结果和接收机可信度评估。

可以做什么
  • 发现并获取可运行场景:列出场景类型与内置示例、读取示例 TOML、校验场景。
  • 运行场景并读取结果:性能指标、可打印报告、动画、CSV 可复现性表格。
  • 导出几何与星历:CZML、KML、GeoJSON、STK、SigMF、SP3、OMM、OEM、试验台运动文件,并可导入 GeoJSON 航线。
  • 评估真实接收机与船舶日志的可信度,按 Jammertest 计划评分,并用 ADS-B/AIS 报告生成干扰地图或辐射源区域。
  • 在工作目录中生成和处理 GNSS IQ 记录:场景生成、捕获、跟踪、前端 DSP、扫描、监测与实验室回放活动。
  • 创建、加时间戳并验证签名证据包,并把结果映射到韧性合规框架。
适用场景
当你需要可复现的定位、导航与授时分析而不是猜测数值时使用:轨道与星座研究、GNSS 可用性与完好性、干扰或欺骗场景、接收机日志可信度评估,或信号级 IQ 实验。
运行要求
需要本地运行时:npx 需 Node 18+,uvx 需 Python 3.9+,也可用 Docker 或预编译二进制;仅桌面端,stdio 传输。无需认证。IQ 工具需设置 KSHANA_MCP_IQ_DIR 指向工作目录,KSHANA_MCP_IQ_MAX_SAMPLES 限制单次调用样本数。
安装前请注意
IQ 工具只在配置的工作目录内读写文件,设置 overwrite 时会替换已有输出。证据包用 Ed25519 签名;未提供种子时使用一次性密钥,因此只能证明完整性而非身份,且不校验时间戳机构的签名。输出为建议性且标记为 MODELLED,不是型号认证的导航设备结论,也不是法律意见。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Kshana PNT-resilience simulator,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Kshana: the mark, a compass reticle marking the precise instant, beside the wordmark kshana]

kshana-mcp: ask your AI assistant, and the engine answers

kshana-mcp is a Model Context Protocol (MCP) server for Kshana, the open-source simulator for PNT (positioning, navigation and timing) resilience. It lets an AI (artificial intelligence) assistant run the real engine and read back its JSON (JavaScript Object Notation), instead of guessing the maths. It speaks over stdio (standard input and output) to any MCP-compatible client, including Cursor and JetBrains AI Assistant / Junie.

The maths Kshana is validated for is exactly where a language model guesses badly: SGP4 (Simplified General Perturbations 4) orbit propagation, reference frames of the IAU (International Astronomical Union), Allan deviations, GNSS (Global Navigation Satellite System) availability and DOP (dilution of precision), ARAIM (advanced receiver autonomous integrity monitoring) protection levels, GNSS and INS (inertial navigation system) fusion, and quantum-sensor models. Ask a question; the assistant runs a real scenario and gets figures of merit with their provenance and their VALIDATED or MODELLED label.

[One open engine at the centre, with the MCP server as one of its surfaces beside the command line, the Rust library, Python, WebAssembly and Kshana Studio, the Docker image and the JetBrains plugin; every surface runs the same engine, and Kshana Pro depends on it without forking it]

Tools

ToolWhat it does
run_scenarioRun a scenario from a TOML (Tom's Obvious, Minimal Language) definition; returns the summary + full result JSON (JavaScript Object Notation: figures of merit, curves). Optional include_chart returns the chart as SVG (Scalable Vector Graphics).
list_scenario_kindsThe 93 built-in scenario kinds with descriptions + required/optional fields — so the agent can construct a valid scenario.
validate_scenarioPre-flight check: parse the TOML and detect its kind, without running.
list_example_scenariosThe bundled reference scenarios as JSON: each name, its kind and one sentence on what it shows. Optional kind filter. Every example runs as it stands, so this is the quickest way to a valid TOML for a kind.
get_example_scenarioThe TOML text of one bundled reference scenario, byte for byte the file under scenarios/.
report_scenarioRun a scenario and return its report: executive summary, inputs, every figure with its unit and its VALIDATED or MODELLED label, events, the capabilities exercised and a reproducibility record. format is json (default) or html (the printable single-file page).
animate_scenarioRun a scenario and return its time series as an animation: svg (default), html (a self-contained player) or frames (at most 120 in a reply). The first content item is a JSON summary of what was drawn; the files follow. A kind with no sampled time axis is refused with the reason.
list_export_formatsWhich interoperability formats apply to a scenario (czml, kml, geojson, stk, sigmf), the reason when one does not, and the specification each writer follows. Does not run the scenario.
export_interopExport a scenario as CZML (Cesium Language), KML (Keyhole Markup Language), GeoJSON, STK (Systems Tool Kit) ephemeris .e, or SigMF (Signal Metadata Format, for a spectrum scenario with an [iq] block). The first content item is a JSON index of the files (suffix, size, encoding, and the SHA-256 digest, the 256-bit Secure Hash Algorithm); the files follow, the binary SigMF sample file as base64.
import_routeWrite a GeoJSON LineString route into a scenario that flies a waypoint track (terrain-nav, terrain-slam, gravity-map, combined-altpnt) and return the new TOML.
export_sp3Export an orbit scenario's constellation as SP3-c (Standard Product 3, revision c) precise ephemeris.
export_ommExport an orbit scenario's elements as a CCSDS (Consultative Committee for Space Data Systems) 502.0-B-2 OMM (Orbit Mean-elements Message) catalogue.
export_oemExport an orbit scenario's state series as CCSDS OEM (Orbit Ephemeris Message) 2.0 ephemeris — the TEME (true equator, mean equinox) position and velocity series flight-dynamics tools (GMAT, the General Mission Analysis Tool; Orekit; STK, the Systems Tool Kit) read; the velocity-carrying complement of the position-only export_sp3.
export_table_csvRun a scenario and return its reproducibility table as CSV (comma-separated values) — the byte-stable table the CLI (command-line interface) writes as <scenario>.table.csv. Only realtime-frame-eop, lunar-time-budget, lunar-jamming, telecom-timing, leo-navmsg (its encode-decode analysis on a kepler16 or kepler-rac message model) and moonlight-service-volume with export_site_lat_deg + export_site_lon_deg set emit one; any other kind returns an error naming these.
sky_geometrySky geometry under an azimuth-dependent skyline: from a site, a time and constellation presets, two-line element sets (tle, propagated by SGP4 to a UTC epoch) or satellites as azimuth/elevation or ECEF, the satellites visible and those hidden by the skyline, GDOP/PDOP/HDOP/VDOP/TDOP from the gnss_lib_py-checked DOP kernel, the east-north-up cofactor and covariance (one clock per system or one in common) and the horizontal error ellipse; with skyline_preset instead of request, a REPRESENTATIVE preset with its provenance and its cut every degree. MODELLED; carries the advisory; no Monte Carlo over MCP. See docs/SKYLINE.md.
assess_receiver_logAssess a real GNSS (global navigation satellite system) receiver log for trust. The TOML names the log's format (ubx, rinex, android, sbf, nmea, rtklib-pos, novatel, rtcm3, gnss-sdr, sbp, greis or unicore: every receiver reader of the engine) and gives its bytes inline as text or base64; the tool runs the trust monitors (carrier-to-noise density drop, loss of lock, AGC (automatic gain control), jamming indicator, position jump and, with RINEX plus broadcast navigation, RAIM (receiver autonomous integrity monitoring) and a clock-aided monitor) and returns when and why the fix stopped being trustworthy. Optional [[events]] and [compare] sections score stated events and predicted C/N0 drops against stated tolerances. A [platform] kind = "vessel" table selects the maritime monitors and adds a 0-100 trust score per epoch with the monitors that deducted (advisory; MODELLED). The log goes inline as text or base64 (at most 4 MiB). Chart and per-epoch CSV on request. See docs/RECEIVER-TRUST.md.
assess_vessel_streamScore a bounded NMEA 0183 excerpt (at most 2 MiB and 20,000 epochs; it must hold the calibration window) the way kshana receiver-trust live scores it: per-epoch trust state and 0-100 score with the monitors that deducted, a summary and the last $PKSHT. The bounded form of the live command: no socket is opened and nothing is written to a port; the gate, --listen and the telemetry exporters (Prometheus, OTLP, syslog) are command-line only. Advisory only; MODELLED. See docs/MARITIME-TRUST.md.
assess_vessel_logA vessel's NMEA 0183 log (at most 4 MiB) as a batch run, with the session TOML stating the vessel's limits: the score model and every epoch's 0-100 score with its deductions (the reply keeps counts by state and the first 200 degraded or untrusted epochs). Advisory only; MODELLED.
jammertest_importRead the published Jammertest test catalogue and transmission plan (NPRA/jammertest-plan, MIT) as scheduled truth (kshana jammertest import): one test area's slots become receiver-trust events with the catalogue id and year in each label. Planned slots, not recorded on-air times; no contact field of the plan is read. MODELLED. See docs/JAMMERTEST.md.
jammertest_scoreScore a receiver log against that schedule (kshana jammertest score): per test the detection latency, missed alarms and time to recover, and the false alarms outside every slot. Text logs as log, binary (ubx, sbf) as log_base64. A signed pack needs a key: command line. Advisory only; MODELLED.
referee_location_scoreScore where a monitoring network said interference came from (kshana jammertest locate-score, row B2): per report the attributed event, the geodesic error and region containment and size; per event and pooled, error percentiles, coverage per level, time to first location and time to locate; false locations per hour. Checks arithmetic, not any locator's accuracy.
create_evidence_packA signed evidence pack for a window of a vessel's log (kshana receiver-trust evidence): the raw log bytes for the window, configuration, per-epoch results and reasons, a summary page, and a manifest with every SHA-256 and a hash chain, signed with Ed25519. The signing seed is never returned or logged; without one a one-time key is used, so the pack proves integrity, not identity. A technical record, not a legal opinion. See docs/EVIDENCE-PACKS.md.
attach_evidence_timestampBind an RFC 3161 timestamp token (base64 of the .tsr bytes) to a pack, in memory (kshana evidence attach-timestamp); the pack with the token must still verify. The timestamp authority's signature is not checked: use openssl ts -verify.
verify_evidence_packVerify a pack (kshana evidence verify): every hash, the chain, the signature, and with the signer's public key and the full log, who signed it and that the slice came from that log. Names every failure and file. The verdict is verified (signer pinned), intact-signer-not-pinned (everything checks but no public key was given, so the signer is not established) or failed; require_timestamp fails a pack with no timestamp token.
generate_training_nmeaSynthetic bridge NMEA 0183 for crew training from a nmea-scenario TOML (jamming, position drag-off, time spoof, replay delay) with the instructor log (kshana-nmea-training/1); deterministic per seed. Text only: nothing is synthesised at RF or IQ and nothing is transmitted; never for a vessel's live navigation systems. The reply carries the first 2000 lines.
build_interference_mapA GNSS interference map from ADS-B or AIS position reports as CSV text (at most 4 MiB): one kshana-interference-map/v1 GeoJSON per UTC day, aggregate only (no identifiers, cells under 5 distinct aircraft or vessels withheld), with the dataset licence embedded. A degraded cell does not identify interference as the cause; not a forecast. MODELLED. See docs/INTERFERENCE-MAP.md.
interference_emitter_regionsEstimated emitter regions from ADS-B or AIS reports as CSV text (at most 4 MiB): regions at stated confidence levels with a centroid and an uncertainty ellipse, never a bare point; aggregate only. A region is not the position of anyone and not a finding of the cause. MODELLED. See docs/INTERFERENCE-MAP.md.
connect_mapKshana Connect without code: a kshana.connect/1 mapping and a station (TOML text) applied to a log (text, at most 4 MiB), returning kshana.obs/1 JSON lines identical to kshana connect map. See docs/CONNECT.md.
export_test_benchA scenario's vehicle motion and events for a laboratory GNSS simulator (kshana bench-export): motion CSV and JSON, NMEA, waypoints and events as text, nothing written to disk. Kinds gnss-ins, jamming, gnss-sim. No signal: nothing exported is, models or drives a radio-frequency or baseband signal; the simulator and its operator supply the signals. See docs/TEST-BENCH.md.
create_round_trip_packThe signed laboratory round-trip pack (kshana evidence round-trip): the scenario, the laboratory's kshana.test-conditions/1 document, the receiver log and its score against the stated events, linked by hash. Refuses conditions and scoring events that disagree. No signal; a technical record, not a certification.
iq_sweepReplay one IQ recording in the work directory across several tracking-loop designs (kshana iq sweep): per design and PRN the steady-state phase and code jitter, lock fractions and mean C/N0. At most 256 (design, PRN) channels per call; the span must fit the sample budget.
iq_monitorRun the interference and spoofing detection monitors over an IQ recording in the work directory (kshana iq monitor): wideband power and spectral monitors and per-satellite C/N0 and signal-quality monitors against a learned baseline. Series names and lengths and up to 200 events in the reply; the whole report on request as files. An event says a measured quantity left its baseline, not why. MODELLED.
iq_labfitFit the tracking-loop loss-of-lock model to lab runs (kshana iq labfit) from an iq-labfit scenario whose logs are inline (text or base64; a path is refused). Reads and writes no file. MODELLED.
iq_test_conditionsValidate a kshana.test-conditions/1 file given as text and return the resolved conditions with their hash. Inline only.
compliance_reportThe public-framework mapping filled from result documents given as text (kshana compliance-report): which rows of six resilience frameworks and standards (US DHS Resilient PNT framework v2.0, IMO ships, EASA aviation, NIS2 Article 21, EN 16803, NIST IR 8323r1) the runs support evidence for, which they do not, and each row's gap. Takes runs of {label, result, scenario?} (at most 64, 4 MiB in all). A status says the runs support evidence for the row's capabilities; it is not a finding that a framework is met and not a rating or approval of any product. The statement is returned with every report; show it verbatim. MODELLED. See docs/compliance/.
compliance_mappingThe static mapping tables (or, with sources, the source documents they cite with versions and URLs) as Markdown, led by the same statement. Needs no runs.
trust_telemetryA trust stream (JSON lines) or receiver-trust result rendered as Prometheus text, CEF or LEEF syslog lines, an OTLP JSON payload or Home Assistant MQTT discovery and state lines, with the kshana trust-telemetry encoders. Text in the reply: nothing is sent or served and no clock is read. Advisory only.
fit_imu_logAccelerometer and gyro parameters of the hybrid and fusion scenarios fitted from a stationary IMU log (CSV or EuRoC) by Allan deviation, with a ready-to-paste [accel_classical] table and the log's SHA-256 (kshana imu-fit). Text in, JSON out; MODELLED.
ephem_exportA JPL Horizons state table written as a CCSDS OEM, a CCSDS OPM or an SPK kernel of type 13 or 9, for flight-dynamics tools, and read back state for state (kshana ephem-export). Text in, JSON out (the SPK as base64).
list_standards_packsThe standards packs (kshana standards-pack list): scored scenario sets for the DHS Resilient PNT framework test profiles (levels 1 to 4), IMO MSC.1/Circ.1575 and ICAO Doc 9849 Appendix F.
run_standards_packOne pack run against its bars stated before the run (kshana standards-pack run): each test MET, NOT MET or NEEDS INPUT, with measured and expected values; give the report to compliance_report to see the rows. MODELLED; rates no product.
lunanet_afs_checkThe LunaNet Augmented Forward Signal checked against LNIS V5 AD1 Volume A (LSIS-AFS V1.0, 29 January 2025): spec (the implementation against the document's printed code tables and worked examples), symbols (a symbol stream: sync pattern, SB1, FID, TOI continuity) or generate (a test stream). LDPC and CRC-24Q of subframes 2 to 4 are not verified; no signal is written.
score_benchmarkA kshana-bench submission scored against a truth file, both JSON text (kshana bench score, bench/SPEC.md): the result file with the spec version, split, input hashes and the task's metrics. MODELLED; describes a log or corpus, never a product.
render_leaderboardkshana-bench result files rendered as the static leaderboard page (HTML text), each validated first.
trust_telemetryA trust stream (JSON lines) or receiver-trust result rendered as Prometheus text, CEF or LEEF syslog lines or an OTLP JSON payload, with the kshana trust-telemetry encoders. Text in the reply: nothing is sent or served and no clock is read. Advisory only.
route_exposureThe share of a route's length in degraded, not-degraded, unassessed and not-observed cells of one or more interference maps, optionally within a date range. Unobserved cells are not evidence of a clear route.
iq_signalsThe GNSS IQ layer's set-up: the signal names the IQ tools accept, whether the IQ file tools are on, the work directory and the per-call sample budget. Call it first.
iq_infoDescribe one IQ (in-phase and quadrature) recording in the work directory without processing it: format, sample rate, centre frequency, samples, duration, data files and sizes (kshana iq info).
iq_sceneGenerate a multi-satellite GNSS IQ scene into the work directory (kshana iq scene): stated Doppler/C/N0 profiles, or true broadcast-ephemeris geometry from a RINEX navigation file, with an optional signal-level propagation channel. Replies with the files written and their byte counts and the truth's first epoch per satellite.
iq_acquireFFT (fast Fourier transform) acquisition of one or more PRNs (pseudo-random noise codes) over a recording (kshana iq acquire), optionally behind front-end stages: per PRN, acquired or not, Doppler, code phase, peak statistic and threshold; surface_out (one PRN) keeps the whole Doppler × code-phase correlation surface with fine-Doppler refinements.
iq_trackAcquire, then track with the DLL/PLL/FLL (delay-, phase- and frequency-locked loop) bank (kshana iq track), with the loops from a kshana.loop-design/1 TOML file in the work directory (design) or the built-in design, and optional re-acquisition (reacquire): per channel, epochs, final Doppler, final and mean C/N0, phase- and code-lock fractions, locked at the end, the final lock state, false locks and re-acquisitions, plus the design's name and hash. Tracking streams in bounded memory; per-epoch output goes to files only (epochs_out: E/P/L, discriminators, loop states, C/N0, lock state as .csv/.jsonl/.bin; events_out).
iq_frontendApply receiver front-end and interference-mitigation DSP (digital signal processing: band-pass, notch, blanking, excision, AGC, quantiser) to a recording and write a new one (kshana iq frontend).
iq_campaignRun a lab-replay campaign (kshana iq campaign): recordings, each with a test-condition file stating the lab's known truth, × front-end chains × loop designs. Each cell is scored for time to loss of lock, re-acquisition time, C/N0 degradation against the stated J/S (beside an analytic reference labelled MODELLED), false-lock rate, PLL/DLL jitter and availability. Incremental and resumable: each call runs the pending cells that fit the sample budget (or max_cells).
iq_campaign_statusA campaign output folder's progress: cells done and pending, and the digest once complete. Reads files only.

Each tool is a thin, faithful wrapper over a public function of the kshana library — no new simulation logic lives here, so an agent runs exactly the validated engine.

The GNSS IQ tools: files in, compact JSON out

IQ recordings run to gigabytes, so the iq_* tools never pass samples through the protocol. They follow one contract:

  • A work directory. The server reads and writes IQ files only inside the folder named by KSHANA_MCP_IQ_DIR. Every path argument is relative to it (an absolute path must resolve inside it); inputs are resolved through symlinks before the check, an output's folder must already exist inside it, and an existing output is replaced only with overwrite: true. Unset, the IQ file tools are off and say how to enable them; every other tool is unaffected.
  • A sample budget. One call generates or processes at most KSHANA_MCP_IQ_MAX_SAMPLES complex samples (default 50 000 000). In bytes that is 400 MB as cf32_le (8 bytes a complex sample), 200 MB as ci16_le (4 bytes) and 100 MB as ci8 (2 bytes); a scene is written as cf32_le unless format says otherwise. The check runs before any work, and the refusal names the duration or max_seconds that fits.
  • Compact replies. Each tool answers with one JSON summary: acquisition peaks, C/N0, lock state, and every file written with its path and byte count. Per-epoch tables go to the json_out / csv_out files you name.
  • Unknown arguments are refused, not ignored, so a misspelt option is an error.

Each tool runs the same code path as kshana iq on the command line, in process. The layer is software only: it writes files for software receivers and drives no radio hardware. The IQ layer adds no interference or spoofer synthesis, and nothing is ever transmitted. (The separate spectrum scenario kind can write analytic jammer IQ snapshots to a file.)

json
{  "mcpServers": {    "kshana": {      "command": "/Users/you/.cargo/bin/kshana-mcp",      "env": { "KSHANA_MCP_IQ_DIR": "/Users/you/iq" }    }  }}

With the Docker image, mount the folder and point the variable at it: docker run --rm -i -v "$PWD/iq:/iq" -e KSHANA_MCP_IQ_DIR=/iq ghcr.io/ashfordeou/kshana-mcp.

Every kind is reachable

run_scenario dispatches on the scenario's kind, so every kind list_scenario_kinds names runs through it. That includes the newer families, each with bundled examples an agent can fetch:

CapabilityKindsAn example to start from
Spectrum and waterfallspectruml-band-waterfall-jamming
The solar systemsolar-systemsolar-system-tour
Constellations around any bodyconstellation-design, body-pntlunar-relay-constellation, europa-surface-pnt
Campaigns: chained phases, sweeps, Monte Carlo (seeded random ensembles), compositioncampaigncampaign-sweep-jammer-power
Low Earth orbit (LEO) navigation: signal designleo-signalleo-band-trade
LEO navigation: pass link budgetleo-passleo-pass-iridium
LEO navigation: navigation messageleo-navmsgleo-navmsg-encode-decode
LEO navigation: fused positioning and timingleo-pvt, leo-ppp, ntn-positioning, leo-pnt-chainleo-doppler-positioning, leo-pnt-end-to-end

list_example_scenarios with a kind names every bundled example of that kind. Animations, reports and interoperability exports are not kinds: they are views of a run, and animate_scenario, report_scenario and export_interop return them for any scenario they apply to.

Not served: study suites (kshana --study <suite.toml>), because a suite names sibling scenario files on disk and the scenario tools read no file. Run each member with run_scenario. (The IQ tools do read and write files, inside their work directory only.)

Install the MCP server

Advisory, not type-approved navigation equipment: the operator remains responsible for navigation. The server runs on your computer; nothing is sent to Ashforde OÜ.

Pick any channel; all run the same server. Per-client snippets (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Zed, Goose, Codex CLI, Gemini CLI, Continue) are in docs/MCP-INSTALL.md.

ChannelCommand or buttonRequiresPinned form
Claude Desktop extensiondouble-click the .mcpb for your system: macOS (Apple silicon) · macOS (Intel) · Windowsnonekshana-mcp-<target>.mcpb of v0.41.0
Cursor (one click)npx (Node) · DockerNode, or Docker[email protected] / ghcr.io/ashfordeou/kshana-mcp:0.41.0
VS Code (one click)npx (Node) · Docker · Insiders (npx)Node, or Docker[email protected] / ghcr.io/ashfordeou/kshana-mcp:0.41.0
Claude Codeclaude mcp add kshana -- npx -y [email protected] · plugin: /plugin marketplace add ashfordeOU/kshana then /plugin install kshana@ashfordeNode (or Docker)[email protected]
npxnpx -y [email protected]Node 18+[email protected]
uvx / pipxuvx kshana-mcp==0.41.0 · pipx run kshana-mcp==0.41.0Python 3.9+ with uv or pipxkshana-mcp==0.41.0
Dockerdocker run -i --rm ghcr.io/ashfordeou/kshana-mcp:0.41.0Dockerghcr.io/ashfordeou/kshana-mcp:0.41.0
Homebrewbrew install ashfordeOU/tap/kshana-mcpbrewformula for v0.41.0
Scoopscoop bucket add ashforde https://github.com/ashfordeOU/scoop-bucket then scoop install kshana-mcpScoop (Windows)manifest for v0.41.0
wingetwinget install AshfordeOU.KshanaMcpwinget (Windows)--version 0.41.0
cargocargo install kshana-mcp --version 0.41.0Rust 1.88+kshana-mcp 0.41.0
Prebuilt binarythe release page: kshana-mcp (Linux x86-64), kshana-mcp-<target>[.exe], checked by SHA256SUMS and gh attestation verifynonev0.41.0
MCP registryio.github.ashfordeOU/kshana-mcp (found by registry-aware clients)a registry-aware client0.41.0
Remote (streamable HTTP)kshana-mcp --http 127.0.0.1:8080, self-hosted: see https://github.com/ashfordeOU/kshana/blob/main/docs/deploy/mcp-http.mdyour own hostv0.41.0

From a checkout or git (development):

sh
cd mcp/kshana-mcp && cargo install --path .cargo install --git https://github.com/AshfordeOU/kshana kshana-mcp

HTTP mode (self-hosted)

kshana-mcp --http 127.0.0.1:8080 serves the same tools over streamable HTTP at /mcp. It binds loopback only; a non-loopback address needs --allow-remote and a bearer token in KSHANA_MCP_HTTP_TOKEN; the IQ file tools are off; request size, time and concurrency are capped; no CORS header is sent. Kshana does not host an endpoint: you self-host it. See docs/deploy/mcp-http.md.

cargo install puts kshana-mcp on your PATH (typically ~/.cargo/bin/kshana-mcp). The server talks JSON-RPC (JSON remote procedure call) over stdio; logs go to stderr. Building from source needs a Rust toolchain ≥ 1.88 (the rmcp 3.x SDK needs it, and so does the kshana library); the Docker image needs none.

Register it with a client

Virtually every MCP client uses the same mcpServers config block — register the kshana-mcp binary by absolute path:

json
{  "mcpServers": {    "kshana": {      "command": "/Users/you/.cargo/bin/kshana-mcp",      "args": [],      "env": {}    }  }}

Or, with the Docker image instead of a local binary (no PATH needed):

json
{  "mcpServers": {    "kshana": {      "command": "docker",      "args": ["run", "--rm", "-i", "ghcr.io/ashfordeou/kshana-mcp"]    }  }}

Where that block lives depends on the client:

  • Cursor — ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project).
  • JetBrains AI Assistant / Junie — Settings → Tools → AI Assistant → Model Context Protocol → Add → As JSON, paste the block, then fully restart the IDE (integrated development environment).
  • Desktop assistants — most use a …_config.json with the same mcpServers shape; check your client's docs for the file location.
  • CLI agents — many accept the same JSON via an mcp add / mcp.json mechanism.

Always use an absolute path to the binary. Set RUST_LOG=debug in env to troubleshoot (diagnostics go to stderr; stdout is reserved for the JSON-RPC protocol).

Try it

Once registered, ask your assistant things like:

  • "List the Kshana scenario kinds." → list_scenario_kinds
  • "Show me a Kshana spectrum example and run it." → list_example_scenarios, get_example_scenario, run_scenario
  • "Run the Kshana clock-holdover scenario with a 20 ns threshold and a 2-hour GNSS outage; what's the quantum-vs-classical holdover?" → run_scenario
  • "Export that GPS (Global Positioning System) constellation as SP3." → export_sp3
  • "Give me the realtime-frame-eop table as CSV." → export_table_csv
  • "Put that Iridium pass on a Cesium globe." → list_export_formats, export_interop
  • "Animate the jamming campaign." → animate_scenario
  • "Give me the report for that run, with its reproducibility record." → report_scenario
  • "Make a one-second GPS L1 scene with PRNs 3 and 17, then acquire and track it." → iq_signals, iq_scene, iq_acquire, iq_track

Design note — why a separate crate

The server is a standalone, workspace-excluded crate with its own Cargo.lock, so the official Rust MCP SDK (software development kit) rmcp and its async runtime never enter the published kshana crate's dependency graph: a library or Python user does not compile a server they do not run. (It was first split out because rmcp is edition 2024, needing rustc ≥ 1.85, while the main crate then promised 1.75. The library and this server now both declare 1.88, the floor of the rmcp 3.x SDK and of the upgraded RustCrypto crates.) Continuous integration (CI) gates this crate on its own — tests and cargo deny against its lockfile. rmcp's licence tree is clean (Apache-2.0/MIT/BSD), so, unlike the xval/anise-frames cross-validation crate it otherwise mirrors, the split is not about licensing.

License: AGPL-3.0-only, the GNU Affero General Public License version 3 only (or a commercial licence from Ashforde OÜ; see the repository's LICENSING.md).

来源:mcp/kshana-mcp/README.md,提交 182a264

工具

53

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.

输入参数fpstoml必填widthformatduration_s

assess_receiver_log

Assess a real GNSS receiver log for trust: read a u-blox UBX, RINEX 3 (optionally with broadcast navigation, which adds the engine's own fix, RAIM and a clock-aided monitor), Android GnssLogger or NMEA log, run the trust monitors (carrier-to-noise density drop, AGC, jamming indicator, loss of lock, position jump, RAIM, clock) against a calibration baseline, and return when and why the receiver stopped being trustworthy. Optional `[[events]]` with onsets and predicted C/N0 drops are scored against tolerances stated in the scenario: detected, late or missed, and agree or disagree. Returns the summary and the full result JSON (chart and CSV on request; a vessel run's CSV begins with a `#` comment line carrying the advisory statement, which CSV readers skip with their comment option). The log's bytes go inline in the TOML as `text` or `base64` (inline only, at most 4 MiB). A `[platform] kind = "vessel"` table selects the maritime monitors (kinematic consistency, heading against course, speed log, antenna height, C/N0 spread, time consistency) and adds a 0-100 trust score per epoch with the monitors that deducted. Every epoch also carries its satellite `geometry` (good; degraded for few satellites or high PDOP or HDOP; or unknown where the log has no satellite elevations or DOP); every epoch has a `label` (good, fair, poor); for a vessel a `geometry` monitor joins the score, deducting only when the geometry is poor (at most 15 points: degraded, never untrusted), and every deduction carries a class: geometry (the sky), environment or inconsistency (attack-like). For a stream excerpt with the gate use `assess_vessel_stream`. Advisory only; evidence tier MODELLED.

输入参数toml必填include_csvinclude_chart

assess_vessel_log

Assess a vessel's NMEA 0183 log as a batch run (`kshana receiver-trust` with `[platform] kind = "vessel"`): the score model, the monitors that ran and every epoch's 0-100 score with its deductions, its satellite geometry (good, degraded, unknown) with a `label` (good, fair, poor) on every epoch, geometry deducting only when poor, and a class on every deduction (geometry, environment, inconsistency), with `geometry_model` (thresholds, the cap and floor in force, and provenance) and `geometry_summary`. `session_toml` states the vessel's limits and any monitor or score settings (no `[log]` table needed) and `nmea` is the log text, which avoids pasting it inside a TOML string. Input is capped at 4 MiB; the reply carries the document with `epochs` cut to counts by state and at most 200 degraded or untrusted epochs. For a log in another format, or with `[[events]]` to score, use `assess_receiver_log`. Advisory only: not type-approved navigation equipment; the operator remains responsible. Evidence tier: MODELLED.

输入参数nmea必填session_toml必填

assess_vessel_stream

Score a bounded excerpt of a vessel's NMEA 0183 stream the way `kshana receiver-trust live` scores it, and return per-epoch trust state (calibrating, nominal, degraded, untrusted) and 0-100 score with the monitors that deducted (live JSON-lines schema 1.3: each epoch carries `position`, an `advisory` statement that the output is advisory, and its satellite `geometry` (good, degraded with reasons such as few-satellites or high-pdop, or unknown when the excerpt has no GSV or GSA) with a `label` (good, fair, poor; geometry deducts only when poor); every deduction carries a `class`: geometry (the sky, not a finding that no attack occurred), environment or inconsistency (attack-like)), the summary (counts by state, geometry and class, lowest and final score, when the first untrusted epoch came) and the last `$PKSHT` sentence. `session_toml` declares the vessel (`[platform] kind = "vessel"`, its speed, acceleration and turn-rate limits, antenna height, whether a heading sensor is on the bus). The excerpt must hold the calibration window; input is capped at 2 MiB and 20,000 epochs, and the reply carries at most 200 degraded or untrusted epoch lines. This is the bounded form of the live command: no socket is opened and nothing is written to a port, and the gate and the telemetry exporters (the long-running process and its `--listen` server) are command-line only. The checks cannot see a spoofer whose fix is consistent with everything on the bus. Advisory only: not type-approved navigation equipment; the operator remains responsible. Evidence tier: MODELLED.

输入参数nmea必填session_toml必填

attach_evidence_timestamp

Bind an RFC 3161 timestamp token to an evidence pack (`kshana evidence attach-timestamp`), in memory: `files` is a pack as `create_evidence_pack` returns it, `token_base64` the bytes of the `.tsr` file from a timestamp authority. The token is stored as `timestamp.tsr` beside the signed manifest, not inside it, and the pack with the token must still verify or nothing is attached; an existing token is kept unless `replace` is true. Returns the updated `files` (feed them to `verify_evidence_pack` with `require_timestamp` true to insist the token is present) and the verification notes. This does NOT check the timestamp authority's signature on the token or the authority's certificate (it checks the token's structure and that its message imprint is the hash of this pack's manifest.json): say so, and point the user to `openssl ts -verify`. Input and reply are capped at 4 MiB. A timestamp shows a hash existed at a time the authority states; it is not a legal opinion. Evidence tier: MODELLED.

输入参数files必填replacetoken_base64必填

build_interference_map

Build a GNSS interference map from openly licensed aircraft (ADS-B NIC/NACp) or ship (AIS) position reports given as CSV text (`kshana interference-map adsb|ais`). Returns one GeoJSON document per UTC day (schema kshana-interference-map/v1) (file names `<source>-<dataset>-<date>.geojson`; method version 2) in which each published grid cell is `degraded`, `not_degraded`, `insufficient_sample`, `withheld_day_confounded` or `withheld_no_background` (ADS-B) or `anomalous`/`not_anomalous` (AIS), with the method, its pre-registered thresholds, the dataset licence and attribution embedded. Every per-cell count below the publication minimum (5) is `null` (withheld, never zero), and a day whose background cannot be estimated withholds its calls. Aggregate only: identifiers are hashed in memory and never returned, and a cell with fewer than 5 distinct aircraft or vessels is not published. `dataset` is an approved preset or `custom` (with licence, licence_url, attribution). Input is capped at 4 MiB and the reply at 4 MiB (use a coarser `cell_deg` or the command line for more). Nothing is fetched: land polygons, if wanted for AIS, are passed in. A degraded cell does not identify interference as the cause; an unpublished cell is not evidence of a clear cell; this is not a forecast. Evidence tier: MODELLED.

输入参数csv必填source必填dataset必填licencecell_degattributionlicence_urlland_geojson

compliance_mapping

The static public-framework mapping (`kshana compliance-report --mapping` / `--sources`) as Markdown: one table per framework with each row's paraphrased ask, the Kshana outputs that support evidence for it and the gap the outputs do not close; or, with `sources` true, the source documents the tables cite with versions and URLs. Led by the statement every report carries, which stays with any excerpt: a row marked evidenced means a run supports evidence for the capabilities the row names; it is not a finding that a framework is met, and it does not mean any product has been rated or approved by anyone. Needs no runs.

输入参数sources

compliance_report

Fill the public-framework mapping from Kshana result documents (`kshana compliance-report`): which rows of six resilience frameworks and standards (the US DHS Resilient PNT framework v2.0, IMO guidance for ships, EASA guidance for aviation, NIS2 Article 21, EN 16803, NIST IR 8323r1) the runs given support evidence for, which they do not, and the gap each row keeps. Pass each run as `label`, `result` (the result JSON text) and, when you have it, `scenario` (the scenario TOML, which names the kind a result does not; a receiver-trust result needs none). At most 64 runs and 4 MiB in all; nothing is read from disk. Each row's `status` is `evidenced`, `partly-evidenced`, `not-evidenced` or `out-of-scope`, and every row keeps its `gap` even when evidenced; inputs that could not be used are listed in `unrecognised` and count for nothing. Show the report's `statement` with any result, verbatim: a status means a run supports evidence for the capabilities the row names; it is not a finding that a framework is met, and it does not mean any product has been rated or approved by anyone. Do not describe the output in any stronger terms. Evidence tier: MODELLED.

输入参数runs必填

connect_map

Map any receiver, timing or monitoring log to Kshana observations with a `kshana.connect/1` mapping file, no code (`kshana connect map`, docs/CONNECT.md). Takes the mapping and the station as TOML text and the log as text (CSV or JSON, at most 4 MiB) and returns the `kshana.obs/1` records as JSON lines, byte-identical to the command line. A row that cannot be read is an error naming the line and field. Nothing is read from or written to disk.

输入参数text必填mapping必填station必填

create_evidence_pack

Create a signed evidence pack for a window of a vessel's NMEA 0183 log (`kshana receiver-trust evidence`): the raw log bytes for the window, the configuration with every threshold, the per-epoch results and reasons, a self-contained summary page, and a manifest listing every file's SHA-256 with the full log's hash and a hash chain, signed with Ed25519. `from_s`/`to_s` are seconds since the log's first epoch. Returns the files as JSON (feed them to `verify_evidence_pack`), the signer's public key and fingerprint. The signing seed is never returned or logged; if `signing_key_seed_hex` is omitted a one-time key is used and discarded, so the pack proves integrity against the key it names itself, not who signed it: for a key that matters, create the pack on the command line (a seed passed here travels through the conversation). Input is capped at 4 MiB and the reply at 4 MiB (narrow the window). A pack is a technical record of what the engine computed from a log under stated settings; it is not a legal opinion, a finding of fact about any event, or a certification. Evidence tier: MODELLED.

输入参数nmea必填to_s必填titlefrom_s必填session_toml必填lab_attestation_tomlsigning_key_seed_hex

create_round_trip_pack

Create the signed laboratory round-trip pack (`kshana evidence round-trip`, docs/spec/TEST-CONDITIONS.md): links by hash the scenario that produced the motion, the laboratory's `kshana.test-conditions/1` document, the receiver log and its score against the stated events, in a signed evidence pack whose `config.json` carries a `round_trip` block. Refuses a pack whose conditions and scoring events disagree, or whose stated log SHA-256 is not the log's. NO SIGNAL: nothing is written, replayed or scheduled; how a scenario's motion reached the receiver is the operator's responsibility and is recorded only as stated. The signing seed is never returned or logged; omitted, a one-time key is used and discarded (integrity, not identity). Input is capped at 4 MiB and the reply at 4 MiB. A technical record, not a legal opinion or a certification. Evidence tier: MODELLED.

输入参数log必填to_s必填titlefrom_s必填conditions必填scoring_toml必填scenario_toml必填signing_key_seed_hex

ephem_export

Write a JPL Horizons vector table (for example the CAPSTONE or Artemis I states of the mission thread) as a file flight-dynamics tools load (`kshana ephem-export`, docs/FLIGHT-DYNAMICS-EXPORT.md): a CCSDS OEM 2.0 of every state (`format` `oem`), a CCSDS OPM 3.0 of one state (`opm`, `index`), or a NAIF SPK kernel of type 13 or 9 (`spk`). The values are copied, not computed: the OEM and OPM write each double in shortest round-trip form and the SPK stores the same doubles, with the table's own epochs (TDB), object, centre and frame (ICRF, frame code 1 in the SPK). Returns JSON: the table's object, centre, NAIF ids, frame, time scale, number of states and span; the file (`suffix`, `bytes`, `sha256`, `encoding` `utf-8` or `base64` for the SPK, `content`); and `read_back`, the engine reading the file back and comparing every state with the one written (`identical` of `states`, the largest differences, and for the SPK the interpolated state at each node). Nothing is written to disk.

输入参数indextable必填degreeformatspk_typeobject_idcreation_date

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.

输入参数toml必填format必填

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.

输入参数toml必填

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.

输入参数toml必填

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.

输入参数toml必填

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.

输入参数toml必填

export_test_bench

Export a scenario's vehicle motion and events for a laboratory GNSS simulator (`kshana bench-export`, docs/TEST-BENCH.md): a motion CSV and its JSON description (Earth-fixed and geodetic position, velocity, attitude, UTC), NMEA 0183 GGA/RMC sentences, a waypoint text when the sample grid is millisecond-regular, and the scenario's events as CSV and as `[[events]]` TOML for a `receiver-trust` scenario. Applies to `gnss-ins` (its navigation-state outages are the events), `jamming` and `gnss-sim`; another kind is refused with the reason. `epoch` is the UTC instant of motion time zero, `YYYY-MM-DDTHH:MM:SS` (default 2024-01-01T00:00:00Z). Nothing is written to disk: the first content item is a JSON index (`files` with `suffix`, `bytes`, `sha256`; `notes` on any file left out; `notice`), followed by each file's text in index order. The same scenario and epoch give byte-identical files. NO SIGNAL: nothing exported is, models or drives a radio-frequency or baseband signal, and an event is a labelled interval, not a recipe for producing interference; the simulator and its operator supply the signals and are responsible for running them only where authorised. Keep the notice with the files. Kshana publishes no results from such runs. Evidence tier: MODELLED.

输入参数toml必填epoch

fit_imu_log

Fit the sensor parameters of the `hybrid` and `fusion` scenarios from a stationary IMU log (`kshana imu-fit`, docs/MACHINE-INPUTS.md). Those scenarios take noise parameters, not a time series: this reads them off a log recorded with the sensor held still, by the overlapping Allan deviation of the integrated signal. Returns JSON: `fit` (accelerometer bias, velocity-random-walk PSD `q_va`, gyro bias, angle-random-walk PSD `q_arw`, bias-instability floor when the log is long enough to show one, the log's rate and span, the early Allan slopes, and `notes` on what could not be fitted or trusted), `toml` (an `[accel_classical]` table whose provenance names the log's SHA-256, ready to paste into a scenario) and `sha256`. A log that was not stationary, or is too short or unevenly sampled, gives wrong parameters or is refused; the slopes (about -0.5 where white noise dominates) show which. Nothing is written to disk. Evidence tier: MODELLED (the estimator applied to the log, no external oracle).

输入参数idlog必填axisformatexpected_mean

generate_training_nmea

Generate synthetic bridge NMEA 0183 for crew training from a `nmea-scenario` TOML (`kshana nmea-scenario`): a vessel track and a timeline of scripted events (jamming, position drag-off, time spoof, replay delay, with recovery). Returns the checksum-valid sentence set (GGA, RMC, VTG, GSV, GSA, GNS, ZDA, HDT, VBW; the first 2000 lines) and the instructor log (what was injected when, with the true track and a top-level `summary` of peak speeds and accelerations; drag-off events carry their peak drag speed and acceleration; schema kshana-nmea-training/1) as JSON and text. The receiver's visible-satellite ceiling is `receiver.max_used` (default 12). Deterministic per `seed`. TEXT ONLY: nothing here synthesises RF, IQ or any waveform, nothing is transmitted, and the output is for training and testing, never for a vessel's live navigation systems (a marker sentence in the stream says so). Advisory, not type-approved navigation equipment. Streaming to a TCP or UDP address is command-line only. Four example scenarios ship in scenarios/training/.

输入参数seedtoml必填include_nmea

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.

输入参数name必填

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.

输入参数toml必填geojson必填

interference_emitter_regions

Estimate emitter regions from openly licensed aircraft (ADS-B) or ship (AIS) reports given as CSV text (`kshana interference-map locate`): where, under stated assumptions, a source of the degraded reports could be, as regions at stated confidence levels with a centroid and an uncertainty ellipse, never a bare point. Returns `{stem, geojson, summary, csv, svg, sessions_published, sessions_withheld}`, each text labelled with its evidence tier. Aggregate only: a region is not the position of anyone and not a finding of the cause. Input is capped at 4 MiB. Nothing is fetched. Evidence tier: MODELLED.

输入参数csv必填source必填dataset必填licenceattributionlicence_urlland_geojson

iq_acquire

FFT acquisition of one or more PRNs over an IQ recording in the work directory (`kshana iq acquire`). Reads only the samples one search needs (coherent × noncoherent code periods), which must fit the sample budget. Optional `frontend` stages (band-pass, notch, blanking, excision, AGC, quantiser) run first. Replies with one detection per PRN: `acquired`, `doppler_hz`, `code_phase_chips`, the normalised peak `statistic`, its detection `threshold` and the `peak_ratio`; `json_out` / `csv_out` also keep the full result as files, and `surface_out` (one PRN; .csv, .json or .bin) keeps the whole Doppler × code-phase correlation-power surface with the peak and its parabolic and fine-search Doppler refinements.

输入参数pfarawprns必填signal必填csv_outcoherentfrontendjson_outoverwriterecording必填noncoherentsurface_out另有 2 个

iq_campaign

Run a lab-replay campaign held in the work directory (`kshana iq campaign`): recordings (each described by a `kshana.test-conditions/1` file stating the lab's known truth) x front-end chains x loop designs, each cell tracked and scored against the stated conditions (time to loss of lock, re-acquisition time, C/N0 degradation against the stated J/S beside an analytic reference labelled MODELLED, false-lock rate, PLL/DLL jitter, availability). Incremental: one call runs the pending cells that fit the sample budget (or `max_cells`), every finished cell is kept, and the next call resumes. Replies with the cell counts, failures, the files written, and the `digest` once every cell is done. Scores recorded data only; it synthesises no interference.

输入参数resumedry_runout_dir必填workerscampaign必填max_cells

iq_campaign_status

Report a lab-replay campaign's progress from its output folder in the work directory, reading files only: cells done and pending, the recordings, front ends and designs in the plan, and the `digest` once every cell is done.

输入参数out_dir必填

iq_frontend

Apply receiver front-end and interference-mitigation DSP to an IQ recording in the work directory and write the result as a new raw recording with a `<out>.json` sidecar (`kshana iq frontend`). `stages` picks any of: `bandpass_hz` [lo, hi] FIR, adaptive `notch`, pulse `blank`ing, frequency-domain `excise`, `agc`, and a `bits`-bit quantiser (preceded by an automatic AGC unless `no_agc`), always in that order. The whole input must fit the sample budget. Replies with the samples processed and the files written with their byte counts. This processes a recording; it synthesises nothing.

输入参数out必填rawinput必填stages必填overwriteout_format

iq_info

Describe one IQ recording in the work directory without processing it: kind (raw with sidecar, SigMF, SigMF collection), sample format, sample rate, centre frequency, total samples, duration, data files and their size, capture boundaries and annotation count, as JSON (the same row `kshana iq info` prints). Optional `raw` describes a raw file with no sidecar; optional `hash` adds each data file's SHA-256 (reads the whole file).

输入参数rawhashrecording必填

iq_labfit

Fit the tracking-loop loss-of-lock model to lab runs (`kshana iq labfit`): an `iq-labfit` scenario TOML names one or more runs, each a receiver log plus its stated test conditions; the engine loads each log, fits the loop and empirical models, bootstraps the uncertainty and computes the hold-out error. Everything is inline: each run's `log` gives `text` or `base64` (a `path` is refused) and the tool reads and writes no file, so it does not need the IQ work directory. Alternatively the scenario's `[input]` names `campaign = "<out-dir>"`, a finished `kshana iq campaign` output folder: the tool then fits the C/N0 and lock models to its scored cells (a `kshana.labfit-iq/1` report; Q is stated, never fitted, and the identifiable J/S offset is fitted; with `mode = "validation"` a `[validation]` table is required). That folder is resolved relative to the IQ work directory and must lie inside it (anything outside is refused); it is read, nothing is written. Replies with the parsed `report`, the residuals and predictions as CSV text and a Markdown summary. Input is capped at 4 MiB. The fit describes the lab runs given; it is not a prediction for other receivers or conditions beyond what the report states. Evidence tier: MODELLED.

输入参数toml必填

iq_monitor

Run the interference and spoofing detection monitors over an IQ recording in the work directory (`kshana iq monitor`): the wideband `power` and `spectral` monitors, and, given `signal` + `prns`, the per-satellite C/N0 and signal-quality monitors, each against a baseline learned from the first `baseline_s` seconds (or from a settings file). Replies with the series (name and length), every event the monitors raised (start, end, monitor, what changed; at most 200 in the reply), and the settings and baselines the monitors learned; `json_out` keeps the whole report (every series, event and spectrum) and `csv_prefix` writes `<prefix>.series.csv` and `<prefix>.events.csv`. The span must fit the sample budget (`max_seconds` narrows it). A monitor event says a measured quantity left its learned baseline; it does not identify a cause or a source. This scores recorded data only; it synthesises nothing. Evidence tier: MODELLED.

输入参数rawprnspowersignalcoherentjson_outsettingsspectraldll_bw_hzfll_bw_hzoverwritepll_bw_hz另有 7 个

iq_scene

Generate a multi-satellite GNSS IQ scene into a file in the work directory (`kshana iq scene`). Stated-profile mode: `signal` + `prns` (+ optional `dopplers_hz`, `cn0_dbhz`, `data`). Broadcast mode: `nav` (a RINEX navigation file in the work directory) + `rx_pos` [lat, lon, alt] places each healthy GPS satellite at its true broadcast geometry. Optional `channel` applies ionosphere, troposphere, scintillation, multipath, land-mobile shadowing or NLOS at the signal level. `rate_hz × duration_s` must fit the sample budget (see iq_signals). Writes the recording (raw + `<out>.json` sidecar, or a SigMF pair) and a truth sidecar; replies with the files written and their byte counts, the sample count and sampling, and the truth's first epoch per satellite (code phase, Doppler, C/N0) to score iq_acquire against. The IQ layer adds no interference or spoofer synthesis; nothing is ever transmitted.

输入参数navout必填dataprnsseedif_hzformatrx_possignalchannelrate_hz必填threads另有 10 个

iq_signals

The GNSS IQ layer's set-up, as JSON: `signals` (the signal names iq_scene, iq_acquire and iq_track accept), `enabled` (whether the IQ file tools are on), `work_dir` (the only folder they read and write; every path argument is relative to it), `max_samples` (the most complex samples one call may generate or process) and, when off, `reason`. IQ samples never travel through the protocol: tools take file paths in the work directory and reply with compact JSON summaries. The IQ layer adds no interference or spoofer synthesis; nothing is ever transmitted. Call this first.

无需输入参数。

iq_sweep

Replay one IQ recording in the work directory across several tracking-loop designs and report each design's steady-state result (`kshana iq sweep`): the designs are every design of a `kshana.loop-design/1` file (`design`), or the product of the `pll_bws_hz`, `dll_bws_hz`, `spacings_chips` and `coherents` lists on the built-in design. Each PRN is acquired once and every (design, PRN) channel tracks the same samples, so each result is exactly that of running the design alone. Replies with, per design and PRN, `epochs`, `phase_jitter_deg` and `code_jitter_chips` (over the second half of the run), `phase_lock_frac`, `code_lock_frac`, `mean_cn0_dbhz` and the design's hash; `json_out` / `csv_out` keep the table as files. The span tracked must fit the sample budget (`max_seconds` narrows it) and at most 256 (design, PRN) channels run per call. This processes a recording; it synthesises nothing.

输入参数rawprns必填designsignal必填csv_outthreadsfrontendjson_outcoherentsoverwritereacquirerecording必填另有 8 个

iq_test_conditions

Validate a lab test-condition file (`kshana iq conditions`): a `kshana.test-conditions/1` file, TOML or JSON text, stating the lab's known truth for a recording (the satellites expected, the settle time, the stated jamming or interference schedule). Replies with the resolved conditions and their `hash`, or the reason the file is invalid. Inline only: nothing is read from disk, and a recording path the file names is not opened (a campaign resolves those inside the work directory). Input is capped at 4 MiB.

输入参数conditions必填

iq_track

Acquire then track one or more PRNs over an IQ recording in the work directory (`kshana iq track`): acquisition initialises each channel, then the DLL/PLL (optionally FLL-assisted) loop bank replays the recording once. The samples tracked (the whole recording, or its first `max_seconds`) must fit the sample budget. The loops come from `design` (a `kshana.loop-design/1` TOML file in the work directory, `design_name` to pick one) or the built-in design, with the loop arguments overriding it; `reacquire` re-acquires a channel that loses lock or false-locks. Tracking streams, so memory does not grow with the recording. Replies with the design's name and hash, any `warnings` (`commensurate_sampling`: a sample rate that is a multiple of half the chip rate makes code-loop jitter and bias unrepresentative) and, per channel, the epoch count, seconds tracked, final Doppler and code phase, final and mean C/N0 (dB-Hz), the fractions of epochs in phase and code lock, `locked_at_end`, the final lock state, false locks detected and re-acquisitions. Per-epoch output goes to files only: `epochs_out` (E/P/L, discriminators, loop states, C/N0, lock state; .csv/.jsonl/.bin), `events_out`, `json_out` / `csv_out`. A PRN that is not acquired is refused with its statistic and threshold.

输入参数rawprns必填designsignal必填csv_outthreadscoherentjson_outdll_bw_hzfll_bw_hzoverwritepll_bw_hz另有 12 个

jammertest_import

Read the published Jammertest test catalogue and transmission plan (NPRA/jammertest-plan, MIT) as scheduled truth (`kshana jammertest import`): the slots of one test area become receiver-trust events with the catalogue id and year in each label. `plans` holds one plan file per day, `log_start_utc` is the log's first epoch, `local_offset_h` the plan's offset from UTC (default 2, CEST). Returns `events_toml` (append it to a receiver-trust session), `events` (test id, kind, onset and end in seconds since the log start), and the counts skipped. The events are PLANNED slots, not recorded on-air times: a slot may start late or never run, and the plan's `status` field is mostly empty. No contact or personal field of the plan is read. Input is capped at 4 MiB per text. Evidence tier: MODELLED.

输入参数yearplans必填locationcatalog_json必填log_start_utc必填local_offset_h

jammertest_score

Score a receiver log against the Jammertest schedule (`kshana jammertest score`): per scheduled test the detection latency (first alarm minus planned start), whether it was detected within the tolerance, late or missed, and the time to recover (an alarm-free stretch of `recover_hold_s`), plus the false alarms outside every slot and its guard. `session_toml` needs only `[log] format = "ubx"` (or rinex, android, nmea, sbf); give the log as `log` (text formats) or `log_base64` (binary). Needs the catalogue and plan JSON (`catalog_json`, `plans`) and the test area (`location`). Returns the scorecard: `tests`, `summary`, `baseline_contaminated` and a MODELLED label. The schedule is planned slots, not recorded on-air times, so a miss may be a test that never ran. A signed evidence pack needs a signing key: use the command line (`kshana jammertest score --key`). Input is capped at 4 MiB per text. Advisory only: not type-approved navigation equipment; the operator remains responsible. Evidence tier: MODELLED.

输入参数logyearplans必填guard_slocationlog_base64catalog_json必填session_toml必填log_start_utclocal_offset_hrecover_hold_s

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`).

输入参数kind

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.

输入参数toml必填

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.

输入参数lang

list_standards_packs

List the standards packs (`kshana standards-pack list`): scored scenario sets for the DHS Resilient PNT framework test profiles, IMO MSC.1/Circ.1575 and ICAO Doc 9849 Appendix F, each with the bars it states before the run and the compliance rows it supports evidence for. Needs no input. A pack measures modelled scenarios against stated bars; it rates no product. Evidence tier: MODELLED.

无需输入参数。

lunanet_afs_check

Check the LunaNet Augmented Forward Signal (AFS) against the published specification, pinned to LNIS Version 5 Applicable Document 1 Volume A (LSIS-AFS V1.0, 29 January 2025) (`kshana lunanet-afs-check`, docs/LUNANET-AFS.md). Mode `spec` checks this implementation against the document's printed code tables (the first and last 24 chips of every AFS-I Gold, AFS-Q Weil and tertiary code for PRN 1 to 210, and both Legendre sequences) and worked examples (SB1 BCH, CRC-24Q), bars B1 to B10 of a pre-registration; B4 reports one miss (the document prints the same last 24 chips for tertiary PRN 147 and 151). Mode `symbols` checks a hard-decision symbol stream (text of 0 and 1) for the synchronisation pattern, SB1 decoding, FID, TOI continuity and frame spacing. Subframes 2 to 4 (rate-1/2 LDPC, CRC-24Q) are NOT verified: the LDPC matrices are in a separate annex that is not implemented. Mode `generate` returns a test stream with placeholder subframes: symbols, not a waveform; Kshana writes no signal. VALIDATED only against the printed tables of that edition, which the document itself marks TBC; say so, and do not describe a result as showing that any LunaNet node or service is correct. Advisory only.

输入参数mode必填toi0framessymbolsmax_sp_errors

referee_location_score

Score where a monitoring network said interference came from (`kshana jammertest locate-score`, 0.41 row B2): per report the event it belongs to (by id, or by time window and nearest truth), the horizontal geodesic error and vertical error, and for each region (an ellipse with its covariance, a polygon or grid cells) whether it contains the truth and its area; per event and pooled the median and 90th-percentile error, coverage per level with its binomial check, median region size, time to first location and time to locate within 100 m, 500 m, 1 km and 5 km; and false locations per hour of clean time. Definitions: docs/design/evidence/b2-referee-metrics/PREREGISTRATION.md. Input is capped at 4 MiB per text. It checks arithmetic, not any locator's accuracy. Evidence tier: the metrics are checked against an independent oracle; a locator scored with them is only as good as its own evidence.

输入参数truth_json必填reports_json必填

render_leaderboard

Render kshana-bench result files (`kshana bench leaderboard`) as the static leaderboard page, HTML text in the reply: `results` is a list of `kshana-bench-result/1` JSON texts (at most 256, 4 MiB each), each validated first; a file scored under another major spec version is refused because results of different major versions are never put in one table. A row says this file scored this number on this split; it does not mean any product has been rated or approved by anyone. Nothing is written. Evidence tier: MODELLED.

输入参数results必填

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.

输入参数toml必填formatscenario_file

route_exposure

Summarise how much of a route runs through degraded cells of one or more interference maps (`kshana route-exposure`): for each map (one per source per UTC day, the GeoJSON `build_interference_map` returns), the route length and the shares of its length in degraded cells, in cells that were not degraded, in cells with too little sample to assess, and in cells not observed. The route is a GeoJSON LineString or `lat,lon` CSV text; `date_from`/`date_to` (YYYY-MM-DD) keep maps in a date range. Input is capped at 4 MiB per item. Cells not observed are not evidence of a clear route; a degraded cell does not identify interference as the cause; this describes past reports and is not a forecast. Evidence tier: MODELLED.

输入参数maps必填route必填date_todate_from

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`. Content is inline: a scenario field that names a file is refused, and a scenario is at most 4 MiB. 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.

输入参数langtoml必填include_chart

run_standards_pack

Run one standards pack (`kshana standards-pack run <id>`): every scenario in it, scored against bars stated before the run. Returns the report (each test `MET`, `NOT MET`, or `NEEDS INPUT` when it needs a receiver log and is not scored; each bar with its measured and expected value) and the same as `markdown`. Pass the report JSON to `compliance_report` to see the rows the pack supports evidence for. Say plainly that a MET bar means a modelled scenario met a stated bar, and that a NOT MET is a result on record; never describe the output as showing that a product or a framework is met. Advisory only: analysis output, not type-approved navigation equipment. Evidence tier: MODELLED.

输入参数pack必填

score_benchmark

Score a kshana-bench submission (`kshana bench score`, bench/SPEC.md, docs/BENCH.md): a predictions file (`kshana-bench-predictions/1`) against a truth file (`kshana-bench-truth/1`), both JSON text, at most 4 MiB each, and return the result file (`kshana-bench-result/1`) with the spec version, task (a detection on receiver logs, b detection on IQ, c timing holdover prediction, d out-of-distribution optimism gap), split, the SHA-256 of both inputs and the task's metrics (AUC, detection probability at a false-alarm cap, RMSE per horizon, or the optimism gap). `threshold` is the declared alarm threshold of tasks a and b. Nothing is read from disk or written. Every score is MODELLED and describes a log or corpus, never a product; it is not a certification and no organisation is endorsed by a score. Evidence tier: MODELLED.

输入参数truth必填thresholdpredictions必填

sky_geometry

Sky geometry under an azimuth-dependent skyline (a street canyon, a harbour, a fjord, a container terminal): from a site, a time and constellation presets, two-line element sets (`tle`, with a UTC `epoch`) or satellites given as azimuth/elevation or ECEF, which satellites are visible and which are hidden by the skyline, GDOP/PDOP/HDOP/VDOP/TDOP from the gnss_lib_py-checked DOP kernel, the east-north-up cofactor and covariance with one receiver clock per system (or one in common), and the horizontal error ellipse at one sigma and at a stated confidence for a stated UERE. With no `request`, describes a REPRESENTATIVE skyline preset with its provenance and its cut every degree (an empty `skyline_preset` lists them). Scenarios of the orbit and integrity (with `user_site`), gnss-sim, jamming, leo-pvt and leo-pass kinds take the same `[skyline]` section through run_scenario. Evidence tier MODELLED: geometry under a stated error model, line of sight only; not a prediction of a receiver's real error and not an integrity bound; preset constellations are a representative sky, not the sky of a date; `tle` text with an `epoch` (UTC) gives the sky those element sets give at that epoch (SGP4), not a measurement, and `sky_source` says which. Carries the advisory: not type-approved navigation equipment. No Monte Carlo over MCP (bulk samples; use the CLI, Python or WASM). Inline only, at most 4 MiB.

输入参数requestskyline_preset

trust_telemetry

Render a GNSS trust stream or a `receiver-trust` result as security telemetry text (`kshana trust-telemetry`, docs/TRUST-TELEMETRY.md), with the same encoders the command line uses: `prometheus` (the exposition of the final state), `cef` or `leef` (one RFC 5424 syslog line per band change, or per epoch with `syslog_all`; no timestamp, because no clock is read) or `otlp` (the OTLP/HTTP JSON metrics payload). `input_kind` is `jsonl` (default) or `result`; a stream line that does not parse is skipped and counted in `kshana_trust_input_errors_total`. Nothing is sent, served or written: the output is text in the reply (the running exporters, which are a process, stay on the command line). The receiver-reported position is left out unless `expose_position` is true. An input that carries satellite geometry (live schema 1.3, results from 0.36) adds the geometry label (good, fair, poor; never scored but for poor) and status, HDOP, PDOP, VDOP and satellites used, and a `class` label (geometry, environment, inconsistency) on each reason; an older input renders exactly as before. Advisory only: Kshana is not type-approved navigation equipment (IEC 61108, IEC 61162) and the operator remains responsible. Evidence tier: MODELLED.

输入参数hostinput必填format必填unix_nanoinput_kindsyslog_allexpose_position

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.)

输入参数toml必填

verify_evidence_pack

Verify a signed evidence pack (`kshana evidence verify`): every file's SHA-256 against the manifest, the hash chain, the Ed25519 signature, and with `public_key` (the signer's key, from the signer by another route) that the signer is the one expected, and with `full_log` that the log you hold is the one the pack records and that the slice came from it. Returns the report: `ok`, each failure by code and file, every check, `signer_pinned`, notes, and a `verdict`: `verified` (signer pinned), `intact-signer-not-pinned` (everything checks but no trusted `public_key` was given, so the signature proves only that the pack is intact against the key it names itself, which anyone can generate; say so, do not call it verified) or `failed`, with a `message` to show the user. `require_timestamp` fails a pack that carries no timestamp token. Inputs are capped at 4 MiB. A verified pass says the record is unchanged and who signed it (the key you supplied); it does not say what caused any event, who is responsible, or that the log shows what the receiver really received.

输入参数files必填full_logpublic_keyrequire_timestamp

版本历史

21
  1. v0.41.0最新Nov 13, 2026
  2. v0.39.0Oct 24, 2026
  3. v0.38.0Oct 21, 2026
  4. v0.37.0Oct 18, 2026
  5. v0.36.0Oct 17, 2026
  6. v0.35.0Oct 12, 2026
  7. v0.34.1Oct 10, 2026
  8. v0.34.0Oct 10, 2026
  9. v0.33.1Oct 9, 2026
  10. v0.33.0Oct 9, 2026
  11. v0.32.0Oct 5, 2026
  12. v0.31.0Oct 5, 2026
  13. v0.30.0Oct 4, 2026
  14. v0.29.3Oct 1, 2026
  15. v0.29.1Oct 1, 2026
  16. v0.28.0Sep 27, 2026
  17. v0.27.4Sep 27, 2026
  18. v0.27.2Sep 23, 2026
  19. v0.27.1Sep 22, 2026
  20. v0.26.0Sep 18, 2026
  21. v0.25.0Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分