mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
OP-118 AHRS: Made default calibration values friendly for people. Also fixed bug that would repeatedly trigger calibration when it was requested.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1371 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
dd34ca1a8d
commit
0862d64b8c
@ -100,13 +100,17 @@ static void GPSPositionUpdatedCb(UAVObjEvent * ev)
|
||||
static bool HomeLocationIsUpdatedFlag = false;
|
||||
static void HomeLocationUpdatedCb(UAVObjEvent * ev)
|
||||
{
|
||||
HomeLocationIsUpdatedFlag = true;
|
||||
HomeLocationIsUpdatedFlag = true;
|
||||
}
|
||||
|
||||
static bool AHRSCalibrationIsUpdatedFlag = false;
|
||||
static bool AHRSCalibrationIsLocallyUpdateFlag = false;
|
||||
static void AHRSCalibrationUpdatedCb(UAVObjEvent * ev)
|
||||
{
|
||||
AHRSCalibrationIsUpdatedFlag = true;
|
||||
if(AHRSCalibrationIsLocallyUpdateFlag == true)
|
||||
AHRSCalibrationIsLocallyUpdateFlag = false;
|
||||
else
|
||||
AHRSCalibrationIsUpdatedFlag = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -302,6 +306,7 @@ static void update_calibration(struct opahrs_msg_v1_rsp_calibration * calibratio
|
||||
AHRSCalibrationData data;
|
||||
AHRSCalibrationGet(&data);
|
||||
|
||||
AHRSCalibrationIsLocallyUpdateFlag = true;
|
||||
data.accel_var[0] = calibration->accel_var[0];
|
||||
data.accel_var[1] = calibration->accel_var[1];
|
||||
data.accel_var[2] = calibration->accel_var[2];
|
||||
|
@ -47,7 +47,7 @@ NavigationSettings::NavigationSettings(): UAVDataObject(OBJID, ISSINGLEINST, ISS
|
||||
fields.append( new UAVObjectField(QString("UpdatePeriod"), QString("ms"), UAVObjectField::UINT16, UpdatePeriodElemNames, QStringList()) );
|
||||
QStringList AccelerationMaxElemNames;
|
||||
AccelerationMaxElemNames.append("0");
|
||||
fields.append( new UAVObjectField(QString("AccelerationMax"), QString("m/s²"), UAVObjectField::FLOAT32, AccelerationMaxElemNames, QStringList()) );
|
||||
fields.append( new UAVObjectField(QString("AccelerationMax"), QString("m/s"), UAVObjectField::FLOAT32, AccelerationMaxElemNames, QStringList()) );
|
||||
QStringList SpeedMaxElemNames;
|
||||
SpeedMaxElemNames.append("0");
|
||||
fields.append( new UAVObjectField(QString("SpeedMax"), QString("m/s"), UAVObjectField::FLOAT32, SpeedMaxElemNames, QStringList()) );
|
||||
|
@ -1,14 +1,14 @@
|
||||
<xml>
|
||||
<object name="AHRSCalibration" singleinstance="true" settings="true">
|
||||
<field name="measure_var" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="TRUE"/>
|
||||
<field name="measure_var" units="" type="enum" elements="1" options="FALSE,TRUE" defaultvalue="FALSE"/>
|
||||
<field name="accel_bias" units="raw" type="int16" elementnames="X,Y,Z" defaultvalue="-2048"/>
|
||||
<field name="accel_scale" units="m/s" type="float" elementnames="X,Y,Z" defaultvalue="0.012"/>
|
||||
<field name="accel_var" units="m^2/s^s" type="float" elementnames="X,Y,Z" defaultvalue="1"/>
|
||||
<field name="accel_var" units="m^2/s^s" type="float" elementnames="X,Y,Z" defaultvalue="5e-5"/>
|
||||
<field name="gyro_bias" units="raw" type="int16" elementnames="X,Y,Z" defaultvalue="-1675"/>
|
||||
<field name="gyro_scale" units="deg/s" type="float" elementnames="X,Y,Z" defaultvalue="0.0070"/>
|
||||
<field name="gyro_var" units="deg^s/s^2" type="float" elementnames="X,Y,Z" defaultvalue="1"/>
|
||||
<field name="gyro_var" units="deg^s/s^2" type="float" elementnames="X,Y,Z" defaultvalue="1e-4"/>
|
||||
<field name="mag_bias" units="mGau" type="float" elementnames="X,Y,Z" defaultvalue="0"/>
|
||||
<field name="mag_var" units="mGau^s" type="float" elementnames="X,Y,Z" defaultvalue="1"/>
|
||||
<field name="mag_var" units="mGau^s" type="float" elementnames="X,Y,Z" defaultvalue="5-e5"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user