mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merge branch 'corvuscorax/OP-1412_Gyrodrift_issue' into rel-14.06
This commit is contained in:
commit
c88630bbea
@ -205,6 +205,15 @@ static filterResult filter(stateFilter *self, stateEstimation *state)
|
||||
|
||||
this->work.updated |= state->updated;
|
||||
|
||||
// check magnetometer alarm, discard any magnetometer readings if not OK
|
||||
// during initialization phase (but let them through afterwards)
|
||||
SystemAlarmsAlarmData alarms;
|
||||
SystemAlarmsAlarmGet(&alarms);
|
||||
if (alarms.Magnetometer != SYSTEMALARMS_ALARM_OK && !this->inited) {
|
||||
UNSET_MASK(state->updated, SENSORUPDATES_mag);
|
||||
UNSET_MASK(this->work.updated, SENSORUPDATES_mag);
|
||||
}
|
||||
|
||||
// Get most recent data
|
||||
IMPORT_SENSOR_IF_UPDATED(gyro, 3);
|
||||
IMPORT_SENSOR_IF_UPDATED(accel, 3);
|
||||
@ -349,11 +358,7 @@ static filterResult filter(stateFilter *self, stateEstimation *state)
|
||||
INSCovariancePrediction(dT);
|
||||
|
||||
if (IS_SET(this->work.updated, SENSORUPDATES_mag)) {
|
||||
SystemAlarmsAlarmData alarms;
|
||||
SystemAlarmsAlarmGet(&alarms);
|
||||
if (alarms.Magnetometer == SYSTEMALARMS_ALARM_OK) {
|
||||
sensors |= MAG_SENSORS;
|
||||
}
|
||||
sensors |= MAG_SENSORS;
|
||||
}
|
||||
|
||||
if (IS_SET(this->work.updated, SENSORUPDATES_baro)) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
10.0, 10.0, 10.0,
|
||||
1.0, 1.0, 1.0,
|
||||
0.007, 0.007, 0.007, 0.007,
|
||||
0.0001, 0.0001, 0.0001">
|
||||
0.000001, 0.000001, 0.000001">
|
||||
<elementnames>
|
||||
<elementname>PositionNorth</elementname>
|
||||
<elementname>PositionEast</elementname>
|
||||
|
@ -45,7 +45,7 @@
|
||||
</field>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="throttled" period="1000"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="manual" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
Loading…
x
Reference in New Issue
Block a user