Custom Mavlink Messages in LOG file

Hello,

I have a GCS, with custom Mavlink messages. I want to create a log file with all the mavlink messages.
To log a custom message I thought about this post: Adding a new log message but this is for dataflash logs.

If it is posible to do with the dataflash log, How can i open the file to save the log?

Thanks in advance,

Nazaret.

telemetry log files are called .log files.
dataflash log files are called .bin files.

I advise you to use .log files if you want to access the data in real-time at the ground station.
I advise you to use .bin files if you do not want to access the data in real-time at the ground station.

Hello,

Thanks for your response, I tried to use bin files so i saved all the mavlink messages in binary. But mission planner didn’t recognize them. That’s why i chose log files.

How can i do it?

Thanks in advance,
Nazaret.

To create valid .bin files that mission planner will recognize, you need to also add FMT fields to the file. Did you do that?
Can you share the code changes you did in a github.com pull-request?

Hi,

When I do the log file, i put first the lines of FMT. But If I am going to create new messages, i don’t know what ID in FMT will have. How I will know the type of the custom message?

The log file looks like this:
FMT, 128, 89, FMT, BBnNZ, Type,Length,Name,Format,Columns

FMT, 130, 50, GPS, QBIHBcLLeffffB, TimeUS,Status,GMS,GWk,NSats,HDop,Lat,Lng,Alt,Spd,GCrs,VZ,Yaw,U

FMT, 131, 50, GPS2, QBIHBcLLeffffB, TimeUS,Status,GMS,GWk,NSats,HDop,Lat,Lng,Alt,Spd,GCrs,VZ,Yaw,U

GPS, 205799993, 3, 215464199, 2197, 13, 0.75, 37.2001939, -5.8807075, 22.44, 0.02088062, 286.6992, 0.038, 0, 1
GPS2, 205799993, 3, 215464199, 2197, 13, 0.75, 37.2001939, -5.8807075, 22.44, 0.02088062, 286.6992, 0.038, 0, 1

But in .bin files I just copy the mavlink messages. I didn’t know it needs the declaration of the messages too. Does the declaration of the messages go first as in log file?

Sorry I can’t share the changes in github :frowning:

Thanks,
Nazaret.