Expand description
High-performance ADS-B data collector and storage library.
This library provides functionality to:
- Fetch ADS-B aircraft data from exchange APIs
- Parse binary binCraft protocol
- Store data in a custom high-performance format
- Query historical aircraft data
§Architecture
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Client │───▶│ Protocol │───▶│ Storage │
│ (HTTP/WS) │ │ (Parser) │ │ (Indexed) │
└─────────────┘ └─────────────┘ └─────────────┘
│ │
└─────────────┬───────────────────────┘
▼
┌─────────────┐
│ Collector │
│ (Orchestrator)│
└─────────────┘§Example
use adsb_collector::{
client::{AdsbClient, ClientConfig},
collector::{Collector, CollectorConfig},
storage::Storage,
};
use std::time::Duration;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Configure client with authentication
let client_config = ClientConfig::new(
"session_id".to_string(),
"api_key".to_string(),
);
let client = AdsbClient::new(client_config)?;
let storage = Storage::open("adsb_data")?;
let collector = Collector::new(
client,
storage,
CollectorConfig::default(),
);
// Run the collector
collector.run().await?;
Ok(())
}Re-exports§
pub use client::AdsbClient;pub use client::ClientConfig;pub use client::BoundingBox;pub use collector::Collector;pub use collector::CollectorBuilder;pub use collector::CollectorConfig;pub use delta_collector::DeltaCollector;pub use delta_collector::DeltaCollectorConfig;pub use delta_storage::DeltaStorage;pub use delta_storage::DeltaStorageStats;pub use protocol::parse_response;pub use storage::Storage;pub use types::AircraftRecord;pub use types::IcaoAddress;
Modules§
- client
- HTTP client for fetching ADS-B data from the exchange.
- collector
- Continuous data collection orchestrator.
- compact
- Compact binary format for ADS-B records.
- delta
- Delta-compressed aircraft records.
- delta_
collector - Delta-compressed data collection orchestrator.
- delta_
storage - Delta-compressed storage engine for ADS-B data.
- protocol
- Binary protocol parser for binCraft format.
- storage
- High-performance storage engine for ADS-B data.
- types
- Core data types for ADS-B aircraft tracking.