How dzentec/sia_sim works
SIA Simulation is a deterministic 100 Hz yacht physics-and-sensor testbed for validating a safety core. The principal workflow configures a scenario, advances the simulated sea, vessel and sails, converts physical truth into an isolated SensorFrame, then evaluates SIA decisions against an independent oracle. The repository also provides an interactive workbench, sail advice and rig controls, and high-frequency run recording. The graph follows the README’s documented architecture and sampled entry points; some internal runner wiring and unsampled subsystem details are not shown.
Main entry points: runner.py Simulation Runner · server.py Web Workbench · data.py Ground Truth · app.js Browser Cockpit
Components 19
Simulation Core
- Scenario Setup
src/sia_sim/scenarios/presets.py - Clock and RNG
src/sia_sim/core/clock.py - Sea Environment
src/sia_sim/physics/world.py - Vessel Dynamics
src/sia_sim/physics/dynamics.py - 3D Sail Rig
src/sia_sim/physics/sails/rig.py - Simulation Runner
src/sia_sim/engine/runner.py - Ground Truth
src/sia_sim/contracts/data.py
Sensing and SIA
- Sensor Pipeline
src/sia_sim/sensors/pipeline.py - SensorFrame Contract
src/sia_sim/contracts/data.py - SIA Core Adapter
src/sia_sim/sia/mock_sia.py - Sail Advisor
src/sia_sim/sails/advisor.py
Validation and Records
- Evaluator
src/sia_sim/evaluator/evaluator.py - Oracle Engine
src/sia_sim/evaluator/oracle.py - Run Recorder
src/sia_sim/recorder/run_recorder.py
Workbench and Controls
- Web Workbench
src/sia_sim/workbench/server.py - Simulation API
src/sia_sim/web/server.py - Rig Controller
src/sia_sim/engine/rig_controller.py - Browser Cockpit
src/sia_sim/workbench/static/js/app.js
Other components
- Skipper / Operator
Connections 27
- Skipper / Operator → Web Workbench: configures run
- Web Workbench → Scenario Setup: loads scenario
- Web Workbench → Simulation Runner: starts simulation
- Scenario Setup → Simulation Runner: configures
- Simulation Runner → Clock and RNG: steps deterministically
- Simulation Runner → Sea Environment: advances environment
- Simulation Runner → Vessel Dynamics: advances vessel
- Simulation Runner → 3D Sail Rig: evaluates sails
- Sea Environment → Ground Truth: contributes state
- Vessel Dynamics → Ground Truth: contributes state
- 3D Sail Rig → Ground Truth: contributes forces
- Simulation Runner → Sensor Pipeline: supplies truth
- Ground Truth → Sensor Pipeline: transforms
- Sensor Pipeline → SensorFrame Contract: produces
- Simulation Runner → SIA Core Adapter: provides observations
- SensorFrame Contract → SIA Core Adapter: only input
- SIA Core Adapter → Sail Advisor: requests advice
- Simulation Runner → Evaluator: submits run
- Simulation Runner → Oracle Engine: submits truth
- Simulation Runner → Run Recorder: records tick data
- Evaluator → Oracle Engine: compares outcome
- Browser Cockpit → Simulation API: streams controls
- Simulation API → Simulation Runner: steps and streams
- Browser Cockpit → Web Workbench: configures run
- Web Workbench → Rig Controller: submits rig commands
- Rig Controller → 3D Sail Rig: applies rig state
- Skipper / Operator → Browser Cockpit: operates