Extracting CSV file of GPS POS data

Does anyone know how to extract a .CSV file of the GPS POS data from a flight log? I only need the lat, long and GPS time stamp. I am trying to correct the GPS data from a standalone sensor that has its own GPS but poor accuracy compared to the drone GPS. I do not see a GPS timestamp in the flight log data.

.txt and .bin attached:

pbarker@bluebottle:/tmp$ mavlogdump.py 2019-07-01\ 21-37-43.bin --t POS
–format csv | head
timestamp,TimeUS,Lat,Lng,Alt,RelHomeAlt,RelOriginAlt
1562031466.08987093,536303038,40.7886159,-79.996995,374.440002441,0.0726074501872,0.0626074522734
1562031466.18990803,536403075,40.7886159,-79.9969949,374.470001221,0.108776971698,0.098776973784
1562031466.28986001,536503027,40.7886159,-79.9969948,374.5,0.139304026961,0.129304021597
1562031466.38981509,536602982,40.7886158,-79.9969947,374.529998779,0.166344180703,0.156344175339
1562031466.48982000,536702987,40.7886158,-79.9969947,374.539978027,0.179324328899,0.169324323535
1562031466.58984399,536803011,40.7886158,-79.9969946,374.559997559,0.196365118027,0.186365112662
1562031466.68988514,536903052,40.7886158,-79.9969946,374.579986572,0.210800841451,0.200800836086
1562031466.78980994,537002977,40.7886157,-79.9969945,374.600006104,0.230696737766,0.220696732402

The first column is an epoch timestamp.

Thank you. That looks great. How do I do that?

You need mavlogdump.py

And it looks like the syntax is:
mavlogdump.py 2019-07-01\ 21-37-43.bin --t POS
–format csv | head

FileName
–t (I’m assuming is --types) appears to be the type of message, POS in this case
–format specifies the output, csv in this case
|head tells it to print to the screen. You could otherwise tell it to print directly to a .csv file.

If you open the mavlogdump.py file, you can see all the options in the argument parser section.

This is assuming linux which should support python… For Windows you’ll have to install a program to run python scripts.

head tells it to print to the screen. You could otherwise tell it to print directly to a .csv file.

That actually says “hack the top off the output from the previous command
and throw the rest away”.

If you open the mavlogdump.py file, you can see all the options in the argument parser section.

I’m sure we support “–help” :slight_smile:

Thanks for clarifying my rather terse help :slight_smile:

Peter

Thanks for clarifying the instructions. I will try it out.

HI!
i want to extract gps point have a draw, but when i run the mavlogdump.py it has a error, could you give some advice? grateful for your help.