Record waypoint, GPS path and yaw

I’m using pixhawk 5X and ArduRover with dual GPS setup to drive my skid-steering vehicle with Mission Planner.

Is it possible to record a text file or a CSV file by including the GPS path logged by both GPS, the waypoints and the yaw angle?
If it is not possible to do this with Mission Planner, is it possible to do it with Pixhawk somehow? I saw that there is a SD card in the pixhawk.

You can see a plot of everything you want by reviewing the .bin logs in Mission Planner, MAVExplorer, or UAV Log Viewer. Mission Planner can create a Google Earth compatible .kml file from a .bin log as well.

1 Like

And it automatically stores .tlog files.
So if you tell ardupilot which mavlink messages you want and the tine interval at which you want them, it will do exactly everything you want

I was able to load my first dataflash log and I checked the messages. I can see them in mission planner, but is there any way to export them in a CSV or TXT or any other readable format in order to import them in MATLAB or in any other processing software?

I saw the Create Matlab file option, but I think it creates a matlab file for all the messages and you cannot select only specific messages.

you can use that option, or you can use ardupilog to read .bin files into matlab and do some of the processing

The option you are referring to is the “Create Matlab file”? I tried to but it gives me error since it says the bin file is not correct even if I’m able to load it correctly under mission planner.

Is there any other option to export the messages?

Yes. Ardupilog

Google for it

1 Like

Thank you I’m going to check it!
In the meanwhile, I was currently checking mavros since I use ROS as main operating system.

thanks @amilcarlucas, Ardupilog for matlab works really fine! It directly imports everything from the bin file to a matlab structure! Thank you for the tip!

I cannot find the GPS1 and GPS2 lat and long values since I can only find log.GPS.Lat and log.GPS.Lng and I even don’t know if they are referred to GPS1 or GPS2.

I have two GPS modules installed on my rover and I connected the first one to GPS1 connector and the second one on GPS2 connector on my pixhawk 5X. My goal is to be able to read both of them, but I cannot find their coordinates in the bin file.

What am I doing wrong?

This is all the messages I get:

