Uisng OpenAP performance model#

Apart from the default BADA 3.15 performance data, AirTrafficSim also support using the open-source OpenAP performance model. This allows users to run AirTrafficSim without the need to obtain the licensed BADA 3.15 model. The OpenApDemo class in airtrafficsim_demo/environment/OpenApDemo.py provides a sample to set up such an environment.

Note

The support for OpenAP is experimental and some AirTrafficSim features such as autopilot procedural speed are not yet supported and bugs may occur.

To use OpenAP, set performance_mode equals to “OpenAP” instead of “BADA”. The aircraft is needed similarly to DemoEnv but flight plan and airport information should not be added since they are yet to be supported. After adding the aircraft, set the speed of each aircraft using the set_speed() function to disable auto procedural speed.

airtrafficsim_data/environment/OpenApDemo.py#
 9class OpenApDemo(Environment):
10
11    def __init__(self):
12        # Initialize environment super class
13        super().__init__(file_name=Path(__file__).name.removesuffix('.py'),  # File name (do not change)
14                         start_time=datetime.fromisoformat(
15                             '2022-03-22T00:00:00+00:00'),
16                         end_time=1000,
17                         weather_mode="",
18                         performance_mode="OpenAP"
19                         )
20
21        # Add aircraft
22        self.aircraft_head = Aircraft(self.traffic, call_sign="HEAD", aircraft_type="A320", flight_phase=FlightPhase.CRUISE, configuration=Config.CLEAN,
23                                      lat=22.019213, long=113.539164, alt=20000.0, heading=175.0, cas=250.0, fuel_weight=10000.0, payload_weight=12000.0, cruise_alt=37000)
24        self.aircraft_fol = Aircraft(self.traffic, call_sign="FOLLOW", aircraft_type="A320", flight_phase=FlightPhase.CRUISE, configuration=Config.CLEAN,
25                                     lat=21.9, long=113.5, alt=20000.0, heading=175.0, cas=310.0, fuel_weight=10000.0, payload_weight=12000.0, cruise_alt=37000)
26        self.aircraft_head.set_speed(250.0) # To set the aircraft to follow given speed command instead of auto procedural
27        self.aircraft_fol.set_speed(310.0) # To set the aircraft to follow given speed command instead of auto procedural