Using the SQL version of an ArduPilot .bin log file, here’s an example of computing and plotting the distance to home for a mapping mission flown in a grid pattern.
The SQL and chart are done using the DB Browser app.
The .bin log file is converted to a SQLite database using my new conversion Python script - which is now on GitHub. look for “CopterCamTech/sqlite-tools” on GitHub.
If you’d like to try this yourself, this .bin log file is available for download int the GitHub repo’s release/assets section as TM-test-grid-index.db
To enable doing joins across tables, I added a column to each table called bin_index that breaks the time period of the entire log file time into 1000th sections. You can’t do joins on the timestamps (TimeUS) because they don’t match up because in micro-seconds their time stamps are too fine.
The script to add the bin_index columns to each table is in a script I haven’t uploaded to GitHub yet - it should be up by this weekend.