log = 

  Ardupilog with properties:

         fileName: '00000009.BIN'
     filePathName: 'C:\Users\39328\Downloads\00000009\'
         platform: 'ArduRover'
          version: 'V4.2.0-dev'
           commit: '74fa47a3'
      bootTimeUTC: '2021-12-30 17:05:55'
    msgsContained: {1×179 cell}
     totalLogMsgs: 8558052
        msgFilter: []
          numMsgs: 8558052
          XKY1_69: [1×1 LogMsgGroup]
              ERR: [1×1 LogMsgGroup]
           BARO_2: [1×1 LogMsgGroup]
             TSYN: [1×1 LogMsgGroup]
             VISP: [1×1 LogMsgGroup]
             XKF2: [1×1 LogMsgGroup]
             RWOH: [1×1 LogMsgGroup]
             PRXR: [1×1 LogMsgGroup]
            MAG_1: [1×1 LogMsgGroup]
             NKY1: [1×1 LogMsgGroup]
             RGPH: [1×1 LogMsgGroup]
              FMT: [1×1 LogMsgGroup]
             RBOH: [1×1 LogMsgGroup]
              CAM: [1×1 LogMsgGroup]
             RGPJ: [1×1 LogMsgGroup]
             PIDS: [1×1 LogMsgGroup]
             SBPH: [1×1 LogMsgGroup]
            XKQ_1: [1×1 LogMsgGroup]
             XKF3: [1×1 LogMsgGroup]
             NKF0: [1×1 LogMsgGroup]
             REY3: [1×1 LogMsgGroup]
              THR: [1×1 LogMsgGroup]
               PL: [1×1 LogMsgGroup]
          XKF5_12: [1×1 LogMsgGroup]
            MAG_2: [1×1 LogMsgGroup]
             NTUN: [1×1 LogMsgGroup]
             AIS4: [1×1 LogMsgGroup]
             PIDY: [1×1 LogMsgGroup]
             TRIG: [1×1 LogMsgGroup]
             RCI2: [1×1 LogMsgGroup]
             GRXS: [1×1 LogMsgGroup]
         XKY1_153: [1×1 LogMsgGroup]
             RATE: [1×1 LogMsgGroup]
              AOA: [1×1 LogMsgGroup]
             XKF0: [1×1 LogMsgGroup]
             NKF5: [1×1 LogMsgGroup]
             RBCH: [1×1 LogMsgGroup]
             RFND: [1×1 LogMsgGroup]
           XKF2_1: [1×1 LogMsgGroup]
           VIBE_1: [1×1 LogMsgGroup]
             RBCI: [1×1 LogMsgGroup]
             RISH: [1×1 LogMsgGroup]
              ARM: [1×1 LogMsgGroup]
             NKF2: [1×1 LogMsgGroup]
             WINC: [1×1 LogMsgGroup]
             ORGN: [1×1 LogMsgGroup]
             OAVG: [1×1 LogMsgGroup]
              GPS: [1×1 LogMsgGroup]
              XKQ: [1×1 LogMsgGroup]
             ADSB: [1×1 LogMsgGroup]
             XKY0: [1×1 LogMsgGroup]
             RWA3: [1×1 LogMsgGroup]
             REV3: [1×1 LogMsgGroup]
             RFRN: [1×1 LogMsgGroup]
             PIDE: [1×1 LogMsgGroup]
             CSRV: [1×1 LogMsgGroup]
             MAVC: [1×1 LogMsgGroup]
              CMD: [1×1 LogMsgGroup]
           XKF3_1: [1×1 LogMsgGroup]
              NKQ: [1×1 LogMsgGroup]
             RRNH: [1×1 LogMsgGroup]
             PIDP: [1×1 LogMsgGroup]
             IOMC: [1×1 LogMsgGroup]
             STRT: [1×1 LogMsgGroup]
             NKY0: [1×1 LogMsgGroup]
              SIM: [1×1 LogMsgGroup]
           XKY1_1: [1×1 LogMsgGroup]
              POS: [1×1 LogMsgGroup]
               SA: [1×1 LogMsgGroup]
             FMTU: [1×1 LogMsgGroup]
           XKY0_1: [1×1 LogMsgGroup]
             XKY1: [1×1 LogMsgGroup]
             RWA2: [1×1 LogMsgGroup]
              DMS: [1×1 LogMsgGroup]
             SBRH: [1×1 LogMsgGroup]
             GRAW: [1×1 LogMsgGroup]
             GUID: [1×1 LogMsgGroup]
               EV: [1×1 LogMsgGroup]
               OF: [1×1 LogMsgGroup]
             XKF1: [1×1 LogMsgGroup]
             PARM: [1×1 LogMsgGroup]
            IMU_2: [1×1 LogMsgGroup]
             RISI: [1×1 LogMsgGroup]
             MULT: [1×1 LogMsgGroup]
           XKF4_1: [1×1 LogMsgGroup]
            IMU_1: [1×1 LogMsgGroup]
             AHR2: [1×1 LogMsgGroup]
             RMGI: [1×1 LogMsgGroup]
             RFRH: [1×1 LogMsgGroup]
             GRXH: [1×1 LogMsgGroup]
             MODE: [1×1 LogMsgGroup]
             FILE: [1×1 LogMsgGroup]
              MAV: [1×1 LogMsgGroup]
             XKFD: [1×1 LogMsgGroup]
              RAD: [1×1 LogMsgGroup]
             RSSI: [1×1 LogMsgGroup]
             RCOU: [1×1 LogMsgGroup]
             HEAT: [1×1 LogMsgGroup]
              DSF: [1×1 LogMsgGroup]
             RGPI: [1×1 LogMsgGroup]
              IMU: [1×1 LogMsgGroup]
             PIDA: [1×1 LogMsgGroup]
             SRTL: [1×1 LogMsgGroup]
           XKFS_1: [1×1 LogMsgGroup]
             PSCE: [1×1 LogMsgGroup]
              NKT: [1×1 LogMsgGroup]
             PIDN: [1×1 LogMsgGroup]
              BCN: [1×1 LogMsgGroup]
             RASH: [1×1 LogMsgGroup]
              SCR: [1×1 LogMsgGroup]
             RSO3: [1×1 LogMsgGroup]
             POWR: [1×1 LogMsgGroup]
             UBX2: [1×1 LogMsgGroup]
           XKF1_1: [1×1 LogMsgGroup]
             XKTV: [1×1 LogMsgGroup]
             RMGH: [1×1 LogMsgGroup]
             ISBH: [1×1 LogMsgGroup]
              GYR: [1×1 LogMsgGroup]
             PIDR: [1×1 LogMsgGroup]
             DSTL: [1×1 LogMsgGroup]
             UBX1: [1×1 LogMsgGroup]
           XKFM_1: [1×1 LogMsgGroup]
              BCL: [1×1 LogMsgGroup]
             SBRM: [1×1 LogMsgGroup]
           VIBE_2: [1×1 LogMsgGroup]
             WENC: [1×1 LogMsgGroup]
              RPM: [1×1 LogMsgGroup]
             RVOH: [1×1 LogMsgGroup]
              MAG: [1×1 LogMsgGroup]
             BARO: [1×1 LogMsgGroup]
             AIS1: [1×1 LogMsgGroup]
             RALY: [1×1 LogMsgGroup]
             XKFS: [1×1 LogMsgGroup]
             NKF4: [1×1 LogMsgGroup]
             NKF3: [1×1 LogMsgGroup]
             RFRF: [1×1 LogMsgGroup]
           BARO_1: [1×1 LogMsgGroup]
             AIS5: [1×1 LogMsgGroup]
             REVH: [1×1 LogMsgGroup]
             ISBD: [1×1 LogMsgGroup]
              ESC: [1×1 LogMsgGroup]
             STAK: [1×1 LogMsgGroup]
             RBRH: [1×1 LogMsgGroup]
             OADJ: [1×1 LogMsgGroup]
               PM: [1×1 LogMsgGroup]
             UNIT: [1×1 LogMsgGroup]
         XKY1_148: [1×1 LogMsgGroup]
             REPH: [1×1 LogMsgGroup]
             OABR: [1×1 LogMsgGroup]
              BAT: [1×1 LogMsgGroup]
             PSCD: [1×1 LogMsgGroup]
             XKV1: [1×1 LogMsgGroup]
             XKFM: [1×1 LogMsgGroup]
             RRNI: [1×1 LogMsgGroup]
             ROFH: [1×1 LogMsgGroup]
             RSO2: [1×1 LogMsgGroup]
              ACC: [1×1 LogMsgGroup]
             TERR: [1×1 LogMsgGroup]
              MSG: [1×1 LogMsgGroup]
             PSCN: [1×1 LogMsgGroup]
             VISV: [1×1 LogMsgGroup]
             XKV2: [1×1 LogMsgGroup]
             XKF4: [1×1 LogMsgGroup]
             XKF5: [1×1 LogMsgGroup]
             RCIN: [1×1 LogMsgGroup]
             AISR: [1×1 LogMsgGroup]
              XKT: [1×1 LogMsgGroup]
             RASI: [1×1 LogMsgGroup]
             ARSP: [1×1 LogMsgGroup]
             NKF1: [1×1 LogMsgGroup]
             STER: [1×1 LogMsgGroup]
             REV2: [1×1 LogMsgGroup]
             VIBE: [1×1 LogMsgGroup]
              ATT: [1×1 LogMsgGroup]
             RBRI: [1×1 LogMsgGroup]
              PRX: [1×1 LogMsgGroup]
             SBRE: [1×1 LogMsgGroup]
             VISO: [1×1 LogMsgGroup]
              GPA: [1×1 LogMsgGroup]

