0

I am using the sdlog2_dump.py script from here: https://github.com/dronecrew/px4tools/blob/master/test/sdlog2_dump.py to read a .px4log-file. This works well in general, but I don't need all variables from the autopilot. Ideally I want to chose which variables I want to write.

Using the script with the following command:

python sdlog2_dump.py log001.px4log -m GPS_Lat -f test.csv

Writes the data from column GPS_Lat to the test.csv file. That works fine. But as soon as I add another variable using the -m argument e.g.

python sdlog2_dump.py log001.px4log -m GPS_Lat -m GPS_Lon -f test.csv

only GPS_Lon values are written. The header has the correct names and the column number is correct as well (commas are printed), but no data for GPS_Lat:

GPS_Lat,GPS_Lon
,13.2523486
,13.2523486
,13.2523485
,13.2523486
,13.2523486

I am not sure what is happening here. According to the instructions it is possible to input multiple field names, but how it is shown does not work at all. If I use the format proposed:

python sdlog2_dump.py log001.px4log -m GPS[.Lat, Lon] -f test.csv

the file is empty.

I had a look in the code, but can't find anything obvious that causes this behavior.

Kj Ell
  • 23
  • 4

0 Answers0