aerocontext_core/lib.rs
1//! Domain model and pluggable provider contract for aeronautical context.
2//!
3//! This crate defines the provider-neutral types ([`model`]) and the
4//! [`ContextProvider`] trait that every context-provider adapter implements
5//! (aviationweather.gov, Leidos Flight Service, future European sources).
6//! The assembled context serves a human pilot as a briefing and an AI agent
7//! as grounded, attributable context.
8//!
9//! # Capabilities
10//!
11//! Every provider implements the [`ContextProvider`] identity trait, then
12//! one capability trait per kind of context it serves:
13//!
14//! - [`WeatherBriefingProvider`] — area weather briefings (METAR/TAF/…),
15//! the only capability implemented today.
16//! - [`OwnshipStatusProvider`] and [`ControlCommandProvider`] — sibling
17//! capabilities, stubbed pending real sources.
18//!
19//! Splitting by capability (not by provider) lets a new source — a future
20//! European service, or a datalink source like FIS-B — implement only the
21//! capabilities it offers, and lets each consumer depend only on the context
22//! it needs. The weather data it returns ([`Briefing`], [`Product`],
23//! [`model::ProductKind`]) is `#[non_exhaustive]`, so it grows without
24//! breaking existing adapters.
25
26pub mod aircraft;
27pub mod command;
28pub mod compare;
29pub mod geo;
30pub mod model;
31pub mod navdata;
32pub mod ownship;
33pub mod provider;
34pub mod route_request;
35pub mod weather;
36
37pub use aircraft::AircraftProfile;
38pub use command::{CommandAck, ControlCommand, ControlCommandProvider};
39pub use compare::{
40 Agreement, ComparisonReport, ProductComparison, ProductKey, SourcedValue, compare,
41};
42pub use model::{Area, AreaBriefingRequest, Briefing, GeoPoint, Product, ProductKind, ValidPeriod};
43pub use navdata::{
44 AIRAC_CYCLE_DAYS, Airway, AirwayLocation, AirwayPoint, FAA_NASR_CYCLE_DAYS,
45 FAA_NASR_SUBSCRIPTION_URL, NavDataAuthority, NavDataCycle, NavDataError, NavDataSnapshot,
46 NavPoint, NavPointKind,
47};
48pub use ownship::{OwnshipStatus, OwnshipStatusProvider};
49pub use provider::{ContextProvider, ProviderError};
50pub use route_request::{FlightRules, RouteBriefingRequest, RouteWaypoint};
51pub use weather::WeatherBriefingProvider;