mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 09:27:36 +08:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user