feat: Add SQLite database integration for aircraft history and callsign enhancement
- Implement comprehensive database package with versioned migrations - Add skyview-data CLI tool for managing aviation reference data - Integrate database with merger for real-time aircraft history persistence - Support OurAirports and OpenFlights data sources (runtime loading) - Add systemd timer for automated database updates - Fix transaction-based bulk loading for 2400% performance improvement - Add callsign enhancement system with airline/airport lookups - Update Debian packaging with database directory and permissions Database features: - Aircraft position history with configurable retention - External aviation data loading (airlines, airports) - Callsign parsing and enhancement - API client for external lookups (OpenSky, etc.) - Privacy mode for complete offline operation CLI commands: - skyview-data status: Show database statistics - skyview-data update: Load aviation reference data - skyview-data list: Show available data sources - skyview-data clear: Remove specific data sources 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
cd51d3ecc0
commit
37c4fa2b57
25 changed files with 4771 additions and 12 deletions
99
debian/usr/share/doc/skyview-adsb/DATABASE.md
vendored
Normal file
99
debian/usr/share/doc/skyview-adsb/DATABASE.md
vendored
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# SkyView Database Management
|
||||
|
||||
SkyView includes a comprehensive database management system for enriching aircraft callsigns with airline and airport information.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Check Current Status
|
||||
```bash
|
||||
skyview-data status
|
||||
```
|
||||
|
||||
### 2. Import Safe Data (Recommended)
|
||||
```bash
|
||||
# Import public domain sources automatically
|
||||
skyview-data update
|
||||
```
|
||||
|
||||
### 3. Enable Automatic Updates (Optional)
|
||||
```bash
|
||||
# Weekly updates on Sunday at 3 AM
|
||||
sudo systemctl enable --now skyview-database-update.timer
|
||||
```
|
||||
|
||||
## Available Data Sources
|
||||
|
||||
### Safe Sources (Public Domain)
|
||||
These sources are imported automatically with `skyview-data update`:
|
||||
- **OurAirports**: Comprehensive airport database (public domain)
|
||||
- **FAA Registry**: US aircraft registration data (public domain)
|
||||
|
||||
### License-Required Sources
|
||||
These require explicit acceptance:
|
||||
- **OpenFlights**: Airline and airport data (AGPL-3.0 license)
|
||||
|
||||
## Commands
|
||||
|
||||
### Basic Operations
|
||||
```bash
|
||||
skyview-data list # Show available sources
|
||||
skyview-data status # Show database status
|
||||
skyview-data update # Update safe sources
|
||||
skyview-data import openflights # Import licensed source
|
||||
skyview-data clear <source> # Remove source data
|
||||
```
|
||||
|
||||
### Systemd Timer Management
|
||||
```bash
|
||||
# Enable weekly automatic updates
|
||||
systemctl enable skyview-database-update.timer
|
||||
systemctl start skyview-database-update.timer
|
||||
|
||||
# Check timer status
|
||||
systemctl status skyview-database-update.timer
|
||||
|
||||
# View update logs
|
||||
journalctl -u skyview-database-update.service
|
||||
|
||||
# Disable automatic updates
|
||||
systemctl disable skyview-database-update.timer
|
||||
```
|
||||
|
||||
## License Compliance
|
||||
|
||||
SkyView maintains strict license separation:
|
||||
- **SkyView binary**: Contains no external data (stays MIT licensed)
|
||||
- **Runtime import**: Users choose which sources to import
|
||||
- **Safe defaults**: Only public domain sources updated automatically
|
||||
- **User choice**: Each person decides their own license compatibility
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Check Service Status
|
||||
```bash
|
||||
systemctl status skyview-database-update.timer
|
||||
journalctl -u skyview-database-update.service -f
|
||||
```
|
||||
|
||||
### Manual Database Reset
|
||||
```bash
|
||||
systemctl stop skyview-database-update.timer
|
||||
skyview-data reset --force
|
||||
skyview-data update
|
||||
systemctl start skyview-database-update.timer
|
||||
```
|
||||
|
||||
### Permissions Issues
|
||||
```bash
|
||||
sudo chown skyview:skyview /var/lib/skyview/
|
||||
sudo chmod 755 /var/lib/skyview/
|
||||
```
|
||||
|
||||
## Files and Directories
|
||||
|
||||
- `/usr/bin/skyview-data` - Database management command
|
||||
- `/var/lib/skyview/skyview.db` - Database file
|
||||
- `/usr/share/skyview/scripts/update-database.sh` - Cron helper script
|
||||
- `/lib/systemd/system/skyview-database-update.*` - Systemd timer files
|
||||
|
||||
For detailed information, see `man skyview-data`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue