Hi, I’m after some help in converting the recorded data file from a BIN to a CSV or a file that can be opened in Matlab. There doesn’t appear to be a function within the Ardupilot mission planner. I’d be grateful for any advice on how to convert. Thanks
A search should help, plenty of people have done this before (except me
)
Check on the Ardupilot forum too.
Hi Daniel,
You can convert ArduPilot .BIN dataflash logs to CSV using the ArduPilot tools.
A common method is using mavlogdump.py:
mavlogdump.py --format csv yourlog.BIN > yourlog.csv
If you only want specific message types, for example GPS, IMU, ATT, etc., you can filter them:
mavlogdump.py --types GPS,IMU,ATT --format csv yourlog.BIN > selected_data.csv
Another practical option is PlotJuggler. It can open ArduPilot .BIN logs and export selected data channels to CSV, which can then be imported into MATLAB.
For MATLAB, I usually find the cleanest workflow is:
-
Convert
.BINto.csv -
Open/import the CSV in MATLAB
-
Filter the required columns/signals inside MATLAB
Hope this helps.
Dr. Fares Al Dhaheri
Al-Etihad Industrials, UAE
Hi, thank you for your advice I’ll try that.