ekf2: Use corrected local position and velocity

Corrects for IMU offset from body frame origin
This commit is contained in:
Paul Riseborough 2016-04-11 18:18:53 +10:00 committed by Lorenz Meier
parent 43e56f9fdc
commit 66fe3ab583
1 changed files with 2 additions and 2 deletions

View File

@ -580,13 +580,13 @@ void Ekf2::task_main()
lpos.timestamp = hrt_absolute_time();
// Position in local NED frame
// Position of body origin in local NED frame
_ekf->get_position(pos);
lpos.x = pos[0];
lpos.y = pos[1];
lpos.z = pos[2];
// Velocity in NED frame (m/s)
// Velocity of body origin in local NED frame (m/s)
_ekf->get_velocity(vel);
lpos.vx = vel[0];
lpos.vy = vel[1];