Firmware
|
class TemperatureCompensation Applies temperature compensation to sensor data. More...
#include <temperature_compensation.h>
Public Member Functions | |
int | parameters_update (bool hil_enabled=false) |
(re)load the parameters. More... | |
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 multiple sensors of the same type) More... | |
int | set_sensor_id_accel (uint32_t device_id, int topic_instance) |
int | set_sensor_id_baro (uint32_t device_id, int topic_instance) |
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. More... | |
int | apply_corrections_accel (int topic_instance, matrix::Vector3f &sensor_data, float temperature, float *offsets, float *scales) |
int | apply_corrections_baro (int topic_instance, float &sensor_data, float temperature, float *offsets, float *scales) |
void | print_status () |
output current configuration status to console | |
class TemperatureCompensation Applies temperature compensation to sensor data.
Loads the parameters from PX4 param storage.
int sensors::TemperatureCompensation::apply_corrections_gyro | ( | int | topic_instance, |
matrix::Vector3f & | sensor_data, | ||
float | temperature, | ||
float * | offsets, | ||
float * | scales | ||
) |
Apply Thermal corrections to gyro (& other) sensor data.
topic_instance | uORB topic instance |
sensor_data | input sensor data, output sensor data with applied corrections |
temperature | measured current temperature |
offsets | returns offsets that were applied (length = 3, except for baro), depending on return value |
scales | returns scales that were applied (length = 3), depending on return value |
int sensors::TemperatureCompensation::parameters_update | ( | bool | hil_enabled = false | ) |
(re)load the parameters.
Make sure to call this on startup as well
int sensors::TemperatureCompensation::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 multiple sensors of the same type)