mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 05:00:35 +08:00
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:
@@ -71,7 +71,6 @@ struct gyro_worker_data_t {
|
||||
calibration::Gyroscope calibrations[MAX_GYROS] {};
|
||||
|
||||
Vector3f offset[MAX_GYROS] {};
|
||||
float temperature[MAX_GYROS] {NAN, NAN, NAN, NAN};
|
||||
|
||||
math::MedianFilter<float, 9> filter[3] {};
|
||||
};
|
||||
@@ -119,14 +118,6 @@ static calibrate_return gyro_calibration_worker(gyro_worker_data_t &worker_data)
|
||||
|
||||
calibration_counter[gyro_index]++;
|
||||
|
||||
if (!PX4_ISFINITE(worker_data.temperature[gyro_index])) {
|
||||
// set first valid value
|
||||
worker_data.temperature[gyro_index] = gyro_report.temperature * calibration_counter[gyro_index];
|
||||
|
||||
} else {
|
||||
worker_data.temperature[gyro_index] += gyro_report.temperature;
|
||||
}
|
||||
|
||||
if (gyro_index == 0) {
|
||||
worker_data.filter[0].insert(gyro_report.x - thermal_offset(0));
|
||||
worker_data.filter[1].insert(gyro_report.y - thermal_offset(1));
|
||||
@@ -169,7 +160,6 @@ static calibrate_return gyro_calibration_worker(gyro_worker_data_t &worker_data)
|
||||
}
|
||||
|
||||
worker_data.offset[s] /= calibration_counter[s];
|
||||
worker_data.temperature[s] /= calibration_counter[s];
|
||||
}
|
||||
|
||||
return calibrate_return_ok;
|
||||
@@ -269,8 +259,6 @@ int do_gyro_calibration(orb_advert_t *mavlink_log_pub)
|
||||
|
||||
if (calibration.device_id() != 0) {
|
||||
calibration.set_offset(worker_data.offset[uorb_index]);
|
||||
calibration.set_temperature(worker_data.temperature[uorb_index]);
|
||||
|
||||
calibration.PrintStatus();
|
||||
|
||||
if (calibration.ParametersSave(uorb_index, true)) {
|
||||
|
||||
Reference in New Issue
Block a user