I’ve written a python script that converts a .bin file to a SQLite database.
If anyone is interested in this, I have the script and a sample database available for download.
I’ve written a python script that converts a .bin file to a SQLite database.
If anyone is interested in this, I have the script and a sample database available for download.
I have a sample database built from a large .bin log file. It’s loaded on google drive, and it’s public. I can’t post a link to it here. But if anyone wants to download it, I’m pretty sure I can send the link in a message reply.
I have the script on GitHub, but I haven’t finished the documentation.
Also - the script also includes building a table of descriptions for every message type and field. The script gets that data by web-scraping the ArduPilot wiki. So if you need to write a program that has the data element descriptions, that data is available.
What do you see as the benefit of keeping the log in a database? AFAIK databases are optimized for random access and logs are typically accessed sequentially.
The benefit for me is ease of access.
Using apps like DB Browser, which allows browsing SQL databases, you can easily view/browse the contents of database tables and views using joins and filters. This makes it easy to see what’s in an ArduPilot log file.
I’ve written python scripts that (available on my github page) that produce reports and handle inquiries on .bin log files - in a way not available on Mission Planner or MavExplorer. With the log file in a SQL database, such queries can be made using simple SQL, not more complex Python scripts.
If for no other reason, the benefit is to facilitate the exploration of log files.
If you’d like to see for yourself, send me a message and I’ll provide you with a link to download a sample from google drive. I’ve posted this link on the ardupilot.org facebook group, and several people have downloaded the sample database to take a look at it.
Half of my reason I work with ArduPilot is to explore and learn. My script that converts a .bin file to a SQL file is just my most recent effort to do so.
I’ve updated my GitHub page for this script. You can find it on GitHub under: CopterCamTech/sqlite-tools
The repo includes the Python script and the requirements.txt file.
The RELEASES section as two assets available for download: