mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 02:31:36 +08:00
ekf2: Use corrected local position and velocity
Corrects for IMU offset from body frame origin
This commit is contained in:
committed by
Lorenz Meier
parent
43e56f9fdc
commit
66fe3ab583
@@ -580,13 +580,13 @@ void Ekf2::task_main()
|
|||||||
|
|
||||||
lpos.timestamp = hrt_absolute_time();
|
lpos.timestamp = hrt_absolute_time();
|
||||||
|
|
||||||
// Position in local NED frame
|
// Position of body origin in local NED frame
|
||||||
_ekf->get_position(pos);
|
_ekf->get_position(pos);
|
||||||
lpos.x = pos[0];
|
lpos.x = pos[0];
|
||||||
lpos.y = pos[1];
|
lpos.y = pos[1];
|
||||||
lpos.z = pos[2];
|
lpos.z = pos[2];
|
||||||
|
|
||||||
// Velocity in NED frame (m/s)
|
// Velocity of body origin in local NED frame (m/s)
|
||||||
_ekf->get_velocity(vel);
|
_ekf->get_velocity(vel);
|
||||||
lpos.vx = vel[0];
|
lpos.vx = vel[0];
|
||||||
lpos.vy = vel[1];
|
lpos.vy = vel[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user