GCS_MAVLink: correct consumption of ODOMETRY velocity

This commit is contained in:
Randy Mackay 2022-11-24 19:34:36 +09:00 committed by Andrew Tridgell
parent a5aa25ef91
commit 906e8aced3
1 changed files with 3 additions and 1 deletions

View File

@ -3416,7 +3416,9 @@ void GCS_MAVLINK::handle_odometry(const mavlink_message_t &msg)
const uint32_t timestamp_ms = correct_offboard_timestamp_usec_to_ms(m.time_usec, PAYLOAD_SIZE(chan, ODOMETRY));
visual_odom->handle_vision_position_estimate(m.time_usec, timestamp_ms, m.x, m.y, m.z, q, posErr, angErr, m.reset_counter);
const Vector3f vel{m.vx, m.vy, m.vz};
// convert velocity vector from FRD to NED frame
Vector3f vel{m.vx, m.vy, m.vz};
vel = q * vel;
visual_odom->handle_vision_speed_estimate(m.time_usec, timestamp_ms, vel, m.reset_counter);
}