If I load the bin file in Mission Planner, I can see GPS.0 and GPS.1:

Probably, should I post this problem in the main Ardupilog topic in this forum?

I’m not familiar with Ardupilog, but please note that from 4.1, the log record format has changed. There are no GPS1 and GPS2 records in the log anymore, but one single GPS record, which has an Instance field, marking which GPS it refers to. Where 0 is GPS1 and 1 is GPS2.

FMT, 84, 51, GPS, QBBIHBcLLeffffB, TimeUS,I,Status,GMS,GWk,NSats,HDop,Lat,Lng,Alt,Spd,GCrs,VZ,Yaw,U

Thank you! Yesterday, @Georacer updated the Ardupilog by adding both the GPS output and now it works great!

1 Like

Since I need to create a single log file for each mission, I tried to set LOG_FILE_DSRMROT = 1, so now each time I disarm and arm the vehicle again, I get a new log file.

Is this process correct or are there any other smarter ways to do that?

That is the correct way

1 Like

Hey, do I understand it right that these files can be downloaded only after the missions are accomplished, or also in near real-time? I am working on a system that is controlled with mission planner software and samples data with an external transmitter system. Now, I would like to read out the missions planner GPS/location data in near real-time to observe the positions of the measurements and to be able to export them to my Matlab app DURING the mission (in order to modify the missions while it is running). So, is there a way to export a file each x minutes during a mission (I cannot connect my laptop via USB to the laptop while it is running) and to use the files content for reading the locations and corresponding timesteps with Matlab?

Many thanks!

You will need a real-time Mavlink to matlab converter. Maybee there is already something in the internet.

Thanks, so this is not possible with telemetry logs or Ardupilog?

Mavlink is the protocol used in telemetry logs. In other words telemetry logs are Mavlink.

ArduPilog AFAIK can only operate with .bin dataflash logs.

The best way is probably to convert the Mavlink information you want, and only that, to matlab.