1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

LP-613 Add new algorithm with Complementary+GPS

This commit is contained in:
Laurent Lalanne 2019-04-16 21:36:53 +02:00
parent 8c101adccc
commit 89abb7c085
2 changed files with 22 additions and 1 deletions

View File

@ -184,6 +184,22 @@ static const filterPipeline *cfQueue = &(filterPipeline) {
} }
} }
}; };
static const filterPipeline *cfgpsQueue = &(filterPipeline) {
.filter = &airFilter,
.next = &(filterPipeline) {
.filter = &llaFilter,
.next = &(filterPipeline) {
.filter = &baroiFilter,
.next = &(filterPipeline) {
.filter = &altitudeFilter,
.next = &(filterPipeline) {
.filter = &cfFilter,
.next = NULL,
}
}
}
}
};
static const filterPipeline *cfmiQueue = &(filterPipeline) { static const filterPipeline *cfmiQueue = &(filterPipeline) {
.filter = &magFilter, .filter = &magFilter,
.next = &(filterPipeline) { .next = &(filterPipeline) {
@ -443,6 +459,11 @@ static void StateEstimationCb(void)
// reinit Mag alarm // reinit Mag alarm
AlarmsSet(SYSTEMALARMS_ALARM_MAGNETOMETER, SYSTEMALARMS_ALARM_UNINITIALISED); AlarmsSet(SYSTEMALARMS_ALARM_MAGNETOMETER, SYSTEMALARMS_ALARM_UNINITIALISED);
break; break;
case REVOSETTINGS_FUSIONALGORITHM_COMPLEMENTARYGPSOUTDOOR:
newFilterChain = cfgpsQueue;
// reinit Mag alarm
AlarmsSet(SYSTEMALARMS_ALARM_MAGNETOMETER, SYSTEMALARMS_ALARM_UNINITIALISED);
break;
case REVOSETTINGS_FUSIONALGORITHM_COMPLEMENTARYMAG: case REVOSETTINGS_FUSIONALGORITHM_COMPLEMENTARYMAG:
newFilterChain = cfmiQueue; newFilterChain = cfmiQueue;
break; break;

View File

@ -2,7 +2,7 @@
<object name="RevoSettings" singleinstance="true" settings="true" category="State"> <object name="RevoSettings" singleinstance="true" settings="true" category="State">
<description>Settings for the revo to control the algorithm and what is updated</description> <description>Settings for the revo to control the algorithm and what is updated</description>
<field name="FusionAlgorithm" units="" type="enum" elements="1" <field name="FusionAlgorithm" units="" type="enum" elements="1"
options="None,Basic (Complementary),Complementary+Mag,Complementary+Mag+GPSOutdoor,INS13Indoor,GPS Navigation (INS13),GPS Navigation (INS13+CF),Testing (INS Indoor+CF),Acro (No Sensors)" options="None,Basic (Complementary),Complementary+GPSOutdoor,Complementary+Mag,Complementary+Mag+GPSOutdoor,INS13Indoor,GPS Navigation (INS13),GPS Navigation (INS13+CF),Testing (INS Indoor+CF),Acro (No Sensors)"
defaultvalue="Basic (Complementary)"/> defaultvalue="Basic (Complementary)"/>
<!-- Low pass filter configuration to calculate offset of barometric altitude sensor. <!-- Low pass filter configuration to calculate offset of barometric altitude sensor.