STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
anonymous_namespace{test_lc_linear_fit.cpp} Namespace Reference

Functions

std::string scratch (const char *name)
double eval_norm (const CubicFit &f, double adc)
 Evaluate a fit the way the browser does (normalized form).
double eval_raw (const CubicFit &f, double adc)
 Evaluate a fit the way calibration_service does (raw A..D, PolynomialCalibration).
std::vector< CubicPoint > drifting_scale_points ()
 A real load cell over 400-500k: 100 kg across 100k counts, linear, with the few-tenths-of-a-kg scatter an operator's captures carry (a settling load, a mass placed slightly off-centre).
void fill (CubicCalibrationStore &s, const std::string &model, const std::vector< CubicPoint > &pts)
void linear_model_fits_a_line ()
void linear_needs_two_points ()
void cubic_model_is_unchanged ()
void a_model_change_refits_without_a_capture ()
double tared_reading (const CubicFit &f, double zero_code, double tank_kg)
 The scenario.
void tare_cancels_zero_drift_on_linear_not_cubic ()
void both_fits_are_serialized ()
void raw_coefficients_match_the_normalized_form ()

Variables

constexpr uint16_t kUid = 4201

Function Documentation

◆ a_model_change_refits_without_a_capture()

void anonymous_namespace{test_lc_linear_fit.cpp}::a_model_change_refits_without_a_capture ( )

◆ both_fits_are_serialized()

◆ cubic_model_is_unchanged()

◆ drifting_scale_points()

std::vector< CubicPoint > anonymous_namespace{test_lc_linear_fit.cpp}::drifting_scale_points ( )

A real load cell over 400-500k: 100 kg across 100k counts, linear, with the few-tenths-of-a-kg scatter an operator's captures carry (a settling load, a mass placed slightly off-centre).

Definition at line 84 of file test_lc_linear_fit.cpp.

Referenced by a_model_change_refits_without_a_capture(), both_fits_are_serialized(), cubic_model_is_unchanged(), linear_model_fits_a_line(), raw_coefficients_match_the_normalized_form(), and tare_cancels_zero_drift_on_linear_not_cubic().

◆ eval_norm()

double anonymous_namespace{test_lc_linear_fit.cpp}::eval_norm ( const CubicFit & f,
double adc )

Evaluate a fit the way the browser does (normalized form).

Definition at line 65 of file test_lc_linear_fit.cpp.

References adc(), fsw::calibration::CubicFit::norm_min, fsw::calibration::CubicFit::norm_scale, and fsw::calibration::CubicFit::poly.

Referenced by raw_coefficients_match_the_normalized_form().

◆ eval_raw()

double anonymous_namespace{test_lc_linear_fit.cpp}::eval_raw ( const CubicFit & f,
double adc )

Evaluate a fit the way calibration_service does (raw A..D, PolynomialCalibration).

Definition at line 76 of file test_lc_linear_fit.cpp.

References fsw::calibration::CubicFit::A, adc(), fsw::calibration::CubicFit::B, fsw::calibration::CubicFit::C, and fsw::calibration::CubicFit::D.

Referenced by raw_coefficients_match_the_normalized_form(), and tared_reading().

◆ fill()

◆ linear_model_fits_a_line()

◆ linear_needs_two_points()

◆ raw_coefficients_match_the_normalized_form()

void anonymous_namespace{test_lc_linear_fit.cpp}::raw_coefficients_match_the_normalized_form ( )

◆ scratch()

std::string anonymous_namespace{test_lc_linear_fit.cpp}::scratch ( const char * name)

Definition at line 56 of file test_lc_linear_fit.cpp.

References p.

◆ tare_cancels_zero_drift_on_linear_not_cubic()

void anonymous_namespace{test_lc_linear_fit.cpp}::tare_cancels_zero_drift_on_linear_not_cubic ( )

◆ tared_reading()

double anonymous_namespace{test_lc_linear_fit.cpp}::tared_reading ( const CubicFit & f,
double zero_code,
double tank_kg )

The scenario.

A tank is on the scale; the scale's zero has drifted from 400k to 200k overnight (the whole curve slid 200k counts down; the sensitivity did not change). The operator tares with nothing on it, then puts the tank on. What reads?

Definition at line 166 of file test_lc_linear_fit.cpp.

References adc(), eval_raw(), kUid, lc_tare_entity(), fsw::calibration::LcTare::offset_kg, scratch, fsw::calibration::LcTareStore::set(), and fsw::calibration::LcTareStore::tare_for().

Referenced by tare_cancels_zero_drift_on_linear_not_cubic().

Variable Documentation

◆ kUid