pycontrails.core.flightplan¶
ATC Flight Plan Parser.
Functions
|
Parse an ATC flight plan string into a dictionary. |
|
Parse an ARINC 633 Operational Flight Plan (OFP) XML into a Flight object. |
|
Write dictionary from |
- pycontrails.core.flightplan.parse_atc_plan(atc_plan)¶
Parse an ATC flight plan string into a dictionary.
The route string is not converted to lat/lon in this process.
- Parameters:
atc_plan (
str) – An ATC flight plan string conforming to ICAO Doc 4444-ATM/501 (Appendix 2)- Returns:
dict[str,str]– A dictionary consisting of parsed components of the ATC flight plan. A full ATC plan will contain the keys:callsign: ICAO flight callsignflight_rules: Flight rules (“I”, “V”, “Y”, “Z”)type_of_flight: Type of flight (“S”, “N”, “G”, “M”, “X”)number_aircraft: The number of aircraft, if more than onetype_of_aircraft: ICAO aircraft typewake_category: Wake turbulence categoryequipment: Radiocommunication, navigation and approach aid equipment and capabilitiestransponder: Surveillance equipment and capabilitiesdeparture_icao: ICAO departure airporttime: Estimated off-block (departure) time (UTC)speed_type: Speed units (“K”: km / hr, “N”: knots)speed: Cruise true airspeed inspeed_typeunitslevel_type: Level units (“F”, “S”, “A”, “M”)level: Cruise levelroute: Route stringdestination_icao: ICAO destination airportduration: The total estimated elapsed time for the flight planalt_icao: ICAO alternate destination airportsecond_alt_icao: ICAO second alternate destination airportother_info: Other informationsupplementary_info: Supplementary information
References
See also
- pycontrails.core.flightplan.parse_ofp_xml(raw_xml)¶
Parse an ARINC 633 Operational Flight Plan (OFP) XML into a Flight object.
Extracts waypoint-level information such as latitude, longitude, altitude, and time for the main flight plan (departure, waypoints, arrival) to construct a
Flightinstance.- Parameters:
raw_xml (
str | bytes | IO[str] | IO[bytes]) – String, bytes, or file-like object containing the ARINC 633 XML data.- Returns:
Flight– AFlightinstance containing the parsed waypoints.
- pycontrails.core.flightplan.to_atc_plan(plan)¶
Write dictionary from
parse_atc_plan()as ATC flight plan string.- Parameters:
plan (
dict[str,Any]) – Dictionary representation of ATC flight plan returned fromparse_atc_plan().- Returns:
str– ATC flight plan string conforming to ICAO Doc 4444-ATM/501
See also