|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Unit tests for fsw::calibration::CaptureWindow (pure, deterministic — no clock). More...
#include <CaptureWindow.hpp>
Public Attributes | |
| bool | ok = false |
| false → the caller must NOT create a point | |
| double | adc_avg = 0.0 |
| size_t | n = 0 |
| samples inside the window | |
| uint64_t | span_ms = 0 |
| ts span actually covered | |
| uint64_t | age_ms = 0 |
| how old the newest sample is, our clock | |
| uint64_t | window_ms = kCaptureWindowMs |
| the window this sensor's rate called for | |
| uint64_t | max_age_ms = kMaxSampleAgeMs |
| the staleness limit it was held to | |
| double | spread = 0.0 |
| max - min inside the window | |
| double | drift = 0.0 |
| |mean(2nd half) - mean(1st half)| | |
| double | drift_z = 0.0 |
| drift in standard errors | |
| bool | settled = true |
| false → recorded, but flagged | |
| const char * | reason = kReasonOk |
Unit tests for fsw::calibration::CaptureWindow (pure, deterministic — no clock).
House style: plain main(), return 0 on pass / 1 on failure (see test_board_clock_sync.cpp). Registered with CTest in lib/CMakeLists.txt.
The headline test is low_rate_step_after_settle: it replays the 2026-09-13 load-cell failure at the measured 13.7 Hz and asserts both that the bounded window is right AND that the old unbounded mean was wrong by the margin actually seen on the stand.
Definition at line 104 of file CaptureWindow.hpp.
| double fsw::calibration::CaptureResult::adc_avg = 0.0 |
Definition at line 106 of file CaptureWindow.hpp.
| uint64_t fsw::calibration::CaptureResult::age_ms = 0 |
how old the newest sample is, our clock
Definition at line 109 of file CaptureWindow.hpp.
| double fsw::calibration::CaptureResult::drift = 0.0 |
|mean(2nd half) - mean(1st half)|
Definition at line 113 of file CaptureWindow.hpp.
| double fsw::calibration::CaptureResult::drift_z = 0.0 |
drift in standard errors
Definition at line 114 of file CaptureWindow.hpp.
| uint64_t fsw::calibration::CaptureResult::max_age_ms = kMaxSampleAgeMs |
the staleness limit it was held to
Definition at line 111 of file CaptureWindow.hpp.
| size_t fsw::calibration::CaptureResult::n = 0 |
samples inside the window
Definition at line 107 of file CaptureWindow.hpp.
| bool fsw::calibration::CaptureResult::ok = false |
false → the caller must NOT create a point
Definition at line 105 of file CaptureWindow.hpp.
| const char* fsw::calibration::CaptureResult::reason = kReasonOk |
Definition at line 116 of file CaptureWindow.hpp.
| bool fsw::calibration::CaptureResult::settled = true |
false → recorded, but flagged
Definition at line 115 of file CaptureWindow.hpp.
| uint64_t fsw::calibration::CaptureResult::span_ms = 0 |
ts span actually covered
Definition at line 108 of file CaptureWindow.hpp.
| double fsw::calibration::CaptureResult::spread = 0.0 |
max - min inside the window
Definition at line 112 of file CaptureWindow.hpp.
| uint64_t fsw::calibration::CaptureResult::window_ms = kCaptureWindowMs |
the window this sensor's rate called for
Definition at line 110 of file CaptureWindow.hpp.