IT-AUTOFLIGHT: Difference between revisions

2,424 bytes added ,  17 October 2020
no edit summary
No edit summary
No edit summary
(22 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      = V4.0.3 Stable
|status      = V4.0.6 Stable
|developers  = {{usr|Octal450}}
|developers  = {{usr|Octal450}}
}}
}}


[[File:ITAF310B.png|thumb|300px|The latest IT-AUTOFLIGHT GUI.]]
[[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 V4.0.X from [https://www.github.com/Octal450/IT-AUTOFLIGHT.git here]!
Download IT-AUTOFLIGHT V4.0.X from [https://www.github.com/Octal450/IT-AUTOFLIGHT.git here]!
Line 23: Line 23:


=== Version 1.0 ===
=== Version 1.0 ===
Initial release on MD-88/90 and A340.
Initial release, very basic.


=== Version 2.0 ===
=== Version 2.0 ===
Line 38: Line 38:


=== Version 4.0 ===
=== Version 4.0 ===
Complete rewrite of logic in more efficient nasal. This includes many bugfixes to the system. No new features.
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 ==
== 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 112: Line 112:
</syntaxhighlight>
</syntaxhighlight>


==================================================================================================
--------------------------------------------------------------------------------------------------


* Finally, add the following anywhere outside <sim></sim>:
* Finally, add the following anywhere outside <sim></sim>:
Line 119: Line 119:
* 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 ====
Line 147: Line 147:
===== config/cmd =====
===== config/cmd =====
These adjust the parameters for the Command Gains.
These adjust the parameters for the Command Gains.
* '''hdg''': Adjust the gain for HDG/LNAV Controller.
* '''roll''': Adjust the gain for Roll Command Controllers (HDG, LNAV, VOR/LOC).  
* '''vorloc''': Adjust the gain for the VORLOC Controller.
* '''alt-gain''': Adjust the gain for Altitude Controller.
* '''alt-gain''': Adjust the gain for Altitude Controller.


Line 163: 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.
* '''retard-enable''': Disable (0) or Enable (1) Autothrottle RETARD.
* '''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.
* '''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.
* '''autoland-without-ap''': Allows LAND, FLARE, ALIGN, and ROLLOUT Modes to be armed, and become active even if AP1 and AP2 are off.


=== How to Tune ===
=== How to Tune ===
Line 199: 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 ====
* '''kts-mach''': Switches between Speed (0) and Mach mode (1). BOOL
* '''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
* '''spd-kts''': Adjusts the Target Airspeed in Knots (100 - 400). INT (Note: IT-AUTOFLIGHT can use higher/lower Airspeed, but it is not recommended.)
* '''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.)
* '''spd-mach''': Adjusts the Target Mach (0.4 - 0.99). DOUBLE (Note: IT-AUTOFLIGHT can use higher/lower Mach, 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). DOUBLE
* '''hdg''': Adjusts the Target Heading in Degrees (1 - 360, or 0 - 359). INT
* '''alt''': Adjusts the Target Altitude in Feet (0 - 60000). INT (Note: IT-AUTOFLIGHT can fly higher than 60,000 feet, but it is not recommended.)
* '''vs''': Adjusts the Target Vertical Speed in Feet Per Minute (-6000 - 8000). INT(Note: IT-AUTOFLIGHT can use higher/lower FPM, but it is not recommended.)
* '''fpa''': Adjusts the Target Flight Path Angle in Degrees (-20.9 - 20.9). DOUBLE (Note: IT-AUTOFLIGHT can use higher/lower FPA, but it is not recommended.)
* '''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.)
* '''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.)
* '''kts''': Adjusts the Target Airspeed in Knots (100 - 350). INT (Note: IT-AUTOFLIGHT can use higher/lower Airspeed, but it is not recommended.)
* '''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
* '''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
* '''toga''': Engage Takeoff or Go Around Mode (1). BOOL (Note: Do not change this value back to (0). The IT-AUTOFLIGHT Logic will do this automatically when necessary.
* '''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 222: 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.
* '''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)
* '''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)
* '''appr-armed''': ILS: 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.)
* '''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.)
* '''vert''': Active Pitch Mode: ALT HLD/CAP (0), V/S (1), G/S Active (2), FLCH (4), FPA (5), LAND 3/FLARE/ROLLOUT (6), T/O or G/A CLB (7) (Note: Mode 3 is not used.)


==== Text Outputs: /it-autoflight/mode ====
==== Text Outputs: /it-autoflight/mode ====
* '''thr''': Thrust System Mode: [THRUST - PITCH - RETARD]
* '''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 - LAND - FLARE - ROLLOUT - T/O CLB - G/A CLB]
* '''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 ==
== Related content ==
1,417

edits