Servers by jDrones

Automated tlog-to-text conversion

(Yendolosch) #1

These days I find myself mostly simulating flights with MAVProxy and SITL, and I use MissionPlanner just to convert the .tlog to a .txt file which I then process and read in Notepad++.

Is there a way to do this automatically, i.e. via command line startup parameters? I’m tired of having to wait for MissionPlanner to start and then clicking on Telemetry Logs -> Tlog > Kml or Graph -> Convert to Text -> (click my way through half the file system) …

Ideally, I’d just open a CMD shell and type something like
Missionplanner /tlog2txt "<path to .tlog file>",
and hey presto, there’s a new .txt file next to the .tlog file!

Any suggestions, or do I have to find and digest the MissionPlanner source code?

(James Pattison) #2

mavlogdump (in pymavlink) will spit out a csv or json from a tlog or .bin if that helps.
I don’t think it generates a txt though.
There used to be a tool called tlogreader.exe that did what you’re asking for, but I haven’t heard anything about it for several years. I doubt it will deal with mavlink2, but it might be lurking in GitHub somewhere.

(Yendolosch) #3

That’s a good idea, thanks!

I thought this would drop the sender IDs, but the --show-source and --show-seq parameters help: these two lines from a MissionPlanner “Tlog to Txt” dump …

2018-06-13 11:05:29 FD  9  0  0  1 FF  0      0 mavlink_heartbeat_t custom_mode 0 type 6 autopilot 8 base_mode 0 system_status 0 mavlink_version 3  sig  Len 21
2018-06-13 11:05:29 FE  9  0  0  0  1  1      0 mavlink_heartbeat_t custom_mode 0 type 2 autopilot 3 base_mode 81 system_status 4 mavlink_version 3  sig  Len 17

… are exported by mavlogdump --show-source --show-seq as …

2018-06-13 11:05:29.19: HEARTBEAT {type : 6, autopilot : 8, base_mode : 0, custom_mode : 0, system_status : 0, mavlink_version : 3} srcSystem=255 srcComponent=0 seq=1
2018-06-13 11:05:29.23: HEARTBEAT {type : 2, autopilot : 3, base_mode : 81, custom_mode : 0, system_status : 4, mavlink_version : 3} srcSystem=1 srcComponent=1 seq=0

… and that’s close enough. The way that MissionPlanner converts a log, with the header data right at the beginning of a line, does make it easier to visually grep for specific senders – but that’s something I should be able to work around.

Thanks again!