.. SPDX-FileCopyrightText: 2024 German Aerospace Center (DLR) .. .. SPDX-License-Identifier: CC-BY-4.0 Autoavoid ========== The :code:`pyCASX` packages comes with a basic autoavoid command. The command is indented only to extend the functionality of FlightGear's built-in autopilot by allowing to apply ACAS X advisories provided by the :code:`pyCASX` package. Preparation ----------- The autoavoid command is intended to work with a modified version of the [737-200](https://github.com/FGMEMBERS/737-200). Currently, the modding has to be performed manually, later versions will ship a custom airplane already pre-modded. Modding the 737-200 ^^^^^^^^^^^^^^^^^^^ In the root directory of the 737-200, open the file :code:`Systems/737-autoflight.xml` and replace two controllers. :code:`altitude-hold` """"""""""""""""""""" Replace the first stage of the :code:`altitude-hold` controller with the following code: .. code-block:: xml Altitude Hold (Altimeter) Stage #1 false autopilot/locks/altitude altitude-hold position/altitude-ft autopilot/settings/target-altitude-ft autopilot/internal/target-climb-rate-fps 0.05 0.0 -25.0 40.0 :code:`wing-leveler` """""""""""""""""""" Replace the :code:`wing-leveler` controller with the following code: .. code-block:: xml Wing Leveler (Turn Indicator) false autopilot/locks/heading wing-leveler orientation/roll-deg autopilot/settings/target-bank-angle-deg controls/flight/aileron 0.02 1.0 0.1 0.0 10.0 0.00001 -1.0 1.0 Usage ----- The autoavoid command is a simple command line tool, integrated into the :code:`pycasx acasx` command, that can be used to control the autopilot of the 737-200. It uses the advisories provided by the :code:`pyCASX` package to control the autopilot. The autoavoid can be started by running the following command: .. code-block:: bash pycasx acasx autoavoid.active=True autoavoid.mode=[hcas|vcas] The :code:`autoavoid.active` parameter is disabled by default to not interfere with the normal operation of the autopilot.