Receiving MAVLink messages **sent from ArduPilot**

Hello,

Is there a way in Lua scripting to listen for and receive CAMERA_IMAGE_CAPTURED MAVLink messages that are sent from ArduPilot?

I am familiar with the example MAVLink_Commands.lua script in the ArduPilot repo and the other mavlink_msg* Lua scripts on which the example is dependent. However, my understanding is the receipt of MAVLink messages by the Lua script are those MAVLink messages sent from the GCS, as opposed to MAVLink messages sent from ArduPilot.

Why I want to receive Camera MAVLink messages sent from ArduPilot:

I have been testing missions that contain DO_SET_CAM_TRIGG_DIST commands. I have CAM1_TYPE set to 1 (Camera), SERVO5_FUNCTION set to 10 (Camera Trigger), and other CAM1 and SERVO5 parameters set accordingly. All works as expected relative to triggering the camera at the distance specified by the DO_SET_CAM_TRIGG_DIST command.

When running the mission, I see camera icons appear in the GCS (Mission Planner and QGroundControl) at each camera trigger point. I assume the camera icons appear in the GCS because the GCS is listening for/receiving CAMERA_IMAGE_CAPTURED (263) MAVLink messages from ArduPilot and then displaying the camera icon in response to receipt of the CAMERA_IMAGE_CAPTURED messages.

I am developing Lua script to track the lat/lng coordinates (location object) of camera trigger points for the purpose of restarting the mission at a prior trigger point in the event of a failsafe or pilot forced RTL. My current Lua script computes camera trigger point based upon distance from prior camera trigger point. In the current implementation the computed trigger point is generally less than 1 meter from actual trigger point. I’d like to replace the distance computation in the Lua script with the actual trigger points by having the Lua script listen for and receive the CAMERA_IMAGE_CAPTURED MAVLink messages sent from ArduPilot.