mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 08:40:30 +08:00
EKF2: Report zero as position until local pos is valid
This commit is contained in:
1 parent
c835fb36a6
commit
a1c8585342
1 file changed
+2
-2
@@ -745,8 +745,8 @@ void Ekf2::task_main()
|
||||
|
||||
// Position of body origin in local NED frame
|
||||
_ekf.get_position(pos);
|
||||
lpos.x = pos[0];
|
||||
lpos.y = pos[1];
|
||||
lpos.x = (_ekf.local_position_is_valid()) ? pos[0] : 0.0f;
|
||||
lpos.y = (_ekf.local_position_is_valid()) ? pos[1] : 0.0f;
|
||||
lpos.z = pos[2];
|
||||
|
||||
// Velocity of body origin in local NED frame (m/s)
|
||||
|
||||
Reference in new issue
Block a user