|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
PT Calibration Coefficients. More...
#include <PTCalibration.hpp>
Public Member Functions | |
| PTCalibrationCoeffs () | |
| PTCalibrationCoeffs (double a, double b, double c, double d) | |
| double | calculate_pressure (int32_t adc_code) const |
| Calculate pressure (psi) from ADC code. | |
| std::optional< int32_t > | invert_to_adc (double target_psi) const |
| Invert psi = A*x^3 + B*x^2 + C*x + D to find ADC code for target PSI. | |
Public Attributes | |
| double | A |
| double | B |
| double | C |
| double | D |
PT Calibration Coefficients.
Cubic polynomial: psi = A * (adc^3) + B * (adc^2) + C * adc + D
Definition at line 18 of file PTCalibration.hpp.
|
inline |
|
inline |
|
inline |
Calculate pressure (psi) from ADC code.
| adc_code | Raw ADC code (32-bit signed integer) |
Definition at line 34 of file PTCalibration.hpp.
References A, adc(), B, C, and D.
Referenced by fsw::calibration::RobustCalibrationFramework::max_abs_error_vs_factory(), and fsw::calibration::RobustCalibrationFramework::seed_from_factory_cubic().
| std::optional< int32_t > fsw::calibration::PTCalibrationCoeffs::invert_to_adc | ( | double | target_psi | ) | const |
| double fsw::calibration::PTCalibrationCoeffs::A |
Definition at line 19 of file PTCalibration.hpp.
Referenced by calculate_pressure(), invert_to_adc(), PTCalibrationCoeffs(), and PTCalibrationCoeffs().
| double fsw::calibration::PTCalibrationCoeffs::B |
Definition at line 20 of file PTCalibration.hpp.
Referenced by calculate_pressure(), invert_to_adc(), PTCalibrationCoeffs(), and PTCalibrationCoeffs().
| double fsw::calibration::PTCalibrationCoeffs::C |
Definition at line 21 of file PTCalibration.hpp.
Referenced by calculate_pressure(), invert_to_adc(), PTCalibrationCoeffs(), and PTCalibrationCoeffs().
| double fsw::calibration::PTCalibrationCoeffs::D |
Definition at line 22 of file PTCalibration.hpp.
Referenced by calculate_pressure(), invert_to_adc(), PTCalibrationCoeffs(), and PTCalibrationCoeffs().