I wanted to analyze some data from a tlog file and figured that Excel would be the most flexible way so I created a little utility to extract the data I was interested in and save it as a comma separated value (CSV) file. Each selected parameter is in a separate column, and Excel can open the csv directly.
Note that it can't open the tlog file directly. You must use the Mission Planner to convert it to txt format. so:
1. From the APM Mission Planner Flight Data page select "Telemetry Logs", then "Tlog > Kml or Graph", then "Convert to Text".
2. Select the tlog file you are interested in, and the Mission Planner will create a txt file in its log folder.
3. Open the txt file in this program and it will parse the file and list the available parameters in the left tree control. Double click on the parameters you are interested in and they will be selected and displayed in the right tree control. If you want to remove a parameter from the selected list, double click it.
4."Save As" and provide an output file name. This will produce the csv file that you can open in Excel and plot as desired. The file will look like this, where each row was produced from one packet in the input file that contained at least one of the selected parameters.
If you want to re-use the list of parameters you can save and re-load them from the "configure" menu. These are simple text files you can edit directly if you like.
I am not familiar with the deloyment process for C# programs, so I have placed the entire project folder here.
Comments
Thank you for making such a good program.
It's an old post, but I'm waiting for an answer and I'll just ask one question.
I succeeded in extracting only the files and data I wanted using the program, but an error occurred in the simple timekeeping part.
For example, in the data log photos that Andrew uploaded, not all of the Time parts (all of the B columns in Excel) are displayed.
Date Time mavlink_gps_raw_int_t.lat mavlink_gps_raw_int_t.lon mavlink_gps_raw_int_t.alt mavlink_vfr_hud_t.airspeed mavlink_vfr_hud_t.groundspeed mavlink_vfr_hud_t.heading
2021-06-27 ?ㅽ썑 349453324 1283339761 19230 0.01 0.00380502 0
2021-06-27 ?ㅽ썑 349453324 1283339761 19230 0.023 0.004059403 0
I uploaded some of the data I extracted.
I really want to know the solution.
Thanks again for making a good program.
hi,
when using the tlog extractor program to extract mission data from Mission Planner the default date and time columns extracted by tlog extractor program are 4 seconds behind the mavlink_system_time_t.time_unix_usec.
why is there a discrepancy in the time?
where does the default time and date data from the tlog extractor come from? what is the source? GPStime? Universal Coordinate time? Time from the internet (which is usually Universal Coordinated time).
thanks in advance.
Jeff Z
oke, thanks for your information andrew.
There may be others, but I found these three time parameters:
1. mavlink_system_time_t.time_boot_ms
2. mavlink_gps_raw_int_t.time_usec
3. mavlink_global_position_int_t.time_boot_ms
I checked one of my own tlog files and the three values looked consistent to me, although the middle one (GPS) is scaled in microseconds, not milliseconds. Note that this one is is valid only once the GPS has a lock, and that while it is scaled in microseconds it comes from a millisecond value that was multiplied by 1000, so the last three digits are always zero.
When I last looked at this a couple of years ago even the value being returned in the GPS field was being generated based on the "millis()" function which gives the number of milliseconds system since the system was booted rather than truly being GPS time. So, at the end of the day, the three time values above have the same source - all are time since the system was booted, with two being scalled in milliseconds and one in microseconds..
thanks andrew,
in mavlink_vfr_hud_t i can get data throttle, and where i can convert time second to milisecond?
i tried this with using data time_boot_ms in mavlink_global_position_int_t. when i compare time in mavlink_global_int_t and mavlink_cfr_hud_t i got different time data between both data.
in data throttle i get 20533 time data, and in time_boots_in i get 4407 time data.
where i can get correct time data to throttle?
thanks advice,
rizki
As long as the VFR_HUD packet is being logged you will find the throttle parameter.
I don't think there is any mechanism for measuring RPM, so no way to log it. The closest you have is the throttle command.
Andrew
hello andrew,
i newbie here, i want to ask a question to you.
i'am wondering how to get data rpm and real throttle in tlog?
thank you advice,
best regards,
Rizki
oops! I meant 0 to pi rads (0 to 180 deg)
Partially answering myself:
mavlink_attitude_t.yaw follows the trigonometric convention and ranges 0 to 2pi rads (0 to 180 deg). Once converted into degrees and subtracted
from 90, can be used to correct mavlink_gps_raw_int.cog (course over the ground) and get
the actual orientation of the plane axis from the N (useful. ie. to orient acquired aerial photography).
Looking at the values, one strange observation:
The values of mavlink_global_position_int_t.hdg ("Compass heading in degrees *100) range between