Browse Source

Handle velocity fields in follow_target message

The mavlink message FOLLOW_TARGET has additional
fields that are not being parsed here. See
https://mavlink.io/en/messages/common.html#FOLLOW_TARGET
for more details.
release/1.12
alessandro 4 years ago committed by Daniel Agar
parent
commit
b46e505b0d
  1. 3
      src/modules/mavlink/mavlink_receiver.cpp

3
src/modules/mavlink/mavlink_receiver.cpp

@ -2284,6 +2284,9 @@ MavlinkReceiver::handle_message_follow_target(mavlink_message_t *msg) @@ -2284,6 +2284,9 @@ MavlinkReceiver::handle_message_follow_target(mavlink_message_t *msg)
follow_target_topic.lat = follow_target_msg.lat * 1e-7;
follow_target_topic.lon = follow_target_msg.lon * 1e-7;
follow_target_topic.alt = follow_target_msg.alt;
follow_target_topic.vx = follow_target_msg.vel[0];
follow_target_topic.vy = follow_target_msg.vel[1];
follow_target_topic.vz = follow_target_msg.vel[2];
_follow_target_pub.publish(follow_target_topic);
}

Loading…
Cancel
Save