From ced0a4b9520af6be6769943a77951f94183ce84e Mon Sep 17 00:00:00 2001 From: peabody124 Date: Fri, 27 Aug 2010 21:05:41 +0000 Subject: [PATCH] AHRS: Fixed silly bug that made the default mag variance be zero - explains "hopping around" default behavior. Still should run calibration though. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1439 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/OpenPilot/UAVObjects/ahrscalibration.c | 6 +++--- ground/src/plugins/uavobjects/ahrscalibration.cpp | 6 +++--- ground/src/shared/uavobjectdefinition/ahrscalibration.xml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/flight/OpenPilot/UAVObjects/ahrscalibration.c b/flight/OpenPilot/UAVObjects/ahrscalibration.c index 8e668689b..5ca39cf38 100644 --- a/flight/OpenPilot/UAVObjects/ahrscalibration.c +++ b/flight/OpenPilot/UAVObjects/ahrscalibration.c @@ -102,9 +102,9 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) data.mag_bias[0] = 0; data.mag_bias[1] = 0; data.mag_bias[2] = 0; - data.mag_var[0] = 0; - data.mag_var[1] = 0; - data.mag_var[2] = 0; + data.mag_var[0] = 5e-05; + data.mag_var[1] = 5e-05; + data.mag_var[2] = 5e-05; UAVObjSetInstanceData(obj, instId, &data); diff --git a/ground/src/plugins/uavobjects/ahrscalibration.cpp b/ground/src/plugins/uavobjects/ahrscalibration.cpp index 7c7737810..522906d0c 100644 --- a/ground/src/plugins/uavobjects/ahrscalibration.cpp +++ b/ground/src/plugins/uavobjects/ahrscalibration.cpp @@ -143,9 +143,9 @@ void AHRSCalibration::setDefaultFieldValues() data.mag_bias[0] = 0; data.mag_bias[1] = 0; data.mag_bias[2] = 0; - data.mag_var[0] = 0; - data.mag_var[1] = 0; - data.mag_var[2] = 0; + data.mag_var[0] = 5e-05; + data.mag_var[1] = 5e-05; + data.mag_var[2] = 5e-05; } diff --git a/ground/src/shared/uavobjectdefinition/ahrscalibration.xml b/ground/src/shared/uavobjectdefinition/ahrscalibration.xml index a743663ce..585524d1a 100644 --- a/ground/src/shared/uavobjectdefinition/ahrscalibration.xml +++ b/ground/src/shared/uavobjectdefinition/ahrscalibration.xml @@ -9,7 +9,7 @@ - +