mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 10:23:34 +08:00
Protect against divergence
This commit is contained in:
@@ -312,6 +312,8 @@ void UpdateStrapdownEquationsNED()
|
|||||||
states[8] = states[8] + 0.5f*(states[5] + lastVelocity[1])*dtIMU;
|
states[8] = states[8] + 0.5f*(states[5] + lastVelocity[1])*dtIMU;
|
||||||
states[9] = states[9] + 0.5f*(states[6] + lastVelocity[2])*dtIMU;
|
states[9] = states[9] + 0.5f*(states[6] + lastVelocity[2])*dtIMU;
|
||||||
|
|
||||||
|
// Constrain states (to protect against filter divergence)
|
||||||
|
ConstrainStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CovariancePrediction(float dt)
|
void CovariancePrediction(float dt)
|
||||||
|
|||||||
Reference in New Issue
Block a user