Contents Menu Expand Light mode Dark mode Auto light/dark mode
AirTrafficSim
Logo
  • Installation
  • Getting started

Tutorial

  • Navigating the UI
  • Understanding the data folder
  • Replaying data
  • Creating a simulation environment
  • Running a simulation
  • Adding flight plan
  • Using weather database
  • Converting historical data
  • Using OpenAP model

Development

  • Development guide
  • Understanding the project structure
  • Web client
  • Documentation
  • Testing
  • AirTrafficSim API reference
    • core
      • environment
      • aircraft
      • traffic
      • navigation
      • autopilot
      • performance
      • bada
      • weather
      • era5
    • utils
      • enums
      • calculation
      • unit_conversion
    • server
      • server
      • replay
      • data
Back to top

navigation#

class airtrafficsim.core.navigation.Nav#

Nav class to provide navigation data from x-plane 11.

Notes

https://developer.x-plane.com/docs/data-development-documentation/

https://developer.x-plane.com/article/navdata-in-x-plane-11/

Attributes:
Nav.fixpandas.dataframe

Fixes data https://developer.x-plane.com/wp-content/uploads/2019/01/XP-FIX1101-Spec.pdf

Nav.navpandas.dataframe

Radio navigation aid data https://developer.x-plane.com/wp-content/uploads/2020/03/XP-NAV1150-Spec.pdf

Nav.airwaypandas.dataframe

Airway data https://developer.x-plane.com/wp-content/uploads/2019/01/XP-AWY1101-Spec.pdf

Nav.holdingpandas.dataframe

Holding procedures data https://developer.x-plane.com/wp-content/uploads/2018/12/XP-HOLD1140-Spec.pdf

Nav.min_off_route_altpandas.dataframe

Minimum off route grid altitudes https://developer.x-plane.com/wp-content/uploads/2020/03/XP-MORA1150-Spec.pdf

Nav.min_sector_altpandas.dataframe

Minimum sector altitudes for navaids, fixes, airports and runway threshold https://developer.x-plane.com/wp-content/uploads/2020/03/XP-MSA1150-Spec.pdf

Nav.airportspandas.dataframe

Airports data (extracted to contain only runway coordinates) https://developer.x-plane.com/article/airport-data-apt-dat-file-format-specification/

Methods

find_closest_airport_runway(lat, long)

Find the closest runway and airport given lat long.

get_airport_procedures(airport, procedure_type)

Get instrument procedures of an airport.

get_holding_procedure(fix, region)

Get holding procedure.

get_procedure(airport, runway, procedure[, ...])

Get the details of standard instrument procedure

get_runway_coord(airport, runway)

Get runway coordinate

get_wp_coord(name, lat, long)

Get the nearest waypoint (fix and navaid) coordinate given name.

get_wp_in_area(lat1, long1, lat2, long2)

Get all waypoints(fix, navaids) within area

static get_wp_coord(name, lat, long)#

Get the nearest waypoint (fix and navaid) coordinate given name.

Parameters:
nameString

ICAO name of the waypoint (max 5 chars)

latfloat

Latitude of current position

longfloat

Longitude of current position

Returns:
lat, Long: float, float

Latitude and Longitude of the waypoint

static get_wp_in_area(lat1, long1, lat2, long2)#

Get all waypoints(fix, navaids) within area

Parameters:
lat1float

Latitude 1 of area (South)

long1float

Longitude 1 of area (West)

lat2float

Latitude 2 of area (North)

long2float

Longitude 2 of area (East)

Returns:
[lat, long, name][float[], float[], string[]]

[Latitude, Longitude, Name] array of all waypoints in the area

static get_runway_coord(airport, runway)#

Get runway coordinate

Parameters:
airportstring

ICAO code of the airport

runway: string

Runway name (RW07L).

Returns:
(lat, Long, alt): (float, float, float)

Latitude, Longitude, and Altitude of the runway end

static find_closest_airport_runway(lat, long)#

Find the closest runway and airport given lat long.

Parameters:
latfloat

Latitude

longfloat

Longitude

Returns:
Airportstring

ICAO code of airport

Runwaystring

Runway Name

static get_airport_procedures(airport, procedure_type)#

Get instrument procedures of an airport.

Parameters:
airportstring

ICAO code of the airport

procedure_typestring

Procedure type (SID/STAR/APPCH)

Returns:
procedure_namesstring []

Names of all procedures of the airport

static get_procedure(airport, runway, procedure, appch='', iaf='')#

Get the details of standard instrument procedure

Parameters:
airportstring

ICAO code of the airport

runway: string

Runway name (RW07L) for SID/STAR.

procedurestring

Procedure name of SID/STAR/APPCH (XXXX7A) For Approach: ILS = I07C, Localliser = L25L, RNAV = R25LY/Z

appchstring

Approach procedure type (A = initial approach, I = ILS, “” = None)

iafstring

Initial approach fix (Please provide when appch = A)

Returns:
Waypoint namesstring []

Waypoint names array

Altitude restriction typefloat []

Altitude restriction type (+, =, -)

Altitude restrictionfloat []

Altitude restriction 1

Altitude restrictionfloat []

Altitude restriction 2

Speed restriction typefloat []

Speed restriction type (+, =, -)

Speed restrictionfloat []

Speed restriction

static get_holding_procedure(fix, region)#

Get holding procedure.

Parameters:
fixstring

Fix name

regionstring

ICAO region

Returns:
[inbound holding course, legtime, leg length, direction, min alt, max alt, speed][]
Next
autopilot
Previous
traffic
Copyright © 2023, HKUST OCTAD Lab
Made with Sphinx and @pradyunsg's Furo
On this page
  • navigation
    • Nav
      • Nav.get_wp_coord()
      • Nav.get_wp_in_area()
      • Nav.get_runway_coord()
      • Nav.find_closest_airport_runway()
      • Nav.get_airport_procedures()
      • Nav.get_procedure()
      • Nav.get_holding_procedure()