fpw / avitab

X-Plane plugin that displays a tablet to aid VR usage
GNU Affero General Public License v3.0
299 stars 58 forks source link

Add support for Avitab NAV data held in a SQLite database #200

Closed mjh65 closed 1 month ago

mjh65 commented 5 months ago

This is a relatively large feature addition that has been hinted at in several previous PRs, and is finally now being requested, having reached a state of (more-or-less) equivalent behaviour with the existing in-memory NAV data scraped from the simulator installation files on each Avitab startup.

In its current version, the new feature will remain inactive unless the Avitab user installs a compatible SQLite database file with the correct name, in the correct place, and with the correct structure. Since this is unlikely to be done accidentally, this PR should be relatively harmless to incorporate into the Avitab repo, and this PR is really to help tidy-up my fork of the Avitab master, and reduce the size of future updates.

For advanced users who wish to try using the feature, the code base now includes a tool which is able to generate an Avitab-compatible SQLite database file from a Little Navmap database. This is the first (and easiest) technique for database generation. It is planned to support other techniques in the future.

mjh65 commented 5 months ago

For the purposes of test and review, a pre-compiled database can be downloaded from https://www.dropbox.com/scl/fi/kmi8lgtjymq2otg7e24pv/avitab_navdb.sqlite.zip?rlkey=2p6fq338o6nbg5osxw0ou0cfu&dl=0.

To enable the new SQL NAV feature the unzipped database file (avitab_navdb.sqlite) should be put into a directory 'navdb' in the root directory of the plugin (or the directory containing the Avitab-standalone executable for desktop testing).

Even if not used when flying with X-Plane, the use of the SQL database significantly reduces startup times, and is great when debugging other parts of the Avitab code!