Time in CSV file obtained from PX4logs


I am converting my PX4logs to CSV files and I can read the data there, however I am unable to understand , how time of flight is represented in the CSV file. I mean the each sample data is obtained at some point in time, how do they represent this time?

The timestamps are in microseconds, or do you mean something else?

@CarlOlsson, silly me, yes it was just that, I was going crazy over this, and couldnot figure it out. so the time in seconds was simply (Start time-current time value)*10^-6

@abdullahmohiuddin How were you able to convert the px4log files to csv? I am using python 2.7 to convert the log files using sdlog2 from the px4tools. I get the following output -
Traceback (most recent call last):
File “sdlog2_dump.py”, line 343, in
File “sdlog2_dump.py”, line 340, in _main
File “sdlog2_dump.py”, line 154, in process
raise Exception(“Unknown msg type: %i” % msg_type)
Exception: Unknown msg type: 111

I tried several other means - FlighPlot, ulog, etc but have add errors. What is the right method to do it. Thank you.

Hi, can you please share your log file, I might give it a try. Since I am able to parse it, using same sd2log2_dump.py .

There is an online tool to plot log files. If you use it, you wont have to worry about converting it into csv file.

I used the online tool to plot the data, but it does not let me download the data in csv. I want the data for further processing. Here is my log file. I appended it with a .pdf since I am unable to upload a .px4log.samplelogfile.pdf (2.4 MB)

@abdullahmohiuddin Can you share with me your version of the sdlog2_dump.py . Here is the version I downloaded from px4tools. Again its appended with a .pdf instead of a .py
sdlog2_dump.pdf (12.8 KB)