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

LP-327 - Configurable max allowed variance parameter

This commit is contained in:
Alessio Morale 2016-06-28 00:28:50 +02:00
parent 4cf1af58da
commit 52c2bc6f4a
2 changed files with 2 additions and 1 deletions

View File

@ -296,7 +296,7 @@ static filterResult complementaryFilter(struct data *this, float gyro[3], float
float const gyrovary = pseudo_windowed_variance_get(&this->gyro_var[1]); float const gyrovary = pseudo_windowed_variance_get(&this->gyro_var[1]);
float const gyrovarz = pseudo_windowed_variance_get(&this->gyro_var[2]); float const gyrovarz = pseudo_windowed_variance_get(&this->gyro_var[2]);
if ((fabsf(gyrovarx) + fabsf(gyrovary) + fabsf(gyrovarz)) > 1.0f) { if ((fabsf(gyrovarx) + fabsf(gyrovary) + fabsf(gyrovarz)) > this->attitudeSettings.BoardSteadyMaxVariance) {
this->starttime = xTaskGetTickCount(); this->starttime = xTaskGetTickCount();
this->first_run = 1; this->first_run = 1;
return FILTERRESULT_WARNING; return FILTERRESULT_WARNING;

View File

@ -12,6 +12,7 @@
<field name="ZeroDuringArming" units="channel" type="enum" elements="1" options="False,True" defaultvalue="True"/> <field name="ZeroDuringArming" units="channel" type="enum" elements="1" options="False,True" defaultvalue="True"/>
<field name="BiasCorrectGyro" units="channel" type="enum" elements="1" options="False,True" defaultvalue="True"/> <field name="BiasCorrectGyro" units="channel" type="enum" elements="1" options="False,True" defaultvalue="True"/>
<field name="InitialZeroWhenBoardSteady" units="" type="enum" elements="1" options="False,True" defaultvalue="True"/> <field name="InitialZeroWhenBoardSteady" units="" type="enum" elements="1" options="False,True" defaultvalue="True"/>
<field name="BoardSteadyMaxVariance" units="" type="float" elements="1" defaultvalue="2"/>
<field name="TrimFlight" units="channel" type="enum" elements="1" options="NORMAL,START,LOAD" defaultvalue="NORMAL"/> <field name="TrimFlight" units="channel" type="enum" elements="1" options="NORMAL,START,LOAD" defaultvalue="NORMAL"/>
<access gcs="readwrite" flight="readwrite"/> <access gcs="readwrite" flight="readwrite"/>
<telemetrygcs acked="true" updatemode="onchange" period="0"/> <telemetrygcs acked="true" updatemode="onchange" period="0"/>