sensor calibration delete temperature (CAL_ACCx_TEMP, CAL_GYROx_TEMP, CAL_MAGx_TEMP)

- this was an experiment to casually monitor sensor offsets relative to temperature, but now that all calibration offsets can be adjusted post-flight the stored temperature can be misleading
 - deleting to save a little bit of flash (and storing the temperature wasn't useful)
This commit is contained in:
Daniel Agar
2022-03-12 11:38:49 -05:00
committed by GitHub
parent aa64789792
commit 3d54d25867
15 changed files with 11 additions and 196 deletions
-36
View File
@@ -159,18 +159,6 @@ parameters:
num_instances: *max_num_sensor_instances
instance_start: 0
CAL_ACC${i}_TEMP:
description:
short: Accelerometer ${i} calibration temperature
long: Temperature during last calibration.
category: System
type: float
default: -1000.
unit: celcius
volatile: true
num_instances: *max_num_sensor_instances
instance_start: 0
# Gyroscope calibration
CAL_GYRO${i}_ID:
description:
@@ -288,18 +276,6 @@ parameters:
num_instances: *max_num_sensor_instances
instance_start: 0
CAL_GYRO${i}_TEMP:
description:
short: Gyroscope ${i} calibration temperature
long: Temperature during last calibration.
category: System
type: float
default: -1000.
unit: celcius
volatile: true
num_instances: *max_num_sensor_instances
instance_start: 0
# Magnetometer calibration
CAL_MAG${i}_ID:
description:
@@ -530,15 +506,3 @@ parameters:
volatile: true
num_instances: *max_num_sensor_instances
instance_start: 0
CAL_MAG${i}_TEMP:
description:
short: Magnetometer ${i} calibration temperature
long: Temperature during last calibration.
category: System
type: float
default: -1000.
unit: celcius
volatile: true
num_instances: *max_num_sensor_instances
instance_start: 0
@@ -194,7 +194,6 @@ void VehicleMagnetometer::UpdateMagBiasEstimate()
const Vector3f offset = _calibration[mag_index].BiasCorrectedSensorOffset(_calibration_estimator_bias[mag_index]);
if (_calibration[mag_index].set_offset(offset)) {
_calibration[mag_index].set_temperature(_last_data[mag_index].temperature);
// save parameters with preferred calibration slot to current sensor index
_calibration[mag_index].ParametersSave(mag_index);
@@ -253,7 +252,6 @@ void VehicleMagnetometer::UpdateMagCalibration()
_calibration_estimator_bias[mag_index];
_mag_cal[i].variance = bias_variance;
_mag_cal[i].temperature = _last_data[mag_index].temperature;
_in_flight_mag_cal_available = true;
break;
@@ -298,8 +296,6 @@ void VehicleMagnetometer::UpdateMagCalibration()
(double)mag_cal_offset(0), (double)mag_cal_offset(1), (double)mag_cal_offset(2),
(double)_mag_cal[i].offset(0), (double)_mag_cal[i].offset(1), (double)_mag_cal[i].offset(2));
_calibration[mag_index].set_temperature(_last_data[mag_index].temperature);
_calibration[mag_index].ParametersSave();
calibration_param_save_needed = true;
@@ -119,7 +119,6 @@ private:
uint32_t device_id{0};
matrix::Vector3f offset{};
matrix::Vector3f variance{};
float temperature{NAN};
} _mag_cal[ORB_MULTI_MAX_INSTANCES] {};
uORB::SubscriptionCallbackWorkItem _sensor_sub[MAX_SENSOR_COUNT] {