1#ifndef ROBUST_CALIBRATION_MANAGER_HPP
2#define ROBUST_CALIBRATION_MANAGER_HPP
20 std::unique_ptr<RobustCalibrationFramework>
framework;
35 void update_calibration(uint16_t sensor_id, int32_t adc_code,
double reference_pressure);
37 void zero_sensor(uint16_t sensor_id, int32_t adc_code);
55 const std::map<uint16_t, std::string>* uid_to_role =
nullptr)
const;
61 const std::map<uint16_t, std::string>* uid_to_role =
nullptr);
void update_calibration(uint16_t sensor_id, int32_t adc_code, double reference_pressure)
bool load_adjustments(const std::string &path, const std::map< uint16_t, std::string > *uid_to_role=nullptr)
Restore per-sensor θ.
bool save_adjustments(const std::string &path, const std::map< uint16_t, std::string > *uid_to_role=nullptr) const
Persist per-sensor θ.
void zero_sensor(uint16_t sensor_id, int32_t adc_code)
std::map< uint16_t, Eigen::VectorXd > restored_theta_mean_
void reseed_sensor(uint16_t sensor_id, const PTCalibrationCoeffs &baseline)
Reseed a sensor's framework cleanly from the given cubic baseline, discarding any learned adjustments...
std::optional< Eigen::VectorXd > population_theta_mean_
void reset_adjustment(uint16_t sensor_id)
void initialize_sensor(uint16_t sensor_id, const PTCalibrationCoeffs &baseline)
std::optional< Eigen::MatrixXd > population_theta_cov_
double predict_pressure_psi(uint16_t sensor_id, int32_t adc_code)
Mean PSI from the robust model (default environment).
RobustCalibrationManager()
std::map< uint16_t, Eigen::MatrixXd > restored_theta_cov_
std::map< uint16_t, SensorState > states_
bool has_sensor(uint16_t sensor_id) const
True if this sensor_id was initialized for robust tracking (factory-baselined).
Output smoothing for calibrated PT pressure, per sensor uid (ESP32 and LabJack T7 alike).
Motorized ball valve position: raw ADC counts -> % open.
PT Calibration Coefficients.
std::unique_ptr< RobustCalibrationFramework > framework
PTCalibrationCoeffs baseline