|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Directories | |
| webviewer | |
Files | |
| rename_hashes.py | |
| validate_export.py | |
Export Elodin DB data to parquet, CSV, or Arrow for analysis. This document describes what data the DB stores, downsampling behavior, and how to export.
| Source | Data | Rate | Downsampled? |
|---|---|---|---|
| daq_bridge | Raw PT, TC, RTD, LC [0x20,0x21,0x22,0x23] | Every packet | No |
| daq_bridge | Actuator status [0x30] (actuator state [0x31] is NOT in the publish allowlist) | Every packet | No |
| daq_bridge | Board heartbeats [0x10] | Every heartbeat | No |
| calibration_service (C++) / calibration_server (Python) | Calibrated PT, TC, RTD, LC [0x20/0x21/0x22/0x23 + 0x10] | Max ~100 Hz/ch | Yes (throttle) |
| ControllerService | Actuation [0x40], diagnostics [0x41] | Every tick | No |
| ControllerService | Measurement [0x42] | Every 10th tick | Yes (10% sample) |
| ControllerService | PSM state [0x43], fire state [0x44] | On change | No |
Controller measurement (10% sample):
Calibrated data (100 Hz throttle):
| Packet ID | Description | Source |
|---|---|---|
| [0x10, board_id] | Board heartbeat | daq_bridge |
| [0x20, 0x01..0x0E] | Raw PT ADC counts | daq_bridge |
| [0x20, 0x11..0x1E] | Calibrated PT (PSI) | calibration_server |
| [0x21, 0x01..0x14] | Raw TC ADC counts | daq_bridge |
| [0x21, 0x11..] | Calibrated TC (°C) | calibration_server |
| [0x22, 0x01..0x14] | Raw RTD resistance counts | daq_bridge |
| [0x22, 0x11..] | Calibrated RTD (°C) | calibration_server |
| [0x23, 0x01..0x14] | Raw LC ADC counts | daq_bridge |
| [0x23, 0x11..] | Calibrated LC (force) | calibration_server |
| [0x26, (slot-1)·0x20 + ain] | LabJack T7 raw input, T7<slot>.AIN<n>.volts (ain 0–13; 14 = internal temperature sensor) | t7_bridge |
| [0x26, (slot-1)·0x20 + 0x0F] | T7 thermocouple cold junction, T7<slot>.CJC.temperature_c (TC boards only) | t7_bridge |
| [0x26, (slot-1)·0x20 + 0x10 + ain] | T7 calibrated, T7<slot>_Cal.AIN<n>.pressure_psi / temperature_c / force_kg (+ raw_uv, the µV code calibration works in) | calibration_service |
| [0x30, 0x01..0x0A] | Actuator status (current sense) | daq_bridge |
| [0x31, 0x01..0x14] | Actuator state (open/closed) | not in [daq_bridge] publish allowlist |
| [0x40, 0x00] | Controller actuation | ControllerService |
| [0x41, 0x00] | Controller diagnostics | ControllerService |
| [0x42, 0x00] | Controller measurement | ControllerService (every 10th tick) |
| [0x43, 0x00] | PSM state transition | ControllerService |
| [0x44, 0x00] | Fire state | ControllerService |
| [0x45, 0x00] | Navigation state | Autopilot |
A T7's channels are named, and their kind (PT / TC / LC) and datasheet numbers recorded, only in config. A T7 slot is its board_id % 10 (0 → 10), the same rule as every other board. The session copies the run's config beside the run dir as <run_id>.toml. Read the [[boards.<name>.channels]] rows there to know what T7<slot>.AIN<n> was. The webviewer does this (webviewer/backend/run_config.py), and replay_past_db.sh runs the GUI on that file rather than on today's config.
Only data in [daq_bridge] publish is written. See config/config.toml:
Calibrated PT/TC/RTD/LC come from calibration_server.py (when use_robust_stack = true).
Requires elodin-db with export subcommand (newer versions).
If elodin-db export is not available:
Browse a run interactively in the webviewer (webviewer/, see its README); it reads the run's own config sidecar, so roles and LabJack T7 channels are labelled. The old static-PNG pipeline (analyze_run.py, plot_latest_db.sh) and the Cd scripts (calc_cd.py, characterize_cd.py) were removed: they expected entity and column names nothing produces any more.
After CSV export, summarize what entity families landed on disk (PT cal, actuators, controller, etc.):
After exporting to parquet: