mavlink: fix odometry frames of reference setup

This commit is contained in:
TSC21
2020-05-28 15:45:13 +01:00
committed by Nuno Marques
parent 0ec48cfef3
commit 562d57fee8
6 changed files with 45 additions and 23 deletions
+6 -4
View File
@@ -2548,13 +2548,15 @@ protected:
if (_mavlink->odometry_loopback_enabled()) {
odom_updated = _vodom_sub.update(&odom);
// frame matches the external vision system
msg.frame_id = MAV_FRAME_VISION_NED;
msg.frame_id = MAV_FRAME_LOCAL_NED;
// source: external vision system
msg.estimator_type = MAV_ESTIMATOR_TYPE_VISION;
} else {
odom_updated = _odom_sub.update(&odom);
// frame matches the PX4 local NED frame
msg.frame_id = MAV_FRAME_ESTIM_NED;
msg.frame_id = MAV_FRAME_LOCAL_NED;
// source: PX4 estimator
msg.estimator_type = MAV_ESTIMATOR_TYPE_AUTOPILOT;
}
if (odom_updated) {