mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
ekf2 reset: fix sign of delta altitude for global position topic
Signed-off-by: Roman <bapstroman@gmail.com>
This commit is contained in:
parent
8155044b40
commit
1e1bf7e4bb
@ -889,6 +889,8 @@ void Ekf2::task_main()
|
||||
|
||||
global_pos.alt = -pos[2] + lpos.ref_alt; // Altitude AMSL in meters
|
||||
_ekf.get_posD_reset(&global_pos.delta_alt, &global_pos.alt_reset_counter);
|
||||
// global altitude has opposite sign of local down position
|
||||
global_pos.delta_alt *= -1.0f;
|
||||
|
||||
global_pos.vel_n = velocity[0]; // Ground north velocity, m/s
|
||||
global_pos.vel_e = velocity[1]; // Ground east velocity, m/s
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user