Hi, I want to send a single integer value from my APM2.5 (ArduCopter 3.1) back to the ground station, and I'm trying to find the simplest way to achieve it.
1) Is it feasible to overwrite a non-critical, already-defined signal (such as gps_raw_int.satellites_visible), to send my integer back to ground control, so that I can avoid modifying the MAVLink parameters? I'd like to do this but am not sure how to go about it as all the MAVLink messages are declared in header files and I'm not sure how they hook into the Arduino code.
2) If not, what is the easiest way to do this? I have run through the MAVLink generator tutorial using common.xml and their test project, but I keep breaking everything when trying to integrate with the AC3 source. I would really appreciate help on how to add a single MAVLink param and then set it from within my Arduino code to be sent back.
Thanks.
Replies
MAVLink has a few "blank" fields which are used for debugging purposes. The NAMED_VALUE_INT field should work for your application.
It has:
NAMED_VALUE_INT.time_boot_ms
NAMED_VALUE_INT.name
NAMED_VALUE_INT.value
In terms of modding the APM code to send the correct value, see http://qgroundcontrol.org/dev/mavlink_arduino_integration_tutorial