ekf2: Use corrected local position and velocity

Corrects for IMU offset from body frame origin
This commit is contained in:
Paul Riseborough
2016-04-18 11:15:38 +02:00
committed by Lorenz Meier
parent 43e56f9fdc
commit 66fe3ab583
+2 -2
View File
@@ -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];