Skip to main content

Simulation Sessions

Version: 1.1.0 Simulation Sessions extend the Orbital Sim with stateful, multi-satellite simulation. Unlike the stateless propagation endpoints, sessions persist constellation state in KV and let you advance time step-by-step, track subsystem health, model inter-satellite link quality, and inject faults.
Sessions are designed for integration testing of constellation workloads. They power the agent executor’s simulated satellite mode and the CAE constellation planner’s test harness.

Base URL

Concepts

Session Lifecycle

A session represents a constellation of up to 50 satellites. On creation, each satellite is initialized with orbital elements and default subsystem state. You advance the simulation by calling the tick endpoint, which propagates orbits, updates subsystems, checks for natural faults, and recalculates ISL links. Sessions are stored in the SIM_STATE KV binding with a 1-hour TTL. If a session is not ticked within one hour, it is automatically evicted.

Subsystem State

Every satellite in a session tracks five subsystems: Inter-satellite links (ISLs) are modeled between all satellite pairs within range: A link quality of 0 means the satellites are out of range. Quality degrades linearly with distance and is further penalized during eclipse due to thermal effects on transponders.

Natural Fault Detection

Each tick evaluates three natural fault conditions: When a natural fault triggers, it is included in the tick response as a faults array entry.

Endpoints

Create Session

Creates a new simulation session with the specified satellites. Request body:
Response (201):
Sessions are limited to 50 satellites. Requests exceeding this limit return a 400 error.

Get Session State

Returns the full constellation state including all satellite positions, subsystems, and active ISL links. Response (200):

Tick (Advance Simulation)

Advances the simulation by one time step. Each tick performs the following in order:
  1. Propagate all satellite orbits forward
  2. Detect eclipse transitions (sunlit/shadow)
  3. Update subsystem state (battery, thermal, solar)
  4. Check natural fault conditions
  5. Recalculate all ISL links
Request body:
Response (200):
The eclipse_transitions array only contains satellites whose eclipse state changed during this tick. An empty array means no transitions occurred.

Inject Fault

Injects a fault into a specific satellite. The fault takes effect immediately and is reflected in the session state. Request body: Fault types and effects:
Response (200):
Fault injection is irreversible within a session. To restore a satellite, create a new session.

Storage

Sessions are stored in the SIM_STATE KV binding. Each session is a single JSON document keyed by session:{session_id}. The 1-hour TTL ensures stale sessions are automatically cleaned up.

Orbital Sim Overview

Stateless propagation, eclipse detection, and pass prediction

Sim API Reference

Full API reference for all Sim endpoints