Sidereon.GNSS.Scenario (Sidereon v0.22.0)

Copy Markdown View Source

Deterministic synthetic GNSS observable scenarios.

Scenarios may be supplied as core-schema JSON text or as Elixir maps. The simulator returns deterministic JSON bytes plus the core fingerprint, or a decoded map with receiver truth, observable arrays, and ground-truth term arrays.

Summary

Types

Simulation result decoded from the deterministic core bytes.

Synthetic scenario map or JSON text.

Functions

Simulate a scenario and return decoded arrays.

Simulate a scenario and return deterministic JSON bytes.

Types

result()

@type result() :: %{
  schema_version: integer(),
  engine_version: String.t(),
  seed: integer(),
  receiver_truth: [map()],
  observations: map(),
  truth_terms: map(),
  determinism_fingerprint: non_neg_integer()
}

Simulation result decoded from the deterministic core bytes.

scenario()

@type scenario() :: map() | keyword() | String.t()

Synthetic scenario map or JSON text.

Functions

simulate(scenario)

@spec simulate(scenario()) :: {:ok, result()} | {:error, term()}

Simulate a scenario and return decoded arrays.

The :observations and :truth_terms entries contain contiguous arrays from the core scenario engine. For exact byte-for-byte determinism checks, use simulate_bytes/1.

simulate_bytes(scenario)

@spec simulate_bytes(scenario()) ::
  {:ok, binary(), non_neg_integer()} | {:error, term()}

Simulate a scenario and return deterministic JSON bytes.

Repeating this call with the same scenario and seed returns identical bytes from the core engine.