mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-24 17:48:35 -04:00
AP_NavEKF3: Fix calculation of predicted LOS rate in terrain estimator
This commit is contained in:
parent
01f959c1ab
commit
618644addc
@ -187,10 +187,10 @@ void NavEKF3_core::EstimateTerrainOffset()
|
|||||||
|
|
||||||
// divide velocity by range, subtract body rates and apply scale factor to
|
// divide velocity by range, subtract body rates and apply scale factor to
|
||||||
// get predicted sensed angular optical rates relative to X and Y sensor axes
|
// get predicted sensed angular optical rates relative to X and Y sensor axes
|
||||||
losPred = relVelSensor.length()/flowRngPred;
|
losPred = norm(relVelSensor.x, relVelSensor.y)/flowRngPred;
|
||||||
|
|
||||||
// calculate innovations
|
// calculate innovations
|
||||||
auxFlowObsInnov = losPred - sqrtf(sq(ofDataDelayed.flowRadXYcomp[0]) + sq(ofDataDelayed.flowRadXYcomp[1]));
|
auxFlowObsInnov = losPred - norm(ofDataDelayed.flowRadXYcomp.x, ofDataDelayed.flowRadXYcomp.y);
|
||||||
|
|
||||||
// calculate observation jacobian
|
// calculate observation jacobian
|
||||||
float t3 = sq(q0);
|
float t3 = sq(q0);
|
||||||
|
Loading…
Reference in New Issue
Block a user