aircraft#
- class airtrafficsim.core.aircraft.Aircraft(traffic: Traffic, call_sign, aircraft_type, flight_phase, configuration, lat, long, alt, heading, cas, fuel_weight, payload_weight, departure_airport='', departure_runway='', sid='', arrival_airport='', arrival_runway='', star='', approach='', flight_plan=[], cruise_alt=-1)#
Aircraft class to represent the states of one individual aircraft, including get and set functions.
Methods
get_alt
()Get altitude of aircraft.
get_cas
()Get Calibrated air speed of aircraft.
Get the total fuel consumed of aircraft.
Get heading of aircraft.
get_lat
()Get latitude of aircraft.
get_long
()Get longitude of aircraft.
get_mach
()Get Mach number of aircraft.
Get next waypoint.
get_vs
()Get vertical speed of aircraft.
get_wake
()Get wake category of aircraft.
Resume own navigation to use autopilot instead of user commanded target.
set_alt
(alt)Set altitude.
set_direct
(waypoint)Set direct to a waypoint.
set_heading
(heading)Set the heading of the aircraft.
set_holding
(holding_time, holding_fix, region)Set holding procedure.
set_speed
(speed)Set the speed of the aircraft.
set_vectoring
(vectoring_time, v_2, fix)Set vectoring procedure.
set_vs
(vs)Set vertical speed.
Initialize one aircraft and add the aircraft to traffic array.
- Parameters:
- trafficTraffic
Points to the traffic array class. (The value must be self.traffic)
- call_signstr
Call sign of the aircraft
- aircraft_typestr
ICAO aircraft type
- flight_phaseFlightPhase.enums
Initial flight phase
- configurationConfiguration.enums
Initial configuration
- latfloat
Initial latitude [deg]
- longfloat
Initial longitude [deg]
- altfloat
Initial altitude [ft]
- headingfloat
Initial heading [deg]
- casfloat
Initial CAS [kt]
- fuel_weightfloat
Initial fuel weight [kg]
- payload_weightfloat
Initial payload weight [kg]
- departure_airportstr, optional
ICAO code of departure airport, by default “”
- departure_runwaystr, optional
Departure runway, by default “”
- sidstr, optional
ICAO code of Standard Instrument Departure, by default “”
- arrival_airportstr, optional
ICAO code of arrival airport, by default “”
- arrival_runwaystr, optional
Arrival runway, by default “”
- starstr, optional
ICAO code Standard Terminal Arrival Procedure, by default “”
- approachstr, optional
ILS approach procedure, by default “”
- flight_planlist, optional
Array of waypoints that the aircraft will fly, by default []
- cruise_altint, optional
Target cruise altitude [ft], by default -1
Methods
get_alt
()Get altitude of aircraft.
get_cas
()Get Calibrated air speed of aircraft.
Get the total fuel consumed of aircraft.
Get heading of aircraft.
get_lat
()Get latitude of aircraft.
get_long
()Get longitude of aircraft.
get_mach
()Get Mach number of aircraft.
Get next waypoint.
get_vs
()Get vertical speed of aircraft.
get_wake
()Get wake category of aircraft.
Resume own navigation to use autopilot instead of user commanded target.
set_alt
(alt)Set altitude.
set_direct
(waypoint)Set direct to a waypoint.
set_heading
(heading)Set the heading of the aircraft.
set_holding
(holding_time, holding_fix, region)Set holding procedure.
set_speed
(speed)Set the speed of the aircraft.
set_vectoring
(vectoring_time, v_2, fix)Set vectoring procedure.
set_vs
(vs)Set vertical speed.
- set_heading(heading)#
Set the heading of the aircraft.
- Parameters:
- headingfloat
Heading [deg]
- set_speed(speed)#
Set the speed of the aircraft.
- Parameters:
- speedfloat
Speed [kt]
- set_vs(vs)#
Set vertical speed.
- Parameters:
- vsfloat
Vertical speed [ft/min]
- set_alt(alt)#
Set altitude.
- Parameters:
- altfloat
Altitude [ft]
- set_direct(waypoint)#
Set direct to a waypoint.
- Parameters:
- waypointstr
ICAO code of the waypoint
- set_holding(holding_time, holding_fix, region)#
Set holding procedure.
- Parameters:
- holding_timefloat
How long should the aircraft hold [second]
- holding_fixfloat
ICAO code of the fix that the aircraft should hold
- regionfloat
ICAO code of the region that the aircraft should hold
- set_vectoring(vectoring_time, v_2, fix)#
Set vectoring procedure.
- Parameters:
- vectoring_timefloat
How long should the aircraft vector [second]
- v_2float
The target speed speed [kt]
- fixstr
ICAO code of the fix that the aircraft go next after vectoring
Resume own navigation to use autopilot instead of user commanded target.
- get_heading()#
Get heading of aircraft.
- Returns:
- Headingfloat
Heading [deg]
- get_cas()#
Get Calibrated air speed of aircraft.
- Returns:
- casfloat
Calibrated air speed [knots]
- get_mach()#
Get Mach number of aircraft.
- Returns:
- machfloat
Mach number [dimensionless]
- get_vs()#
Get vertical speed of aircraft.
- Returns:
- vsfloat
Vertical speed [ft/min]
- get_alt()#
Get altitude of aircraft.
- Returns:
- altfloat[]
Altitude [ft]
- get_long()#
Get longitude of aircraft.
- Returns:
- longfloat
Longitude [deg]
- get_lat()#
Get latitude of aircraft.
- Returns:
- latfloat
Latitude [deg]
- get_fuel_consumed()#
Get the total fuel consumed of aircraft.
- Returns:
- fuel_consumedfloat
Fuel consumed [kg]
- get_next_wp()#
Get next waypoint.
- Returns:
- waypointstr
ICAO code of the next waypoing
- get_wake()#
Get wake category of aircraft.
- Returns:
- Wake categorystr
The ICAO wake category of the aircraft.