mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Change settings for baro altitude offset correction
This commit is contained in:
parent
aa560653d4
commit
1bfa66c2b6
@ -69,15 +69,8 @@ static int32_t init(stateFilter *self)
|
||||
this->baroOffset = 0.0f;
|
||||
this->first_run = 100;
|
||||
|
||||
// Low pass filter configuration to calculate offset of barometric altitude sensor.
|
||||
// Defaults: updates at 5 Hz, tau = 300s settle time, exp(-(1/f)/tau) ~= 0.9993335555062
|
||||
// Set BaroOffsetFilterTau = 0 to completely disable baro offset updates.
|
||||
RevoSettingsData revoSettings;
|
||||
RevoSettingsInitialize();
|
||||
RevoSettingsGet(&revoSettings);
|
||||
|
||||
this->baroGPSOffsetCorrectionAlpha = (revoSettings.BaroGPSOffsetCorrectionTau < 0.0001f) ?
|
||||
1.0f : expf(-(1.0f / revoSettings.BaroGPSOffsetCorrectionFrequency) / revoSettings.BaroGPSOffsetCorrectionTau);
|
||||
RevoSettingsBaroGPSOffsetCorrectionAlphaGet(&this->baroGPSOffsetCorrectionAlpha);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -2,8 +2,12 @@
|
||||
<object name="RevoSettings" singleinstance="true" settings="true" category="State">
|
||||
<description>Settings for the revo to control the algorithm and what is updated</description>
|
||||
<field name="FusionAlgorithm" units="" type="enum" elements="1" options="None,Complementary,Complementary+Mag,INS13Indoor,INS13Outdoor" defaultvalue="Complementary"/>
|
||||
<field name="BaroGPSOffsetCorrectionFrequency" units="Hz" type="float" elements="1" defaultvalue="5"/>
|
||||
<field name="BaroGPSOffsetCorrectionTau" units="s" type="float" elements="1" defaultvalue="300"/>
|
||||
|
||||
<!-- Low pass filter configuration to calculate offset of barometric altitude sensor.
|
||||
Defaults: updates at 5 Hz, tau = 300s settle time, exp(-(1/f)/tau) ~= 0.9993335555062
|
||||
Set BaroGPSOffsetCorrectionAlpha = 1.0 to completely disable baro offset updates. -->
|
||||
<field name="BaroGPSOffsetCorrectionAlpha" units="" type="float" elements="1" defaultvalue="0.9993335555062"/>
|
||||
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||
<telemetryflight acked="true" updatemode="onchange" period="0"/>
|
||||
|
Loading…
Reference in New Issue
Block a user