From 9fcebfe2c9192943b85b04c54f8dfc3d94d51d46 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 4 Apr 2018 02:01:57 +0200 Subject: [PATCH] LP-590 Zero BoardLevelTrim values while doing GyroBias calibration --- .../config/calibration/gyrobiascalibrationmodel.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ground/gcs/src/plugins/config/calibration/gyrobiascalibrationmodel.cpp b/ground/gcs/src/plugins/config/calibration/gyrobiascalibrationmodel.cpp index b65b30055..3953aaacc 100644 --- a/ground/gcs/src/plugins/config/calibration/gyrobiascalibrationmodel.cpp +++ b/ground/gcs/src/plugins/config/calibration/gyrobiascalibrationmodel.cpp @@ -69,9 +69,13 @@ void GyroBiasCalibrationModel::start() // Disable gyro bias correction while calibrating attitudeSettingsData.BiasCorrectGyro = AttitudeSettings::BIASCORRECTGYRO_FALSE; // Zero board rotation - attitudeSettingsData.BoardRotation[AttitudeSettings::BOARDROTATION_YAW] = 0; - attitudeSettingsData.BoardRotation[AttitudeSettings::BOARDROTATION_ROLL] = 0; - attitudeSettingsData.BoardRotation[AttitudeSettings::BOARDROTATION_PITCH] = 0; + attitudeSettingsData.BoardRotation[AttitudeSettings::BOARDROTATION_YAW] = 0; + attitudeSettingsData.BoardRotation[AttitudeSettings::BOARDROTATION_ROLL] = 0; + attitudeSettingsData.BoardRotation[AttitudeSettings::BOARDROTATION_PITCH] = 0; + // Zero board level trim + attitudeSettingsData.BoardLevelTrim[AttitudeSettings::BOARDLEVELTRIM_ROLL] = 0; + attitudeSettingsData.BoardLevelTrim[AttitudeSettings::BOARDLEVELTRIM_PITCH] = 0; + attitudeSettings->setData(attitudeSettingsData); UAVObject::Metadata gyroStateMetadata = gyroState->getMetadata();