:orphan: .. **************************************************************************** .. CUI//REL TO USA ONLY .. .. The Advanced Framework for Simulation, Integration, and Modeling (AFSIM) .. .. The use, dissemination or disclosure of data in this file is subject to .. limitation or restriction. See accompanying README and LICENSE for details. .. **************************************************************************** Autopilot +++++++++ .. note:: This page is disabled for vehicles with a cNO_CONTROL configuration. .. note:: This page is disabled if only a Guided Mover is being generated. Mover Creator along with Warlock give users the ability to setup and tune the control PIDs of the vehicle's piloting systems. There are five sections to the *Autopilot* page. * `PID Auto-Tuning Options`_ * `Genetic Algorithm Options`_ * `Pilots/Guidance`_ control setup/tuning * `Hardware Autopilot`_ control setup/tuning * `G-Load Limits`_ options * 3D rendering of the vehicle .. image:: images/autopilot_page.png PID Auto-Tuning Options ======================= The *PID Auto-Tuning Options* section of the Autopilot page allows users to define the minimum and maximum boundaries for Kp, Ki and Kd. It also provides the user the ability to set the command run time, error and overshoot weights. All of these user defined settings are copied into Warlock and used by the :doc:`P6DOF Tuner` and :doc:`SixDOF Tuner` plugins. The PIDs available to tune are: * Alpha\* * Vertical Speed * Pitch Angle * Pitch Rate * Flight Path Angle * Delta Pitch * Altitude * Beta\* * Yaw Rate * Yaw Heading * Roll Rate\* * Delta Roll * Bank Angle * Roll Heading * Forward Acceleration * Speed * Taxi Forward Acceleration\* * Taxi Speed\* * Taxi Heading\* * Taxi Yaw Rate\* \*Not available for PM6DOF vehicles. .. image:: images/pid_tuning_options.png Genetic Algorithm Options ========================= The user can set the values used by the Tuner plugins' genetic algorithm. The genetic algorithm is used to help find the optimal values for the PIDs. .. image:: images/genetic_algorithm_options.png Pilots/Guidance and Hardware Autopilot ====================================== Once the user is satisfied with his or her values setup in the *PID Auto-Tuning Options* and *Genetic Algorithm Options* sections, they need to run the actual Tuner to get a tuned pilot. The list of pilot/guidance types to be tuned appears to the left of the *Setup/Tune Controls* button. The available pilots/guidance list was defined by the user on the :doc:`Pilots/Controls page `. To proceed with tuning the PIDs the user presses the *Setup/Tune Controls* button found in the Pilots/Guidance and Hardware Autopilot sections. .. image:: images/pilots_guidance_hardware_autopilot.png Once the user presses the *Setup/Tune Controls* button Warlock will be launched and present the user with either the P6DOF Tuner of the SixDOF Tuner, depending on which vehicle type is selected. For helpful tips on tuning a vehicle, visit the "Best Practices" section in the :doc:`P6DOF Tuner` documentation. Mover Creator uses the P6DOF Tuner settings to configure tuning for both P6DOF and SixDOF vehicles. (Eventually, this will be replaced by the SixDOF Tuner settings as P6DOF is phased out of support.) The user can verify that his or her PID settings are being used in Warlock by selecting *Options -> Preferences* and selecting *P6DOF Tuner* in the preferences dialog. Once the user has tuned the PIDs, he or she needs to press the *Save And Exit* button in Warlock. This will save the values for the tuned PIDs of this vehicle. The autopilot configuration, along with the tuned PID values that were saved from Warlock can be found in the *autopilot_config.txt* script file located in the *\\resources\\data\\mover_creator\\AFSIM_Scripts\\\\p6dof_types\\\\\\controls\\* directory where is the name the user gave the vehicle, and is either *aircraft* or *weapons*. .. image:: images/warlock_tuner.png Pilots/Guidance --------------- The user can copy these tuned PID values to the *Hardware Autopilot* by pressing the *Copy Data to Autopilot (Below)* button in this section. This will copy the values from *autopilot_config.txt* to the *hw_autopilot_config.txt* file located in the directory mentioned above. Hardware Autopilot ------------------ The user can copy these tuned PID values to the other *Pilots/Guidance* by pressing the *Copy Data to Pilot (Above)* button in this section. This will copy the values from *hw_autopilot_config.txt* to the *autopilot_config.txt* file located in the directory mentioned above. G-Load Limits ============= .. note:: These settings may also be set in the :doc:`Pilots/Controls` page. .. image:: images/g_load_limits.png This section allows the user to specify the g-load limits. Once either the "Pilots/Guidance" or "Hardware Autopilot" button is pressed, a dialog will appear where the user can enter the desired values as shown below. .. image:: images/g_load_limits_dialogs.png Editing these values is equivalent to changing :command:`pitch_gload_min`, :command:`pitch_gload_max`, and :command:`yaw_gload_max`, respectively. Navigation From the Autopilot Page ================================== From this page the user can navigate to one of the following pages via the tabs or by clicking the *Next* or *Previous* buttons. * :doc:`Start/Setup` * :doc:`Pilots/Controls` * :doc:`Geometry` * :doc:`Aerodynamics` * :doc:`Performance` * :doc:`Flight Test`