Creating new MAVLink Message: Problem with building ArduCopter code

Hi everyone!

We want to send sensor data via MAVLink messages (the system uses ArduCopter in the drone and Mission Planner on the GCS). In order to do this, we want to introduce a new MAVLink message (probably into the ardupilotmega dialect), if it is useful for others. In case it is too special for general application, just for the use of our project.

As of now the sensor data is sent via an additional radio module on the drone which just sends the sensor data and a time stamp.

The sensor data has a 24 bit resolution and is measured with a sample rate of 50 Hz.

The data also should have a 32 bit timestamp.

Several sensor data values can be packed with one timestamp, because the sensor data intervals are quiet reliably at 20 ms. So in the end the new MAVLink message would be something like

time uint32_t
induction int32_t[N]

N ::= 1 … 63, for example N=10

if we use 32 bit sensor data values (and waste 8 bits per value). The timestamp is 32 b as of now, but since MAVLink seems to use time_us uint64_t timestamp as a quasi standard, we should adapt this later on.

I followed the instructions of
but at step #4 the instructions seem deprecated, since there is no ./libraries/GCS_MAVLink/ file. Later I found this code generation python program:

…/ardupilot-cs/modules/mavlink$ ./

Now my questions:

Where should be the output folder of the generated files?
I traced the call hierarchy of RANGEFINDER.distance, to learn about how ArduCopter works and found out, it includes some files in “modules/mavlink/pymavlink/generator/C/include_v1.0”, when ArduCopter is about to send the RANGEFINDER message. So should this be the output path for

Is it necessary to introduce a new parameter for the sensor data according to ?

Have other details of the MAVLink message adding process changed in regard to the introduction?
Thanks for your help :slight_smile:

Best Regards,

Update: I successfully generated headerfiles, it turned out i chose a wrong parameter in

Once its gui pops up, finally I selected



Language: C
Protocol: 1.0
Validate: True
Vali Units: False

and that generated header files. Before I selected C++ and it said, only MAVLink v2.0 is supported.
I didn’t find this anywhere in the docu. If the way I did it is correct, we might add this to ?