|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Per-sensor calibration record: identity, captured points, and the current fit. More...
#include <CubicCalibrationStore.hpp>
Public Attributes | |
| uint16_t | uid = 0 |
| uint8_t | board_id = 0 |
| uint8_t | connector = 0 |
| uint8_t | logical_ch |
| std::string | role |
| std::string | active_model = "cubic" |
| SensorKind | kind = SensorKind::PT |
| bool | live = false |
| True when the RUNNING config declares a board/connector that owns this uid, i.e. | |
| std::string | raw_unit = "adc" |
| What a point's adc means: kRawUnitAdc for an ESP32 board's ADC code, kRawUnitMicrovolts for a LabJack T7 channel's reading in µV. | |
| std::vector< CubicPoint > | points |
| CubicFit | fit |
| CubicFit | fit_cubic |
| CubicFit | fit_linear |
| std::vector< std::pair< double, double > > | fit_curve |
| CaptureQuality | last_capture |
| std::string | status = "PENDING" |
| std::string | last_error |
| double | updated_at = 0.0 |
Per-sensor calibration record: identity, captured points, and the current fit.
Definition at line 77 of file CubicCalibrationStore.hpp.
| std::string fsw::calibration::CubicChannel::active_model = "cubic" |
Definition at line 88 of file CubicCalibrationStore.hpp.
| uint8_t fsw::calibration::CubicChannel::board_id = 0 |
Definition at line 79 of file CubicCalibrationStore.hpp.
Referenced by board_simulator.SimulatedBoard::_generate_data(), board_simulator.SimulatedBoard::_send_heartbeat(), and main().
| uint8_t fsw::calibration::CubicChannel::connector = 0 |
Definition at line 80 of file CubicCalibrationStore.hpp.
| CubicFit fsw::calibration::CubicChannel::fit |
Definition at line 116 of file CubicCalibrationStore.hpp.
| CubicFit fsw::calibration::CubicChannel::fit_cubic |
Definition at line 120 of file CubicCalibrationStore.hpp.
| std::vector<std::pair<double, double> > fsw::calibration::CubicChannel::fit_curve |
Definition at line 124 of file CubicCalibrationStore.hpp.
| CubicFit fsw::calibration::CubicChannel::fit_linear |
Definition at line 121 of file CubicCalibrationStore.hpp.
| SensorKind fsw::calibration::CubicChannel::kind = SensorKind::PT |
Definition at line 91 of file CubicCalibrationStore.hpp.
Referenced by backend.routers.layerx.Job::view().
| CaptureQuality fsw::calibration::CubicChannel::last_capture |
Definition at line 125 of file CubicCalibrationStore.hpp.
| std::string fsw::calibration::CubicChannel::last_error |
Definition at line 127 of file CubicCalibrationStore.hpp.
| bool fsw::calibration::CubicChannel::live = false |
True when the RUNNING config declares a board/connector that owns this uid, i.e.
register_channel() was called for it. False for an ORPHAN: an entry load() resumed from disk whose board is disabled, removed, or whose connector is not in active_connectors.
An orphan's points stay here — durable, and they re-attach by role when the board comes back — but its logical_ch is NOT its own. logical_ch is (slot - 1) * 10 + connector with slot = board_id % 10, and nothing stops two boards of different kinds sharing a slot, so a disabled LC board 41's connectors 1/6/7 name the same logical channels as live PT board 21's. Anything that pushes a fit into (or clears it from) a live logical-channel map must therefore ask live first — see cal_target() below.
Definition at line 104 of file CubicCalibrationStore.hpp.
Referenced by backend.routers.layerx.Job::feed(), main(), and backend.routers.layerx.Job::view().
| uint8_t fsw::calibration::CubicChannel::logical_ch |
| std::vector<CubicPoint> fsw::calibration::CubicChannel::points |
Definition at line 112 of file CubicCalibrationStore.hpp.
Referenced by engine.optimizer.layers.layer1_static_optimization.ElitePool::add(), engine.optimizer.layers.layer1_static_optimization.ElitePool::get_best(), engine.optimizer.layers.layer1_static_optimization.ElitePool::get_elites(), and main().
| std::string fsw::calibration::CubicChannel::raw_unit = "adc" |
What a point's adc means: kRawUnitAdc for an ESP32 board's ADC code, kRawUnitMicrovolts for a LabJack T7 channel's reading in µV.
Calibration is filed by role, so a role that moves from an ESP32 board to a T7 (or back) would otherwise carry a curve fitted in one unit onto a channel that reads in the other — a confident, wrong pressure. load() refuses that re-attach.
Definition at line 111 of file CubicCalibrationStore.hpp.
| std::string fsw::calibration::CubicChannel::role |
Definition at line 83 of file CubicCalibrationStore.hpp.
Referenced by main().
| std::string fsw::calibration::CubicChannel::status = "PENDING" |
Definition at line 126 of file CubicCalibrationStore.hpp.
Referenced by anonymous_namespace{test_lc_linear_fit.cpp}::linear_model_fits_a_line(), anonymous_namespace{test_lc_linear_fit.cpp}::linear_needs_two_points(), and backend.routers.layerx.Job::view().
| uint16_t fsw::calibration::CubicChannel::uid = 0 |
Definition at line 78 of file CubicCalibrationStore.hpp.
| double fsw::calibration::CubicChannel::updated_at = 0.0 |
Definition at line 128 of file CubicCalibrationStore.hpp.