Skip to main content

aerocontext_planning/
lib.rs

1//! Flight-route planning: the single engine that turns a route or a
2//! flight plan into usable geometry.
3//!
4//! Every frontend — the `aerocontext` CLI, the MCP `route_brief` tool, a
5//! future GUI or iOS app — composes this crate rather than reimplementing
6//! any of it. The hub is the [`flightplan::FlightPlan`] domain model;
7//! Garmin `.fpl` is one *codec* (inside [`flightplan`]), not the
8//! privileged format, so other formats slot in beside it without
9//! touching planning logic.
10//!
11//! The pieces:
12//! - [`flightplan`] — the `FlightPlan` model and its `.fpl` codec.
13//! - [`route`] — expand a route (idents, airways, DCT, lat/lon, SID/STAR
14//!   tokens) against a [`NavDataSnapshot`](aerocontext_core::NavDataSnapshot)
15//!   into ordered geometry.
16//! - [`corridor`] — a width-bounded corridor around a route, with
17//!   leg-wise spatial association.
18//! - [`crosssection`] — the vertical profile (climb/cruise/descent, time
19//!   en route, fuel) from an
20//!   [`AircraftProfile`](aerocontext_core::AircraftProfile).
21//!
22//! This crate consumes the cycle-stamped snapshot that `aerocontext-navdata`
23//! produces; it never fetches or distributes data itself.
24
25pub mod corridor;
26pub mod crosssection;
27pub mod flightplan;
28pub mod route;
29
30pub use corridor::{Corridor, CorridorError};
31pub use crosssection::{CrossSection, CrossSectionError, CrossSectionSample, FlightPhase};
32pub use flightplan::{FlightPlan, FplError, PlanWaypoint, WaypointType};
33pub use route::{ExpandedRoute, RouteError, RoutePoint, RouteToken, expand_str};