IT-AUTOFLIGHT: Difference between revisions
No edit summary |
No edit summary |
||
(42 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
|started = March 2016 | |started = March 2016 | ||
|description = Advanced Autopilot System | |description = Advanced Autopilot System | ||
|status = | |status = V4.0.6 Stable | ||
|developers = {{usr| | |developers = {{usr|Octal450}} | ||
}} | }} | ||
[[File: | [[File:ITAF-Current-UI.png|thumb|300px|The latest IT-AUTOFLIGHT GUI.]] | ||
{{Autoflight Navigation}} | {{Autoflight Navigation}} | ||
IT-AUTOFLIGHT is a modular, light, and advanced Airliner Autoflight system for FlightGear. | IT-AUTOFLIGHT is a modular, light, and advanced Airliner Autoflight system for FlightGear. The purpose of IT-AUTOFLIGHT is to provide a system for other airliner developers to use as a stable base for their autopilots. Examples of custom IT-AUTOFLIGHT installations are shown off in the [[MD-11]] and [[A320-family]]. | ||
Download IT-AUTOFLIGHT | Download IT-AUTOFLIGHT V4.0.X from [https://www.github.com/Octal450/IT-AUTOFLIGHT.git here]! | ||
The changelog for IT-AUTOFLIGHT | The changelog for IT-AUTOFLIGHT V4.0.X can be viewed [https://github.com/Octal450/IT-AUTOFLIGHT/blob/master/CHANGELOG.txt here]! | ||
{{TOC limit|3}} | {{TOC limit|3}} | ||
== | == Information == | ||
The standard version of IT-AUTOFLIGHT, modeled after complex jet airliner autopilots. | The standard version of IT-AUTOFLIGHT, modeled after complex jet airliner autopilots. | ||
=== Version 1.0 === | === Version 1.0 === | ||
Initial release, very basic. | |||
=== Version 2.0 === | === Version 2.0 === | ||
First version designed for integration in other aircraft, improvements to logic. | |||
=== Version 3.0 === | === Version 3.0 === | ||
Major rewrite of most logic and controllers. New pitch modes like FLCH and basic autoland. This is the first version to be stable upon almost all aircraft due to optimized logic. | |||
=== Version 3.1 === | === Version 3.1 === | ||
Roll/Pitch Rate to drive aileron/elevator, autoland rollout Mode, and many improvements to stability, and operation. It also has new options which make it more modular, and easier to adapt. | |||
=== Version 3.2 === | === Version 3.2 === | ||
Far better and smoother control for almost everything, and many important fixes for various modes. No new features. | |||
== Development | === Version 4.0 === | ||
Complete rewrite of logic in more efficient nasal. This includes many bugfixes to the system. New features include integration with custom FMAs as well as adding more options to adjust autopilot behavior. | |||
== Development Status == | |||
Keep in mind, things may change even if they are marked Done. | Keep in mind, things may change even if they are marked Done. | ||
Line 58: | Line 61: | ||
* Autoland Land {{Done}} | * Autoland Land {{Done}} | ||
* Autoland Rollout {{Done}} | * Autoland Rollout {{Done}} | ||
* For more information, see the changelog [https://github.com/ | * For more information, see the changelog [https://github.com/Octal450/IT-AUTOFLIGHT/blob/master/CHANGELOG.txt here] | ||
== Installation Instructions == | == Installation Instructions == | ||
=== Installing === | === Installing === | ||
This guide will teach you how to install IT-AUTOFLIGHT to an aircraft | This guide will teach you how to install IT-AUTOFLIGHT to an aircraft. | ||
==== Before you Begin ==== | ==== Before you Begin ==== | ||
Download the latest version of IT-AUTOFLIGHT | Download the latest version of IT-AUTOFLIGHT V4.0.X from [https://www.github.com/Octal450/IT-AUTOFLIGHT.git here]. Extract the Archive with WinRAR, 7Zip, or similar. If you are using a custom instrumentation file, make sure it contains the <gps> item, as IT-AUTOFLIGHT uses it to get an accurate and stable V/S signal. You also need the property "<tt>/position/gear-agl-ft</tt>". This property is automatically created by YAsim, but for JSBsim you need to add a calculation for it on your own. See instructions below. | ||
==== | ==== Installation ==== | ||
* Copy the gui, Systems, and Nasal folders from the IT-AUTOFLIGHT folder to the aircraft's folder. Overwrite any conflicts. | * Copy the gui, Systems, and Nasal folders from the IT-AUTOFLIGHT folder to the aircraft's folder. Overwrite any conflicts. | ||
* You may need to remove old autopilot dialogs for the IT-AUTOFLIGHT dialog to appear. Look inside the Systems and gui/dialogs folders. | |||
* Open the -set file of the aircraft, and find the <systems> area inside <sim></sim>. | * Open the -set file of the aircraft, and find the <systems> area inside <sim></sim>. | ||
* Add the following inside <systems></systems> | * Add the following inside <systems></systems> | ||
Line 108: | Line 112: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
-------------------------------------------------------------------------------------------------- | |||
* Finally, add the following anywhere outside <sim></sim>: | * Finally, add the following anywhere outside <sim></sim>: | ||
* Copy and Paste from this file, start at line 6. | * Copy and Paste from this file, start at line 6. | ||
* [https://github.com/ | * [https://github.com/Octal450/IT-AUTOFLIGHT/blob/master/ITAF%20CONFIG.txt ITAF CONFIG.txt]. | ||
* This is the default IT-AUTOFLIGHT Configuration. We will be adjusting this later. | * This is the default IT-AUTOFLIGHT Configuration. We will be adjusting this later. | ||
-------------------------------------------------------------------------------------------------- | |||
==== Complete ==== | ==== Complete ==== | ||
You have finished installing IT-AUTOFLIGHT. However, I highly suggest to go over the Tuning and Configuration section below, to tune the PIDs to your aircraft, and set up the settings. If you want to connect IT-AUTOFLIGHT to a PFD or MCP, see | You have finished installing IT-AUTOFLIGHT. However, I highly suggest to go over the Tuning and Configuration section below, to tune the PIDs to your aircraft, and set up the settings. If you want to connect IT-AUTOFLIGHT to a PFD or MCP, see SDK. | ||
=== Tuning and Configuration === | === Tuning and Configuration === | ||
Below is listed each area of the IT-AUTOFLIGHT Config Module, and what it is used for. We will also discuss how to tune IT-AUTOFLIGHT efficiently. | Below is listed each area of the IT-AUTOFLIGHT Config Module, and what it is used for. We will also discuss how to tune IT-AUTOFLIGHT efficiently. | ||
You can view the Config Module [https://github.com/ | You can view the Config Module [https://github.com/Octal450/IT-AUTOFLIGHT/blob/master/ITAF%20CONFIG.txt here]. | ||
This area is for the tuning of the PID controllers used. These are not hard coded, so users can update IT-AUTOFLIGHT without needing to edit any files. You can also adjust these in the property browser, and they take affect immediately, without needing to reload anything. | This area is for the tuning of the PID controllers used. These are not hard coded, so users can update IT-AUTOFLIGHT without needing to edit any files. You can also adjust these in the property browser, and they take affect immediately, without needing to reload anything. | ||
Line 150: | Line 146: | ||
===== config/cmd ===== | ===== config/cmd ===== | ||
These adjust the parameters for the Command | These adjust the parameters for the Command Gains. | ||
* ''' | * '''roll''': Adjust the gain for Roll Command Controllers (HDG, LNAV, VOR/LOC). | ||
* '''alt-gain''': Adjust the gain for Altitude Controller. | |||
* '''alt-gain''': Adjust the gain for | |||
===== config/autoland ===== | ===== config/autoland ===== | ||
Line 167: | Line 162: | ||
==== settings ==== | ==== settings ==== | ||
* '''autoland-without-ap''': Allows LAND, FLARE, ALIGN, and ROLLOUT Modes to be armed, and become active even if AP1 and AP2 are off. | |||
* '''auto-bank-max-deg''': Adjust the maximum bank limit for the auto bank limit system. (15 - 30) | * '''auto-bank-max-deg''': Adjust the maximum bank limit for the auto bank limit system. (15 - 30) | ||
* '''autothrottle-max''': Maximum throttle limit for the autothrottle. ITAF will not exceed this limit. | |||
* '''autothrottle-min''': Minimum throttle limit for the autothrottle. ITAF will not go below this limit. | |||
* '''custom-fma''': When Enabled (1), custom functions will be called when modes changed for custom FMA logic. See SDK. | |||
* '''disable-final''': Enable (0) or Disable (1) the Roll and Pitch Final Controllers. IT-AUTOFLIGHT will compute target rates and degrees, but not control aircraft. | * '''disable-final''': Enable (0) or Disable (1) the Roll and Pitch Final Controllers. IT-AUTOFLIGHT will compute target rates and degrees, but not control aircraft. | ||
* '''hdg-hld-separate''': When Enabled (1), the HDG HLD and HDG SEL modes are separate, and the HDG HLD will capture current heading, instead of syncing the input. | |||
* '''land-enable''': Disable (0) or Enable (1) the Autoland System. | * '''land-enable''': Disable (0) or Enable (1) the Autoland System. | ||
* '''land-flap''': This defines the landing flap for the aircraft. If the flaps are set to less than this, Autoland will not work. (0 - 1) | * '''land-flap''': This defines the landing flap for the aircraft. If the flaps are set to less than this, Autoland will not work. (0 - 1) | ||
* '''lat-agl-ft''': Define the altitude when the roll mode changes from T/O to LNAV, if armed. | |||
* '''reduc-agl-ft''': Define the altitude when the pitch mode changes from T/O CLB to SPD CLB, and when the thrust should be reduced to CLB thrust. | |||
* '''retard-enable''': Disable (0) or Enable (1) Autothrottle RETARD. | |||
* '''retard-ft''': Adjust the altitude for when the Autothrottle goes into RETARD mode. | * '''retard-ft''': Adjust the altitude for when the Autothrottle goes into RETARD mode. | ||
* '''togaspd''': Define the V2+15 Speed for T/O CLB SPD by Pitch. | * '''togaspd''': Define the V2+15 Speed for T/O CLB SPD by Pitch. | ||
=== How to Tune === | === How to Tune === | ||
Line 203: | Line 202: | ||
This section will discuss the inputs and outputs of IT-AUTOFLIGHT. These can be used for PFD/MCP interfacing, or building a custom autothrottle, or any other need for communicating with IT-AUTOFLIGHT. I will also list what types of inputs are allowed. (BOOL, INT, etc.) | This section will discuss the inputs and outputs of IT-AUTOFLIGHT. These can be used for PFD/MCP interfacing, or building a custom autothrottle, or any other need for communicating with IT-AUTOFLIGHT. I will also list what types of inputs are allowed. (BOOL, INT, etc.) | ||
==== Inputs: /it-autoflight/input ==== | ==== Inputs: /it-autoflight/input ==== | ||
* ''' | * '''alt''': Adjusts the Target Altitude in Feet (0 - 50000). INT (Note: IT-AUTOFLIGHT can fly higher than 50,000 feet, but it is not recommended.) | ||
* '''ap1''': Switches the Autopilot 1 Off (0) and On (1). BOOL | * '''ap1''': Switches the Autopilot 1 Off (0) and On (1). BOOL | ||
* '''ap2''': Switches the Autopilot 2 Off (0) and On (1). BOOL | * '''ap2''': Switches the Autopilot 2 Off (0) and On (1). BOOL | ||
* '''athr''': Switches the Autothrottle Off (0) and On (1). BOOL | * '''athr''': Switches the Autothrottle Off (0) and On (1). BOOL | ||
* '''bank-limit-sw''': Adjust the bank limit mode to AUTO (0), 5 Degrees (1), 10 Degrees (2), 15 Degrees (3), 20 Degrees (4), 25 Degrees (5), 30 Degrees (6). INT | |||
* '''fd1''': Switches the Flight Director 1 Off (0) and On (1). BOOL | * '''fd1''': Switches the Flight Director 1 Off (0) and On (1). BOOL | ||
* '''fd2''': Switches the Flight Director 2 Off (0) and On (1). BOOL | * '''fd2''': Switches the Flight Director 2 Off (0) and On (1). BOOL | ||
* ''' | * '''fpa''': Adjusts the Target Flight Path Angle in Degrees (-9.9 - 9.9). DOUBLE (Note: IT-AUTOFLIGHT can use higher/lower FPA, but it is not recommended.) | ||
* '''fpa-abs''': Automatically set by IT-AUTOFLIGHT. Absolute value of the '''fpa''' input, used for fixing problems when animating cockpit controls. DOUBLE | |||
* ''' | * '''hdg''': Adjusts the Target Heading in Degrees (1 - 360, or 0 - 359). INT | ||
* ''' | |||
* '''lat''': Changes the roll mode to HDG SEL (0), LNAV (1), VOR/LOC (2), or HDG HLD (3). INT (Note: Mode 4 and Mode 5 exist, but you should not set this value to 4, or 5. Doing so may cause unexpected functionality.) | * '''lat''': Changes the roll mode to HDG SEL (0), LNAV (1), VOR/LOC (2), or HDG HLD (3). INT (Note: Mode 4 and Mode 5 exist, but you should not set this value to 4, or 5. Doing so may cause unexpected functionality.) | ||
* ''' | * '''kts''': Adjusts the Target Airspeed in Knots (100 - 350). INT (Note: IT-AUTOFLIGHT can use higher/lower Airspeed, but it is not recommended.) | ||
* ''' | * '''kts-mach''': Switches between Speed (0) and Mach mode (1). BOOL | ||
* ''' | * '''mach''': Adjusts the Target Mach (0.5 - 0.9). DOUBLE (Note: IT-AUTOFLIGHT can use higher/lower Mach, but it is not recommended.) | ||
* '''mach-x1000''': Automatically set by IT-AUTOFLIGHT. Value of '''mach''' input converted to an integer, used for fixing problems when animating cockpit controls. INT | |||
* '''toga''': Engage Takeoff or Go Around Mode (1). BOOL (Note: Do not change this value back to (0). IT-AUTOFLIGHT will do this automatically). | |||
* '''trk''': Switches between Heading (0) and Track (1). BOOL | * '''trk''': Switches between Heading (0) and Track (1). BOOL | ||
* '''true-course''': Switches between Magentic Heading (0) and True Heading (1). BOOL | * '''true-course''': Switches between Magentic Heading (0) and True Heading (1). BOOL | ||
* ''' | * '''use-nav2-radio''': Switches VOR/LOC and ILS functions between NAV1 (0) and NAV2 (1). BOOL | ||
* '''vert''': Changes the pitch mode to ALT HLD (0), V/S (1), ILS (2), FLCH (4), FPA (5). INT (Note: Mode 3, Mode 6, and Mode 7 exist, but you should not set this value to 3, 6, or 7. Doing so may cause unexpected functionality.) | |||
* '''vs''': Adjusts the Target Vertical Speed in Feet Per Minute (-6000 -6000). INT (Note: IT-AUTOFLIGHT can use higher/lower FPM, but it is not recommended.) | |||
* '''vs-abs''': Automatically set by IT-AUTOFLIGHT. Absolute value of the '''vs''' input, used for fixing problems when animating cockpit controls. INT | |||
==== Outputs: /it-autoflight/output ==== | ==== Outputs: /it-autoflight/output ==== | ||
Line 227: | Line 229: | ||
* '''ap1''': Autopilot 1: Off (0), or On (1) | * '''ap1''': Autopilot 1: Off (0), or On (1) | ||
* '''ap2''': Autopilot 2: Off (0), or On (1) | * '''ap2''': Autopilot 2: Off (0), or On (1) | ||
* '''appr-armed''': ILS: Disarmed (0), or Armed (1) | |||
* '''athr''': Autothrottle: Off (0), or On (1) | * '''athr''': Autothrottle: Off (0), or On (1) | ||
* '''fd1''': Flight Director 1: Off (0), or On (1) | * '''fd1''': Flight Director 1: Off (0), or On (1) | ||
* '''fd2''': Flight Director 2: Off (0), or On (1) | * '''fd2''': Flight Director 2: Off (0), or On (1) | ||
* '''hdg-in-hld''': For Boeing style FMAs, usage optional. When (1), heading is captured and in HLD mode. When (0), heading is in SEL mode and acquiring. | |||
* '''lat''': Active Roll Mode: HDG HLD/SEL (0), LNAV (1), VOR/LOC Active (2), ALIGN/ROLLOUT (4), or T/O LVL (5) (Note: Mode 3 is not used.) | |||
* '''lnav-armed''': LNAV: Disarmed (0), or Armed (1) | |||
* '''loc-armed''': VOR/LOC: Disarmed (0), or Armed (1) | * '''loc-armed''': VOR/LOC: Disarmed (0), or Armed (1) | ||
* ''' | * '''vert''': Active Pitch Mode: ALT HLD/CAP (0), V/S (1), G/S Active (2), FLCH (4), FPA (5), FLARE/ROLLOUT (6), T/O or G/A CLB (7) (Note: Mode 3 is not used.) | ||
* '''thr-mode''': Thrust System Mode: THRUST (0), PITCH Idle/RETARD (1), or PITCH Thrust Limit (2) (Note: PITCH Idle/RETARD commands the Autothrottle to Idle limit thrust, and PITCH Thrust Limit commands the Autothrottle to use set the thrust to the active thrust limit, like CLB, MCT, TOGA, etc.) | * '''thr-mode''': Thrust System Mode: THRUST (0), PITCH Idle/RETARD (1), or PITCH Thrust Limit (2) (Note: PITCH Idle/RETARD commands the Autothrottle to Idle limit thrust, and PITCH Thrust Limit commands the Autothrottle to use set the thrust to the active thrust limit, like CLB, MCT, TOGA, etc.) | ||
==== Text Outputs: /it-autoflight/mode ==== | ==== Text Outputs: /it-autoflight/mode ==== | ||
* '''arm''': Armed Mode: [LNV - LOC] or VOR/LOC and G/S Armed: [ILS] | * '''arm''': Armed Mode: [LNV - LOC] or VOR/LOC and G/S Armed: [ILS] | ||
* '''lat''': Active Roll Mode: [HDG - LNAV - LOC - ALGN - RLOU - T/O] | * '''lat''': Active Roll Mode: [HDG - LNAV - LOC - ALGN - RLOU - T/O] | ||
* '''vert''': Active Pitch Mode: [ALT HLD - V/S - G/S - ALT CAP - SPD DES - SPD CLB - FPA | * '''vert''': Active Pitch Mode: [ALT HLD - V/S - G/S - ALT CAP - SPD DES - SPD CLB - FPA - FLARE - ROLLOUT - T/O CLB - G/A CLB] | ||
* '''thr''': Thrust System Mode: [THRUST - PITCH - RETARD] | |||
-------------------------------------------------------------------------------------------------- | |||
==== Custom FMA ==== | |||
ITAF supports calling custom functions for a custom FMA. That way you don't need to use listeners or such that worsens performance. | |||
You need to enable the '''custom-fma''' setting in the config module. Then, add the Custom FMA nasal file in the itaf space: | |||
* ITAF includes an optional [https://github.com/Octal450/IT-AUTOFLIGHT/blob/master/Custom%20FMA/custom-fma.nas custom-fma.nas] file as an example. It is in the Custom FMA folder, copy it to the Nasal folder in your aircraft. | |||
* Find the <nasal> area, which is outside <sim></sim>. | |||
* Find where you added <itaf></itaf> to <nasal></nasal> | |||
* Add the custom-fma.nas as shown: | |||
<syntaxhighlight lang="xml"> | |||
<itaf> | |||
<file>Nasal/it-autoflight.nas</file> | |||
<file>Nasal/custom-fma.nas</file> | |||
</itaf> | |||
</syntaxhighlight> | |||
The functions called are: | |||
* '''updateFma.lat()''': Called when the lateral mode changes | |||
* '''updateFma.vert()''': Called when the vertical mode changes | |||
* '''updateFma.arm()''': Called when LNAV, LOC, and G/S are armed/disarmed | |||
== Related content == | |||
=== Forum topic === | |||
* {{forum link|title=IT-AUTOFLIGHT|t=35474}} | |||
[[Category:Autoflight]] | [[Category:Autoflight]] |
Revision as of 17:42, 17 October 2020
Started in | March 2016 |
---|---|
Description | Advanced Autopilot System |
Contributor(s) | Octal450 |
Status | V4.0.6 Stable |
Autoflight |
---|
Autopilot |
Route manager |
Specific autopilots |
Miscellaneous |
IT-AUTOFLIGHT is a modular, light, and advanced Airliner Autoflight system for FlightGear. The purpose of IT-AUTOFLIGHT is to provide a system for other airliner developers to use as a stable base for their autopilots. Examples of custom IT-AUTOFLIGHT installations are shown off in the MD-11 and A320-family.
Download IT-AUTOFLIGHT V4.0.X from here!
The changelog for IT-AUTOFLIGHT V4.0.X can be viewed here!
Information
The standard version of IT-AUTOFLIGHT, modeled after complex jet airliner autopilots.
Version 1.0
Initial release, very basic.
Version 2.0
First version designed for integration in other aircraft, improvements to logic.
Version 3.0
Major rewrite of most logic and controllers. New pitch modes like FLCH and basic autoland. This is the first version to be stable upon almost all aircraft due to optimized logic.
Version 3.1
Roll/Pitch Rate to drive aileron/elevator, autoland rollout Mode, and many improvements to stability, and operation. It also has new options which make it more modular, and easier to adapt.
Version 3.2
Far better and smoother control for almost everything, and many important fixes for various modes. No new features.
Version 4.0
Complete rewrite of logic in more efficient nasal. This includes many bugfixes to the system. New features include integration with custom FMAs as well as adding more options to adjust autopilot behavior.
Development Status
Keep in mind, things may change even if they are marked Done.
- Magnetic Heading Hold/Select Done
- True Heading Hold/Select Done
- LNAV Done
- VOR/LOC Done
- Altitude Hold/Capture Done
- Vertical Speed Hold Done
- IAS/Mach with Pitch (FLCH) Done
- G/S Hold Done
- IAS/Mach with Throttle Done
- Climb Thrust/Idle Thrust Done
- A/T Retard Done
- Dual APs Done
- Flight Director Done
- Autotrim System Done
- Takeoff Go Around (TOGA) Mode Done
- Flight Path Angle Hold Done
- Autoland Land Done
- Autoland Rollout Done
- For more information, see the changelog here
Installation Instructions
Installing
This guide will teach you how to install IT-AUTOFLIGHT to an aircraft.
Before you Begin
Download the latest version of IT-AUTOFLIGHT V4.0.X from here. Extract the Archive with WinRAR, 7Zip, or similar. If you are using a custom instrumentation file, make sure it contains the <gps> item, as IT-AUTOFLIGHT uses it to get an accurate and stable V/S signal. You also need the property "/position/gear-agl-ft". This property is automatically created by YAsim, but for JSBsim you need to add a calculation for it on your own. See instructions below.
Installation
- Copy the gui, Systems, and Nasal folders from the IT-AUTOFLIGHT folder to the aircraft's folder. Overwrite any conflicts.
- You may need to remove old autopilot dialogs for the IT-AUTOFLIGHT dialog to appear. Look inside the Systems and gui/dialogs folders.
- Open the -set file of the aircraft, and find the <systems> area inside <sim></sim>.
- Add the following inside <systems></systems>
<autopilot>
<name>IT-AUTOFLIGHT</name>
<path>Systems/it-autoflight.xml</path>
</autopilot>
If you wish to use the IT-AUTOFLIGHT Default Autothrottle, add the following inside <systems></systems>:
<autopilot>
<name>IT-AUTOTHRUST</name>
<path>Systems/it-autothrust.xml</path>
</autopilot>
- If you do not add this, the A/T button in the IT-AUTOFLIGHT GUI Dialog will do nothing, and in PITCH mode, the pilot must adjust the throttles accordingly. You do NOT need to add this if your aircraft uses a customized autothrottle, as long as that autothrottle is compatible with IT-AUTOFLIGHT. See Interfacing section below for more information.
If you using a JSBsim aircraft :
- Copy the Systems folder from inside the JSBsim Only folder in the IT-AUTOFLIGHT folder to the aircraft's folder. Overwrite any conflicts.
- Then, add the following inside <systems></systems>:
<autopilot>
<name>Gear AGL FT</name>
<path>Systems/gear-agl-ft.xml</path>
</autopilot>
- Note: You may need to adjust the value inside the gear-agl-ft.xml to match your aircraft. You can find the value by looking at /position/altitude-agl-ft property.
Now to add the IT-AUTOFLIGHT controller:
- Find the <nasal> area, which is outside <sim></sim>.
- Add the following inside <nasal></nasal>:
<itaf>
<file>Nasal/it-autoflight.nas</file>
</itaf>
- Finally, add the following anywhere outside <sim></sim>:
- Copy and Paste from this file, start at line 6.
- ITAF CONFIG.txt.
- This is the default IT-AUTOFLIGHT Configuration. We will be adjusting this later.
Complete
You have finished installing IT-AUTOFLIGHT. However, I highly suggest to go over the Tuning and Configuration section below, to tune the PIDs to your aircraft, and set up the settings. If you want to connect IT-AUTOFLIGHT to a PFD or MCP, see SDK.
Tuning and Configuration
Below is listed each area of the IT-AUTOFLIGHT Config Module, and what it is used for. We will also discuss how to tune IT-AUTOFLIGHT efficiently.
You can view the Config Module here.
This area is for the tuning of the PID controllers used. These are not hard coded, so users can update IT-AUTOFLIGHT without needing to edit any files. You can also adjust these in the property browser, and they take affect immediately, without needing to reload anything.
config/roll
These adjust the parameters for the Roll Rate PID Controller.
- kp-low: Adjust the Kp at Approach Speed/Config
- kp-high: Adjust the Kp at Max Indicated Airspeed (Tune at low altitude for best results)
- ti: Adjust the Ti.
- td: Adjust the Td.
config/pitch
These adjust the parameters for the Pitch Rate PID Controller. You cannot adjust the Automatic Elevator Trim Controller at this time.
- kp-low: Adjust the Kp at Approach Speed/Config
- kp-high: Adjust the Kp at Max Indicated Airspeed (Tune at low altitude for best results)
- ti: Adjust the Ti.
- td: Adjust the Td.
config/cmd
These adjust the parameters for the Command Gains.
- roll: Adjust the gain for Roll Command Controllers (HDG, LNAV, VOR/LOC).
- alt-gain: Adjust the gain for Altitude Controller.
config/autoland
These adjust the parameters for the PIDs used for Autoland. Tune the Roll, Pitch, and CMD first.
- pitch-kp: Adjust the Kp for the V/S PID Controller in LAND/FLARE.
- yaw-kp: Adjust the Kp for the Rudder VOR/LOC PID Controller.
config/rollout
These adjust the parameters for the PIDs used for Autoland Rollout. Tune Roll, Pitch, CMD, and Autoland first.
- roll-kp: Adjust the amount of aileron used after touchdown for keeping aircraft wings level.
- pitch-defl: Adjust the amount of downward elevator deflection after touchdown.
- yaw-kp: Adjust the Kp for the Rudder/Nose Wheel VOR/LOC PID Controller.
settings
- autoland-without-ap: Allows LAND, FLARE, ALIGN, and ROLLOUT Modes to be armed, and become active even if AP1 and AP2 are off.
- auto-bank-max-deg: Adjust the maximum bank limit for the auto bank limit system. (15 - 30)
- autothrottle-max: Maximum throttle limit for the autothrottle. ITAF will not exceed this limit.
- autothrottle-min: Minimum throttle limit for the autothrottle. ITAF will not go below this limit.
- custom-fma: When Enabled (1), custom functions will be called when modes changed for custom FMA logic. See SDK.
- disable-final: Enable (0) or Disable (1) the Roll and Pitch Final Controllers. IT-AUTOFLIGHT will compute target rates and degrees, but not control aircraft.
- hdg-hld-separate: When Enabled (1), the HDG HLD and HDG SEL modes are separate, and the HDG HLD will capture current heading, instead of syncing the input.
- land-enable: Disable (0) or Enable (1) the Autoland System.
- land-flap: This defines the landing flap for the aircraft. If the flaps are set to less than this, Autoland will not work. (0 - 1)
- lat-agl-ft: Define the altitude when the roll mode changes from T/O to LNAV, if armed.
- reduc-agl-ft: Define the altitude when the pitch mode changes from T/O CLB to SPD CLB, and when the thrust should be reduced to CLB thrust.
- retard-enable: Disable (0) or Enable (1) Autothrottle RETARD.
- retard-ft: Adjust the altitude for when the Autothrottle goes into RETARD mode.
- togaspd: Define the V2+15 Speed for T/O CLB SPD by Pitch.
How to Tune
So, now that IT-AUTOFLIGHT is installed, how do you tune it to the aircraft? IT-AUTOFLIGHT uses a config module, so you can drop in update to the system, with minor changes required. This also means you can tune IT-AUTOFLIGHT while FGFS is running, no need to reload anything! So lets get started!
- First, you need to adjust the area of the config module "settings". Once this is done, start FGFS.
- Takeoff and climb above 2000ft manually. Once above 2000ft, pause the sim (p)
- I highly recommend following this tuning guide in order, as IT-AUTOFLIGHT uses cascading controllers, tuning out of order may cause system instabilities.
Roll and Pitch
- Open the Property Browser (/), navigate to "/it-autoflight/config/"
- Set "tuning-mode" to 1.
- Now engage AP1 or AP2.
- Now you can adjust "/it-autoflight/internal/roll-rate" and "/it-autoflight/internal/pitch-rate".
- Navigate to "/it-autoflight/config" and tune roll, and pitch, using the "roll rate" and "pitch rate" properties to test the configuration. It should be able to handle pitch rate changes from 1 degps, to 3degps, and roll rate changes by 2 degps, and 5 degps. Once roll rate and pitch rate are stable, move on. (Adjust Kp values by -0.01/0.01, or -0.001/0.001, Do not adjust Ti and Td unless you know what they do.
CMD and Autoland
Important Note: Most of the time, CMD tuning is not required to be changed. They should only need changing if the FDM or aircraft is bizarre. Before you tweak the values, try to tune your Roll and Pitch Rate values better.
- Once those are all working, tune Autoland. Easy way to test: KNUQ RW32R, takeoff runway hdg, climb 2000ft. ILS: 109.55. ARM ILS once above 250ft. Aircraft should intercept ILS.
- The "autoland/pitch-kp" is for the LAND/FLARE modes. Do not change it unless needed. Lastly, "autoland/rudder-kp" is for the Rudder LOC track.
Complete
The tuning is now complete. Remember to check the CHANGELOG.txt after each IT-AUTOFLIGHT Update, to make sure, nothing needs to be retuned.
SDK
This section will discuss the inputs and outputs of IT-AUTOFLIGHT. These can be used for PFD/MCP interfacing, or building a custom autothrottle, or any other need for communicating with IT-AUTOFLIGHT. I will also list what types of inputs are allowed. (BOOL, INT, etc.)
Inputs: /it-autoflight/input
- alt: Adjusts the Target Altitude in Feet (0 - 50000). INT (Note: IT-AUTOFLIGHT can fly higher than 50,000 feet, but it is not recommended.)
- ap1: Switches the Autopilot 1 Off (0) and On (1). BOOL
- ap2: Switches the Autopilot 2 Off (0) and On (1). BOOL
- athr: Switches the Autothrottle Off (0) and On (1). BOOL
- bank-limit-sw: Adjust the bank limit mode to AUTO (0), 5 Degrees (1), 10 Degrees (2), 15 Degrees (3), 20 Degrees (4), 25 Degrees (5), 30 Degrees (6). INT
- fd1: Switches the Flight Director 1 Off (0) and On (1). BOOL
- fd2: Switches the Flight Director 2 Off (0) and On (1). BOOL
- fpa: Adjusts the Target Flight Path Angle in Degrees (-9.9 - 9.9). DOUBLE (Note: IT-AUTOFLIGHT can use higher/lower FPA, but it is not recommended.)
- fpa-abs: Automatically set by IT-AUTOFLIGHT. Absolute value of the fpa input, used for fixing problems when animating cockpit controls. DOUBLE
- hdg: Adjusts the Target Heading in Degrees (1 - 360, or 0 - 359). INT
- lat: Changes the roll mode to HDG SEL (0), LNAV (1), VOR/LOC (2), or HDG HLD (3). INT (Note: Mode 4 and Mode 5 exist, but you should not set this value to 4, or 5. Doing so may cause unexpected functionality.)
- kts: Adjusts the Target Airspeed in Knots (100 - 350). INT (Note: IT-AUTOFLIGHT can use higher/lower Airspeed, but it is not recommended.)
- kts-mach: Switches between Speed (0) and Mach mode (1). BOOL
- mach: Adjusts the Target Mach (0.5 - 0.9). DOUBLE (Note: IT-AUTOFLIGHT can use higher/lower Mach, but it is not recommended.)
- mach-x1000: Automatically set by IT-AUTOFLIGHT. Value of mach input converted to an integer, used for fixing problems when animating cockpit controls. INT
- toga: Engage Takeoff or Go Around Mode (1). BOOL (Note: Do not change this value back to (0). IT-AUTOFLIGHT will do this automatically).
- trk: Switches between Heading (0) and Track (1). BOOL
- true-course: Switches between Magentic Heading (0) and True Heading (1). BOOL
- use-nav2-radio: Switches VOR/LOC and ILS functions between NAV1 (0) and NAV2 (1). BOOL
- vert: Changes the pitch mode to ALT HLD (0), V/S (1), ILS (2), FLCH (4), FPA (5). INT (Note: Mode 3, Mode 6, and Mode 7 exist, but you should not set this value to 3, 6, or 7. Doing so may cause unexpected functionality.)
- vs: Adjusts the Target Vertical Speed in Feet Per Minute (-6000 -6000). INT (Note: IT-AUTOFLIGHT can use higher/lower FPM, but it is not recommended.)
- vs-abs: Automatically set by IT-AUTOFLIGHT. Absolute value of the vs input, used for fixing problems when animating cockpit controls. INT
Outputs: /it-autoflight/output
Note: DO NOT set ANY of these values!!! This WILL cause a malfunction! Only read from them. These values are the output of the logic controller, if a value you need is not here, then it does not go through the logic controller.
- ap1: Autopilot 1: Off (0), or On (1)
- ap2: Autopilot 2: Off (0), or On (1)
- appr-armed: ILS: Disarmed (0), or Armed (1)
- athr: Autothrottle: Off (0), or On (1)
- fd1: Flight Director 1: Off (0), or On (1)
- fd2: Flight Director 2: Off (0), or On (1)
- hdg-in-hld: For Boeing style FMAs, usage optional. When (1), heading is captured and in HLD mode. When (0), heading is in SEL mode and acquiring.
- lat: Active Roll Mode: HDG HLD/SEL (0), LNAV (1), VOR/LOC Active (2), ALIGN/ROLLOUT (4), or T/O LVL (5) (Note: Mode 3 is not used.)
- lnav-armed: LNAV: Disarmed (0), or Armed (1)
- loc-armed: VOR/LOC: Disarmed (0), or Armed (1)
- vert: Active Pitch Mode: ALT HLD/CAP (0), V/S (1), G/S Active (2), FLCH (4), FPA (5), FLARE/ROLLOUT (6), T/O or G/A CLB (7) (Note: Mode 3 is not used.)
- thr-mode: Thrust System Mode: THRUST (0), PITCH Idle/RETARD (1), or PITCH Thrust Limit (2) (Note: PITCH Idle/RETARD commands the Autothrottle to Idle limit thrust, and PITCH Thrust Limit commands the Autothrottle to use set the thrust to the active thrust limit, like CLB, MCT, TOGA, etc.)
Text Outputs: /it-autoflight/mode
- arm: Armed Mode: [LNV - LOC] or VOR/LOC and G/S Armed: [ILS]
- lat: Active Roll Mode: [HDG - LNAV - LOC - ALGN - RLOU - T/O]
- vert: Active Pitch Mode: [ALT HLD - V/S - G/S - ALT CAP - SPD DES - SPD CLB - FPA - FLARE - ROLLOUT - T/O CLB - G/A CLB]
- thr: Thrust System Mode: [THRUST - PITCH - RETARD]
Custom FMA
ITAF supports calling custom functions for a custom FMA. That way you don't need to use listeners or such that worsens performance.
You need to enable the custom-fma setting in the config module. Then, add the Custom FMA nasal file in the itaf space:
- ITAF includes an optional custom-fma.nas file as an example. It is in the Custom FMA folder, copy it to the Nasal folder in your aircraft.
- Find the <nasal> area, which is outside <sim></sim>.
- Find where you added <itaf></itaf> to <nasal></nasal>
- Add the custom-fma.nas as shown:
<itaf>
<file>Nasal/it-autoflight.nas</file>
<file>Nasal/custom-fma.nas</file>
</itaf>
The functions called are:
- updateFma.lat(): Called when the lateral mode changes
- updateFma.vert(): Called when the vertical mode changes
- updateFma.arm(): Called when LNAV, LOC, and G/S are armed/disarmed