AP_NavEKF2: reduce effect of acceleration on non-GPS mode attitude
This commit is contained in:
parent
d33bbf8cc7
commit
addd213af0
@ -511,6 +511,14 @@ void NavEKF2_core::UpdateStrapdownEquationsNED()
|
||||
accNavMag = velDotNEDfilt.length();
|
||||
accNavMagHoriz = norm(velDotNEDfilt.x , velDotNEDfilt.y);
|
||||
|
||||
// if we are not aiding, then limit the horizontal magnitude of acceleration
|
||||
// to prevent large manoeuvre transients disturbing the attitude
|
||||
if ((PV_AidingMode == AID_NONE) && (accNavMagHoriz > 5.0f)) {
|
||||
float gain = 5.0f/accNavMagHoriz;
|
||||
delVelNav.x *= gain;
|
||||
delVelNav.y *= gain;
|
||||
}
|
||||
|
||||
// save velocity for use in trapezoidal integration for position calcuation
|
||||
Vector3f lastVelocity = stateStruct.velocity;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user