Skip to main content

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 metar;
31pub mod model;
32pub mod navdata;
33pub mod ownship;
34pub mod provider;
35pub mod route_request;
36pub mod weather;
37
38pub use aircraft::AircraftProfile;
39pub use command::{CommandAck, ControlCommand, ControlCommandProvider};
40pub use compare::{
41    Agreement, ComparisonReport, ProductComparison, ProductKey, SourcedValue, compare,
42};
43pub use metar::{CloudCover, CloudLayer, FlightCategory, MetarObservation};
44pub use model::{Area, AreaBriefingRequest, Briefing, GeoPoint, Product, ProductKind, ValidPeriod};
45pub use navdata::{
46    AIRAC_CYCLE_DAYS, Airspace, AirspaceKind, Airway, AirwayLocation, AirwayPoint, AltitudeDatum,
47    AltitudeLimit, ControlledClass, FAA_NASR_CYCLE_DAYS, FAA_NASR_SUBSCRIPTION_URL,
48    NavDataAuthority, NavDataCycle, NavDataError, NavDataSnapshot, NavPoint, NavPointKind,
49    RestrictiveKind, Runway, RunwayEnd,
50};
51pub use ownship::{OwnshipStatus, OwnshipStatusProvider};
52pub use provider::{ContextProvider, ProviderError};
53pub use route_request::{FlightRules, RouteBriefingRequest, RouteWaypoint};
54pub use weather::WeatherBriefingProvider;