traffic#

class airtrafficsim.core.traffic.Traffic(file_name, start_time, end_time, weather_mode, performance_mode)#

Initialize base traffic array to store aircraft state variables for one timestep.

Parameters:
file_nameString

Output file name

Nint

Total number of aircraft

Methods

add_aircraft(call_sign, aircraft_type, ...)

Add an aircraft to traffic array.

del_aircraft(index)

Delete an aircraft from traffic array.

update(global_time[, d_t])

Update aircraft state for each timestep given ATC/autopilot command.

n#

Aircraft count

index#

Index array to indicate whether there is an aircraft active in each index.

call_sign#

Callsign [string]

aircraft_type#

Aircraft type in ICAO format [string]

configuration#

Aircraft configuration [Configuration enum 1: Clean, 2: Take Off, 3: Approach, 4: Landing]

flight_phase#

Flight phase [Flight_phase enum] (BADA section 3.5)

lat#

Latitude [deg]

long#

Longitude [deg]

alt#

Altitude [ft] Geopotential altitude

trans_alt#

Transaition altitude [ft]

cruise_alt#

Cruise altitude [ft]

heading#

Heading [deg]

track_angle#

Track angle [deg]

bank_angle#

Bank angle [deg]

path_angle#

Path angle [deg]

cas#

Calibrated air speed [knot]

tas#

True air speed [knot]

gs_north#

Ground speed - North[knot]

gs_east#

Ground speed - East [knot]

mach#

Mach number [dimensionless]

accel#

Acceleration [m/s^2]

speed_mode#

Speed mode [Traffic.speed_mode enum 1: CAS, 2: MACH]

max_alt#

Maximum altitude [feet]

max_cas#

Maximum calibrated air speed [knot]

max_mach#

Maximum mach number [dimensionless]

vs#

Vertical speed [feet/min]

fpa#

Flight path angle [deg]

vertical_mode#

Vertical mode [Vertical mode enum 1: LEVEL, 2: CLIMB, 3: DESCENT]

mass#

Aircraft mass [kg]

empty_weight#

Empty weight [kg]

fuel_weight#

Initial fuel weight [kg]

payload_weight#

Payload weight [kg]

fuel_consumed#

Fuel consumped [kg]

perf#

Performance class

ap#

Autopilot class

weather#

Weather class

add_aircraft(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)#

Add an aircraft to traffic array.

Returns:
self.n-1: int

Index of the added aircraft

del_aircraft(index)#

Delete an aircraft from traffic array.

Parameters:
indexint

Index of an aircraft

update(global_time, d_t=1)#

Update aircraft state for each timestep given ATC/autopilot command.

Parameters:
d_t: float

delta time per timestep [s] TODO: need?