Mavdecoder
Decoder for binary mavlink messag sequences
Mavdecoder is an utility used to parse binary files containg raw mavlink messages (eg. files containing every byte received by the Ground Station over the radio link with the rocket) and decode them into csv tables.
Usage
-
Compile the sources using
make
-
Decode the messages using
./mavdecoder <input_file>
The output will be located in the out/
directory.
Updating message definitions
-
Sync the
mavlink_skyward_lib
submodule -
Generate the new sources:
python3 generate.py <mavlink_lib>
Wheremavlink_lib
is the name of a mavlink message library (the name of one of the folders inmavlink_skyward_lib/mavlink_lib/
, eg.hermes
) -
Copy the contents of
messages_generated.h
intomessages.h
, then modify theprint(...)
functions as needed.
Attention: Make sure not to overwrite already existing manual edits present inmessages.h
Note
Mavdecoder does not use the build in mavlink parser, but implements its own in order to be able to decode even corrupt messages. Corrupt messages are common when receiving telemetry from a rocket in-flight, and these messages are usually very easy to restore.
In particular, mavdecoder ignores:
- CRC verification
- Message lenght field
- System & component field
In this way, messages are correctly decoded even if the CRC is wrong and/or the lenght, component id and system id fields are corrupt.
This obviosly leads to some false positives, that can, however, be easily detected and discarded (manually).