April tags MAVlink message


I’m planning on using the mavlink_apriltags_landing_target.py example code for precision landing. However I don’t really understand line 125 in the ‘send_landing_target_packet(tag, w, h, tag_size)’ function:

min(max(z_to_mm(tag.z_translation(), tag_size) / 1000, MAV_LANDING_TARGET_min_distance), MAV_LANDING_TARGET_max_distance)

The MAVlink documentation gives the description of this value to be the ‘Distance to the target from the vehicle’ however in the example code its only using the z translation not the total distance. I don’t really understand why the x and y translations are not needed .

Were just doing height. It’s just an example script. Modify it to return the total distance.

Will do. Thanks for the help!