46 #include <mathlib/mathlib.h> 56 "GYRO_COUNT_MAX must be 3 (if changed, add/remove TC_* params to match the count)");
58 "ACCEL_COUNT_MAX must be 3 (if changed, add/remove TC_* params to match the count)");
60 "BARO_COUNT_MAX must be 3 (if changed, add/remove TC_* params to match the count)");
99 int apply_corrections_baro(
int topic_instance,
float &sensor_data,
float temperature,
float *offsets,
float *scales);
261 for (
int i = 0; i <
SENSOR_COUNT_MAX; ++i) { device_mapping[i] = 255; last_temperature[i] = -100.0f; }
265 for (
int i = 0; i <
SENSOR_COUNT_MAX; ++i) { last_temperature[i] = -100.0f; }
277 const T *sensor_cal_data, uint8_t sensor_count_max);
float ref_temp
reference temperature used by the curve-fit
constexpr uint8_t GYRO_COUNT_MAX
int set_sensor_id_accel(uint32_t device_id, int topic_instance)
static int set_sensor_id(uint32_t device_id, int topic_instance, PerSensorData &sensor_data, const T *sensor_cal_data, uint8_t sensor_count_max)
PerSensorData _accel_data
static int32_t device_id[max_accel_sens]
bool calc_thermal_offsets_1D(SensorCalData1D &coef, float measured_temp, float &offset)
Calculate the offset required to compensate the sensor for temperature effects using a 5th order meth...
Global flash based parameter store.
class TemperatureCompensation Applies temperature compensation to sensor data.
constexpr uint8_t ACCEL_COUNT_MAX
int parameters_update(bool hil_enabled=false)
(re)load the parameters.
bool calc_thermal_offsets_3D(const SensorCalData3D &coef, float measured_temp, float offset[])
Calculate the offsets required to compensate the sensor for temperature effects If the measured tempe...
constexpr uint8_t SENSOR_COUNT_MAX
int set_sensor_id_gyro(uint32_t device_id, int topic_instance)
supply information which device_id matches a specific uORB topic_instance (needed if a system has mul...
float min_temp
minimum temperature with valid compensation data
void print_status()
output current configuration status to console
int apply_corrections_baro(int topic_instance, float &sensor_data, float temperature, float *offsets, float *scales)
int apply_corrections_accel(int topic_instance, matrix::Vector3f &sensor_data, float temperature, float *offsets, float *scales)
float max_temp
maximum temperature with valid compensation data
int apply_corrections_gyro(int topic_instance, matrix::Vector3f &sensor_data, float temperature, float *offsets, float *scales)
Apply Thermal corrections to gyro (& other) sensor data.
int32_t ID
sensor device ID
static int initialize_parameter_handles(ParameterHandles ¶meter_handles)
initialize ParameterHandles struct
int set_sensor_id_baro(uint32_t device_id, int topic_instance)
constexpr uint8_t BARO_COUNT_MAX
uint32_t param_t
Parameter handle.