Rise of Flight - Plane AI Manual v2.14 The file system . The configuration files are located in the "data \ LuaScripts \ AI \" folder. The files "CPlaneAI.txt" and "CAeroplane.txt" contain general AI settings. Other files contain private settings for a particular type of aircraft. The file name in this case corresponds to the aircraft class name. The extension for all files is "txt". Used control automata . Switch with hysteresis. Switches the preset state of the controlled object (aircraft), depending on the value of the input signal. The machine is described by the values ??MINSIGNAL and MAXSIGNAL. If the value of the input signal is less than MINSIGNAL then the machine turns on the MINSTATE state. If the value of the input signal is greater than MAXSIGNAL then the machine turns on the MAXSTATE state. The difference MAXSIGNAL - MINSIGNAL defines the state hysteresis. Linear signal converter . Converts the input signal IN to the control signal OUT using the linear interpolation formula. Interpolation is defined by four parameters: INmin - the minimum value of the input signal OUTmin - minimum value of the control signal INmax - the maximum value of the input signal OUTmax - maximum value of the control signal The interpolation coefficient is calculated by the formula: FACTOR (IN) = (IN-INmin) / (INmax-INmin) FACTOR = MAX (FACTOR, 0) FACTOR = MIN (FACTOR, 1) The control signal is calculated by the formula: OUT (IN) = OUTmin * (1 - FACTOR (IN)) + OUTmax * FACTOR (IN) In this way, if IN <= INmin, then OUT = OUTmim if IN> = INmax, then OUT = OUTmax Nonlinear signal converter . Converts the input signal IN to the control signal OUT using the linear interpolation formula, but it increases or decreases the interpolation coefficient by means of the function and degree. Nonlinear interpolation is specified by five parameters: INmin - the minimum value of the input signal OUTmin - minimum value of the control signal INmax - the maximum value of the input signal OUTmax - maximum value of the control signal POWER - the degree of amplification or attenuation of the interpolation factor If POWER == 1, then the nonlinear converter does not differ from the linear one. If POWER <1, the value of FACTOR is amplified, and the machine gives out a larger control signal OUT in comparison with the linear automatic machine. If POWER> 1, the value of FACTOR is weakened, the machine gives a smaller control signal OUT in comparison with the linear automatic machine. In either case, the linear and non-linear automata give the same OUT values ??at the minimum and maximum IN signal (because FACTOR <= 1) Configure CPLANEAI.TXT Controlling the chassis model . Type of machine: switch with hysteresis (see description). Input signal: true speed (m / s) MINSIGNAL: ComplexGearModelTS [1] MAXSIGNAL: SimpleGearModelTS MINSTATE: Integrated chassis model MAXSTATE: A simple chassis model ComplexGearModelTS = 0.5 [2] SimpleGearModelTS = 1.0 The duration of the formation change . When the formation changes, the positions of the slaves with respect to the leader of the group change. In order for AI to be smoothly rebuilt, animation of formations is used. The duration of the animation is specified in the FormationBlendingTime parameter (the time is specified in seconds). FormationBlendingTime = 20.0 The radius of maneuver in standby mode . The standby mode is enabled when the AI ??maneuver stack is empty. This happens in the following cases: AI performed the last command of the mission, and at the same time remained in the air. AI performed the next mission team, but the next team has not yet arrived (the command will be given with a delay). AI flew to the next waypoint and waits for subsequent commands, or the next waypoint (the command will be given with a delay). In idle mode, AI maneuvers "flight around the point." The target point of the maneuver is the point located exactly to the right of the aircraft, at the same height, remote from the distance StandByRadius . Since this maneuver is multi-purpose, the radius value for it must be chosen on the basis of the following conflicting requirements: short-term maneuvering should not disrupt the flight along the route (ideally, the radius should be equal to infinity, and the plane must continue to fly in a straight line). The aircraft should not fly away from the initial point of maneuver too far (ideally, the radius should be several hundred meters). The radius is indicated in meters. StandByRadius = 1000.0 PID controller signal ranges . The signal range of the PID controller is set by the maximum outgoing signal module. RollRange = 180 means that the PID controller of the control channel by roll can output a signal from -180 to +180. YawRange = 90 means that the PID controller of the control channel by yaw can output a signal from -90 to +90. PitchRange = 180 means that the PID control channel of the pitch control channel can output a signal from -180 to +180. SpeedRange = 1 means that the PID controller of the thrust control channel can output a signal from -1 to +1. RollRange = 180 YawRange = 90 PitchRange = 180 SpeedRange = 1 CAeroplane.txt settings This file contains AI settings, independent of the type of aircraft. The settings are configured separately for each AI level in the blocks [ novice ], [ normal ], [ high ], and [ ace ]. Pre-emption when intercepting an air target . Determined by two parameters - maximum angle feedforward ForestallingAngle (degrees) and a maximum height feedforward ForestallingAltitude (in meters). ForestallingAngle = 15.0 ForestallingAltitude = 0.0 Target distribution distance . Having approached the target for a distance less than TargetCoordinationDistance , the AI ??of the leader of the group executes the targeting algorithm, and continues to execute it every 5 seconds, until the target approaches the combat distance. In combat, the targeting algorithm is enabled whenever the AI ??leader destroys or loses sight of the current target. The distance of the target is set in meters. TargetCoordinationDistance = 4000.0 Command recognition distance . Having become closer to the leader of the group at a distance less than WingmanCoordinationDistance, the AI ??of the slave can "recognize" (or rather, take) commands from the leader, including: commands from the AI ??algorithm tactical commands from the player The command recognition distance is set in meters. WingmanCoordinationDistance = 600.0 Estimation of threats in an air battle . In combat, each AI-pilot periodically analyzes the current situation and determines which enemy aircraft poses the greatest threat for him. The threat assessment period is set by the SituationTimeout parameter , and is specified in seconds. The more AI will analyze the combat situation, the sooner he will notice the threat, and the more time he will have to react to this threat. Therefore, in the senior AI level, the threat assessment period should be less than the younger one. SituationTimeout = 5.0 It is obvious that algorithmically the threat can be determined at a distance of both 100 meters and 100 kilometers. In order to cut off such microscopic influences, the threat threshold ThreatTreshold is used . If the algorithm for assessing threats finds an enemy aircraft, the threat from which is greater than the threshold value, then AI makes the decision to counterattack. But as long as the magnitude of the threat is less than the threshold value, this threat will not be considered real. The value of the threat threshold is given in the unit divided by meters (1 / m) [3] . ThreatTreshold = 0.0025 // ~ 400 meters Private settings for a particular type of aircraft . [ Performance ] block : Contains the basic characteristics of the aircraft, used by both the AI ??controller (maneuvers) and the AI ??monitor (decision-making system). Maximum speed in horizontal flight (kilometers per hour) MaxSpeed ??= 175.0 Maximum climb speed (meters per second) MaxClimbRate = 4.5 Ceiling (meters) ServiceCeiling = 5500.0 The permissible value of the integrity of the aircraft structure (dimensionless value in the range from 0 to 1): MinStructureHealth = 0.975 The permissible value of the motor integrity (dimensionless value in range from 0 to 1): MinEngineHealth = 0.936 Flag warm up the engine before the start. The flag is set to "false" for all rotary engines: EngineWarming = true The optimal speed of the combat turn (the first parameter is kilometers in hour, the second parameter - angles per second in pitch). Installed empirically - it is necessary to take off and make a maneuver by measuring speed. In order to disable this feature from AI is necessary write the value of TurnRate = 0,0 (see CAeroplane_Breguet14.txt) TurnRate = 150.0, 38.0 Block [ cruise ] . Contains AI settings used by route maneuvers, as well as take-off and landing maneuvers. Automatic roll in horizontal flight . Type of machine: non-linear signal converter (see description). Incoming signal: angle to target (degrees) Outgoing signal: module of the target angle of heel (in degrees) [4] Machine parameters: INmin: 0.0 OUTmin: 0.0 INmax: RefAngle (degrees) OUTmax: RefRoll (in degrees) POWER: RefRollFactor (dimensionless value) RefAngle = 90.0 RefRoll = 45.0 RefRollFactor = 0.5 Roll machine with a set of heights (decrease) . If the aircraft is gaining altitude or decreasing, the value of RefRoll ceases to be a constant, and is calculated by a roll automat with a set of heights . Type of machine: linear signal converter (see description). Incoming signal: a module of the rate of climb (in meters per second). Outgoing signal: RefRoll (in degrees) Machine parameters: INmin: 0.0 OUTmin: 0.0 INmax: MaxRollClimb (in meters per second) OUTmax: MaxRoll (in degrees) MaxRoll = 60.0 MaxRollClimb = 2.5 Automatic climb. Type of machine: non-linear signal converter (see description). Incoming signal: difference between target and current height (in meters) Outgoing signal: module of the target climb rate (in meters per second) Machine parameters: INmin: 0.0 OUTmin: 0.0 INmax: RefAltError (in meters) OUTmax: RefClimb (in meters per second) POWER: RefClimbFactor (dimensionless value) RefAltError = 50.0 RefClimb = 10.0 RefClimbFactor = 1.5 Automatic slip stabilization . Type of machine: linear signal converter (see description). Incoming signal: angle of slip (in degrees). Outgoing signal: the yaw rate modulus ( in degrees per second ) Machine parameters: INmin: 0.0 OUTmin: 0.0 INmax: RefSSA ( degrees ) OUTmax: RefYawRate ( in degrees per second ) RefSSA = 15.0 RefYawRate = 15.0 Automatic cut-off switch . In some cases (for example - at the landing stage) AI uses the ignition cut-off in order to extinguish the speed. In all similar situations, the same algorithm is used. Type of machine: switch with hysteresis (see description). Input signal: true airspeed error [5] (in meters per second) MINSIGNAL: TurnOffError MAXSIGNAL: TurnOnError MINSTATE: Ignition off MAXSTATE: Ignition on In this case, if the engine speed drops to the MinRPM mark , then the machine turns on the ignition, despite the amount of the incoming signal. TurnOffError = -5 TurnOnError = -2 MinRPM = 550 Automatic device for limiting the angle of attack . Prevents the aircraft from crashing into a spin with active maneuvering. It is relevant only in cases when other means achieve sustainable management is not possible. Type of machine: linear signal converter (see description). Incoming signal: angle of slip (in degrees). Outgoing signal: the yaw rate modulus ( in degrees per second ) Machine parameters: INmin: MinAttackAngle ( in degrees ) OUTmin: CurrentPitchError ( in degrees per second ) INmax: MaxAttackAngle ( degrees ) OUTmax: 0 ( in degrees per second ) RestrictAttackAngle = true MinAttackAngle = 12.5 MaxAttackAngle = 25.0 In the pitch control circuit, the attack angle limiting machine is the last, and controls the outgoing signal of the previous machines (CurrentPitchError). Automatic roll compensation at take-off (landing) . The machine stabilizes the aircraft by roll by yaw. Works only during takeoff and landing. Type of machine: linear signal converter (see description). Incoming signal: angle of heel (in degrees). Outgoing signal: the yaw rate modulus ( in degrees per second ) The machine is set by a single parameter - TakeoffYawFactor - the roll-to-yaw rate conversion factor (each degree of roll angle is converted to yaw rate, multiplying by this value). TakeoffYawFactor = 7.5 Flight parameters . MinCruiseTAS . Minimum speed of the route for the leader in the group. MinWingmanTAS . Minimum speed of the route for the slave in the group. The minimum speed of the slave must be less than the minimum speed of the leader (so that the group does not "crash" in flight). AttackIgnitionControl . The flag indicates that the AI ??needs to use the ignition switch during the ground attack. This flag is of an auxiliary character and is used only in cases when it is impossible to configure AI by other methods. MinCruiseTAS = 100.0 MinWingmanTAS = 95.0 AttackIgnitionControl = false Take-off and landing parameters . LandingApproachTAS . Target true airspeed for approach. LandingTouchDownTAS . Target true airspeed when touching the ground. LandingThrottleLimit . The flag indicates that you must use the "Auto throttle limitation" option when landing. This flag is always set to "false" for rotary engines. ApproachLowering . The flag indicates that the aircraft should decrease when approaching the landing (that is, before the glide path). This flag is beneficial in the event that the aircraft is difficult to extinguish the speed at a decrease; This flag is undesirable if the aircraft is not gaining altitude. ApproachIgnition . The flag indicates whether it is necessary to perform the ignition cutoff at the moment of approach (on the glide path, the cutoff is always performed). LandingRoundIgnition . The flag indicates whether it is necessary to perform an ignition cut-off during a spin above the aerodrome. It is necessary to set this flag to "true" if the engine of the aircraft has traction, even at minimum revs (for example - Fokker Dr1). TouchDownDistance . Distance reduction on the glide path (the final landing maneuver). TouchDownPitch . Target angle of pitch at the moment of touching the ground. TouchDownCYRFactor . A factor in the range {0..1}, showing the dependence of ClimbRate on YawRate and RollRate. Affects only the stage of descent along the glide path, and prevents the aircraft from crashing into a tailspin. The TouchDownCYRFactor = 1 factor indicates that AI stops increasing the angle of attack if RollRate> = 5.0 or YawRate> = 5.0 degrees per second, at lower AI values, it stops increasing the angle of attack at lower rotation speeds. The relevance of this parameter is confirmed only for rotary engines. TaxiingPitch . The flag shows that on taxiing AI it is necessary to lift the "tail" of the aircraft to reduce friction. For aircraft with a heavy "nose", this flag must be set to "false". TakeoffElevatorSafe . The flag shows that at take-off the elevator of the plane of the airplane has a full course (from -1 to +1). Some aircraft (DFWC5) can damage the elevator, if you lower it down (give a handle away from yourself) when the plane is on the ground. In such cases, this flag must be set to "false". TakeoffSafePitch . Balanced pitch angle on take-off. For planes with a heavy nose (Sopwith Dolphin), this angle should be greater than zero, so that the take-off is safe. TakeoffSurfaceSlope . The flag shows that the take-off AI must take into account the angle of the surface. It is actual for planes with a heavy "nose" (Sopwith Dolphin). TakeoffCriticalSlope . The critical angle of inclination of the surface, at which the take-off becomes Unsafe (the plane can overturn). It is actual for planes with a heavy "nose" (Sopwith Dolphin). CriticalTakeoffRoll . The angle of heel at which the aircraft can damage the plane of the wings, maneuvering on the ground. LandingApproachTAS = 90.0 LandingTouchDownTAS = 85.0 LandingThrottleLimit = true ApproachLowering = false ApproachIgnition = false LandingRoundIgnition = false TouchDownDistance = 280.0 TouchDownPitch = 15.0 TouchDownCYRFactor = 0.0 TaxiingPitch = false TakeoffElevatorSafe = true TakeoffSafePitch = 0.0 TakeoffSurfaceSlope = false TakeoffCriticalSlope = 0.0 CriticalTakeoffRoll = 7.5 Security settings . StallRollRate . The value of the angular velocity along the OX axis, at which the aircraft is statistically in a corkscrew. StallYawRate . The value of the angular velocity along the OY axis, at which the aircraft is statistically in a corkscrew. StructureAlert . The flag shows that the AI ??should take into account the possibility of destroying the structure of the aircraft with active maneuvering. Now the flag is relevant only for Nieuport17. StructureAlertNy . Empirically established value of the overload, in which the continuation of maneuvers leads to the destruction of the structure of the aircraft. StructureAlertTAS . The empirically established value of the true airspeed, in which continued maneuvers lead to the destruction of the aircraft structure. The values ??of StructureAlertNy overload and the true air speed of StructureAlertTAS should be less than the critical values ??(in which the destruction of the structure is irreversible), otherwise AI will not have time to take the plane out of a dangerous situation. StallRollRate = 160.0 StallYawRate = 60.0 StructureAlert = false StructureAlertNy = 0.0 StructureAlertTAS = 0.0 The [ dogfight ] block is the settings duplicated by the AI ??level . Contains AI settings used by combat maneuvers. Some of the configuration is configured in nested blocks [ novice ], [ normal ], [ high ] and [ ace ] - in these blocks the settings are duplicated, only the parameter values ??differ. Settings that are not included in these blocks are common for all AI levels. Automatic sighting . Type of machine: linear signal converter (see description). Incoming signal: distance to the target (in meters). Outgoing signal: target angle to attacked aircraft by pitch ( in degrees ) Machine parameters: INmin: AttackDistance OUTmin: 0.0 INmax: EngageDistance OUTmax: RefNoseAngle This machine allows during the attack to "keep" the target in the upper segment of the front hemisphere. RefNoseAngle is the angle to the pitch target that AI holds if the target is at a distance equal to or greater than EngageDistance . When you reduce the distance to AttackDistance , this angle decreases to zero. In addition, if the target is removed to a distance greater than EngageDistance, then AI stops performing the combat maneuver and maneuvers the target's interception. RefNoseAngle = 22.5 AttackDistance = 75.0 EngageDistance = 150.0 Automatic pointer guidance . Type of machine: linear signal converter (see description). Incoming signal: true airspeed (in meters). Outgoing signal: target turn-by-turn rate (in degrees per second) Machine parameters: INmin: MinTAS1 OUTmin: 0.0 INmax: MaxTAS2 OUTmax: MaxPitchRate This machine calculates the turn rate by pitch based on the current true airspeed, and prevents the aircraft from falling into a spin when maneuvering at low speeds. At a TAS speed equal to or greater than MaxTAS2 , the pitch signal is not limited (unless there is an angle limit), while AI attempts to deploy the aircraft at the MaxPitchRate speed . When TAS speed equal to or less MinTAS1 control singal pitch is zero. MinTAS1 = 60.0 MaxTAS2 = 110.0 MaxPitchRate = 90.0 Automatic machine gun control machine guns . Type of machine: switch with hysteresis (see description). Input signal: angle to target (degrees) MINSIGNAL: MinOpenFireAngle ( MaxOpenFireAngle ) MAXSIGNAL: MinStopFireAngle ( MaxStopFireAngle ) MINSTATE: Shooting from machine guns MAXSTATE: Stop shooting and reloading machine guns The machine uses the corners of < MinOpenFireAngle > and < MinStopFireAngle > at the distance < MinFireDistance >, and the corners of < MaxOpenFireAngle > and < MaxStopFireAngle > in the distance < MaxFireDistance >. MinOpenFireAngle = 10.0 MaxOpenFireAngle = 5.0 MinStopFireAngle = 15.0 MaxStopFireAngle = 7.5 Parameters of combat maneuvers . MinFireDistance . Minimum distance of fire. MaxFireDistance . Maximum distance of fire. CollisionTimeTreshold . The threshold time before the collision at which the dodge maneuver is activated. HBTNegativeRoll . Negative angle of heel in the horizontal combat turn (turn left). HBTPositiveBTRoll . Positive angle of heel in the horizontal combat turn (turn right) . MinFireDistance = 75.0 MaxFireDistance = 150.0 CollisionTimeTreshold = 2.5 HBTNegativeRoll = -70.0 HBTPositiveBTRoll = 70.0 The [ dogfight ] block is a general setting . Automatic control of maneuvering at low altitudes . Used parameters (1): MinSafeAltitude0 . The minimum true height of maneuvering at roll <= 45 degrees. MaxSafeAltitude0 . Safe true maneuvering altitude at heel <= 45 degrees. MinSafeAltitude45 . The minimum maneuvering height at heel is> = 90 degrees. MaxSafeAltitude45 . The safe height of maneuvering at heel> = 90 degrees. MinSafeAltitudeVP . The minimum height of maneuvering at a speed of decrease of 40 meters per second. MaxSafeAltitudeVP . Safe maneuvering altitude at a descent rate of 40 meters per second. Accepts the current angle of heel (in degrees) and the current rate of descent (in meters per second) (2). Functions of the machine: The machine calculates the minimum maneuvering height Hmin and the safe maneuvering altitude Hmax , taking into account the parameters (1) and the input data (2), using formulas (3). The machine limits the roll angle to 0 (degrees) at the minimum maneuvering height. Does not limit the angle of heel at a safe maneuvering height. At a height H lying below the safe Hmax and above the minimum Hmin, the roll angle is limited by the value of R , calculated from formula (4). The machine limits pitch angle +1 (degree) at the minimum maneuvering altitude. It does not limit pitch angle at safe maneuvering height. At a height H lying below the safe Hmax and above the minimum Hmin, the pitch angle is limited by the value of P calculated by formula (5). Hmin = Lerp (45, MinSafeAltitude0 , 90, MinSafeAltitude45 , Roll); Hmax = Lerp (45, MaxSafeAltitude0 , 90, MaxSafeAltitude45 , Roll); Hmin = Lerp ( MinSafeAltitudeVP , Hmin , MaxSafeAltitudeVP , MinSafeAltitude0 , ClimbRate); Hmax = Lerp ( MinSafeAltitudeVP , Hmax , MaxSafeAltitudeVP , MaSafeAltitude0 , ClimbRate); (3) R = Lerp ( Hmin, 0, Hmax, Roll, Roll); (4) P = Lerp (Hmin, 1, Hmax, Pitch, Pitch); (5) Here: Lerp; linear interpolation function Roll; absolute value of the current angle of heel (in degrees) Pitch; the value of the current pitch angle (in degrees) ClimbRate; the current value of the rate of decline (in degrees in seconds) MinSafeAltitude0 = 60.0 MaxSafeAltitude0 = 120.0 MinSafeAltitude45 = 90.0 MaxSafeAltitude45 = 180.0 MinSafeAltitudeVP = 120.0 MaxSafeAltitudeVP = 240.0 Diving restraining machine . Used parameters: TASPitchLimit . The flag indicates whether the AI ??should use the dive-limiting machine in combat maneuvers. MinPitchTAS . The true airspeed at which the dive is safe. MaxPitchTAS . The true airspeed at which the dive is likely to lead to the destruction of the aircraft structure. Accepts the current true airspeed (TAS). Functions of the machine: If the input signal is TAS <= MinPitchTAS , then the machine is inactive. If the input signal TAS> = MaxPitchTAS , then the machine only allows horizontal flight or climb. If the input signal MinPitchTAS <= TAS <= MaxPitchTAS , then the machine partially limits the dive by increasing the value of the minimum allowable pitch angle P by formula (6) P = Lerp (MinPitchTAS, Pitch, MaxPitchTAS, 0, Pitch); (6) TASPitchLimit = true MinPitchTAS = 175.0 MaxPitchTAS = 190.0 Automatic pitch control depending on the angle of slip . Used parameters: RestrictPitchBySSA . The flag indicates whether the AI ??should be used in the combat maneuvers of the pitch limiting machine depending on the slip angle. MinPitchSSA . Angle of slip, in which pitch control is not limited. MaxPitchSSA . Angle of slip, in which pitch control is completely blocked. Accepts the current value of the sliding angle SSA (in degrees), and the current pitch control signal PitchError (in degrees). Functions of the machine: If the current control signal by pitch <0 (rotation by pitch down), then the machine is inactive. If the input signal is SSA <= MinPitchSSA , then the machine is inactive. If the input signal SSA > = MaxPitchSSA , the pitch control is completely blocked. If the input signal MinPitchSSA <= SSA <= MaxPitchSSA , the pitch control is partially blocked, according to formula (7). PitchError = Lerp (MinPitchSSA, PitchError, MaxPitchSSA, 0, PitchError); (7) In the control circuit of the aircraft by pitch, this machine stands last, and corrects the control signal. The automaton is used in those cases when it is not possible to configure the AI ??by other means (SE5a). RestrictPitchBySSA = true MinPitchSSA = 7.5 MaxPitchSSA = 22.5 Parameters of combat maneuvers . STVOffset. Empirical anticipation horizontally for guidance on a ground or static target (in meters). The parameter is used in those cases when the AI ??can not be adjusted by other means. YawAimingAngle. Threshold angle to the target (in degrees), at which the aiming on the air target is disconnected along the yaw channel. DiveTAS. Target true airspeed when diving in air combat. CruiseTAS. Target true airspeed in a horizontal flight in air combat. ClimbTAS. Target true airspeed when climbing in air combat. STVOffset = 0.0 YawAimingAngle = 90.0 DiveTAS = 100.0 CruiseTAS = 200.0 ClimbTAS = 250.0 The [ approach ] block . Contains the settings used by algorithms for calculating the trajectory of approach to the ground target. Block parameters . VFAngle . The angle to the ground pitch target that the AI ??stands during the approach or is zero if the altitude during maneuver is constant. For more details, see the section "Compilation of empirical parameters". ApproachRadius . The radius of the turn maneuver for the repeated attack of the target. ApproachDistance . The distance from the target on which the turn is made. ApproachAltitude . The true height of maneuvering when attacking a ground target. SpiralAttackApproach . The flag indicates that the AI ??can use a spiral drop maneuver during a ground attack or balloon attack. If the flag is off, then the descent path will be similar to the digit "8". VFAngle = 2.5 ApproachRadius = 250.0 ApproachDistance = 1650.0 ApproachAltitude = 125.0 SpiralAttackApproach = true The [ pid ] block . Contains the parameters of the PID controllers for each of the four control channels of the aircraft. PID controller is described by three factors: proportional to P, integral I and differential D. At the input, the PID controller receives the signal Verror = (Vtarget-Vcurrent) , where Vtarget is the target value of the controlled parameter, Vcurrent is the current value of the controllable parameter, and Verror is the current value of the managed parameter error. AI control algorithms limit the input signal module of PID controllers Vmax as follows: by roll: 5 degrees per clock (1/50 second); by pitch: 5 degrees per clock (1/50 second); by yaw: 5 degrees per clock (1/50 second); by thrust: the incoming signal is not limited; A PID controller that satisfies the equation: (P + I + D) · Vmax = PidRange it is able to produce the maximum control signal. If the PID controller satisfies the inequality: (P + I + D) · Vmax PidRange then the control signal of the controller is amplified, while oscillations of the outgoing signal are inevitable. Here PidRange is the range of signals in the corresponding channel RollRange, YawRange, PitchRange or SpeedRange (see section "CPLANEAI.TXT Settings"). Roll = 20.0, 25.0, 5.0 Pitch = 9.0, 16.0, 2.0 Yaw = 8.0, 9.0, 1.0 Speed ??= 2.0, 4.0, 1.0 Selection of empirical parameters . Parameters TurnRate (block performance ) . It is necessary to run the game in the debug assembly with the text output to the screen (the console command debug_info 1), and select the mission where the player can control the tunable aircraft. During the mission, a list of rows will be displayed, one of which is in the format "Player Alt: TAS: PitchRate: ". In order to adjust the parameter TurnRate , you need to take off and make a few horizontal turns with a roll of 70-90 degrees. During these maneuvers, the altitude, the true airspeed and the pitch turn rate will be displayed in the "Player Alt: TAS: PitchRate: " line. The desired parameter of TurnRate is the pair {TAS, PitchRate}, in which PitchRate takes the maximum value on a macroscopic time interval (more than one second). Current TurnRate parameters by aircraft types. Plane TAS Pitch Rate AlbatrosD3 150 38 AlbatrosD5 160 45 FokkerD7 130 40 FokkerD8 140 45 FokkerDr1 135 48 Nieuport17 110 thirty Nieuport28 140 32 PfalzD12 160 38 PfalzD3a 140 40 SE5a 170 45 Camel 150 50 Dolphin 150 40 SPAD13 167 37 Security parameters ( performance block ). The initial parameters of the StructureAlertNy and StructureAlertTAS structure destruction are established by the aircraft model designer. However, in this case it is necessary to have certain threshold values ??necessary for the operation of the safety algorithm, therefore the initial parameters of the overload and speed must be understated by the results of a series of experiments. These parameters are most effectively checked in air combat. At the time of writing, the only aircraft that needs a security algorithm is Nieuport17. If the design flaws of the model of this aircraft are corrected by the developer in the future, it is recommended to disable the security settings (reset the StructureAlert flag ). Aircraft structural integrity parameters ( performance block ) . The parameters of the integrity of the design of the aircraft and the engine are almost the same for the same types of aircraft and engines. It makes sense to copy them from existing configuration files. Parameters of maneuvering at low altitudes ( dogfight unit ) . Using an analogous pobdorke parameter TurnRate . In order to measure MaxSafeAltitudeVP and MinSafeAltitudeVP , it is necessary to make a half-loop, and a half loop, at a low altitude, remembering in advance the current true height (shown in the line "Player Alt: TAS: PitchRate: "). If the maneuver at this altitude ended in a crash, then it is necessary to restart the mission and try to maneuver 50 meters higher. If the maneuver at this altitude has been completed successfully, it is necessary to detect the altitude at which the aircraft leaves the maneuver. Next, you must assign the MaxSafeAltitudeVP parameter to the height of the maneuver entry, and the MinSafeAltitudeVP parameter to the height of the maneuver exit. Final testing and tuning of parameters should be carried out on experimental AI, in dogfighting at low altitude. The empirical parameters < MinSafeAltitude0 >, < MaxSafeAltitude0 >, < MinSafeAltitude45 >, and < MaxSafeAltitude45 > can not be measured on a player's airplane. The task of adjusting these parameters is to take values ??from configurations similar in dynamics to aircraft, test them in dogfight, and tune as necessary. Parameter of anticipation for guidance on the ground target ( dogfight ) . For testing, you need a mission in which a custom aircraft attacks a ground target. In addition, you need a debug build with graphical debugging information. Initially, the parameter of empirical anticipation for guidance on the ground target STVOffset is set to 0. At the moment when the plane starts attacking the target, two beams will be visible: the white beam will show the current direction of the firing by course guns, the gray translucent beam is the true direction to the target. According to the results of test shooting on the target: The value of STVOffset decreases if AI shoots above the target. The value of STVOffset is increased if AI fires before the target. After correcting the parameter, the game is restarted and the mission is tested again. Parameters of approach to the target (block approach) . All parameters of this block are adjusted empirically. The radius of maneuvering of the ApproachRadius is adjusted so that the airplane fits as best as possible into the flight path in a circle. Too small a radius will cause the aircraft to leave the maneuver at an angle to the target, and the AI ??will have to maneuver, compensating for this angle, and therefore it will have less distance to aim. Too much radius of maneuver will cause the aircraft to go too long on the target. Increasing the distance of maneuvering ApproachDistance can compensate for a poorly tuned radius, but a larger distance increases the time to approach the target. The height of the ApproachAltitude maneuver is the most important parameter in this case. The better the aircraft is reduced and gaining altitude, the more the ApproachAltitude parameter can be . Aircraft that are relatively poorly reduced (FokkerDr1) must attack the ground target from low altitudes. The angle of approach to the ground pitch target VFAngle can help if an altitude setting can not achieve an effective approach to the target. In this case, the height of the maneuver remains constant only during the turn, and as the aircraft flies to the target, the altitude is reduced: Spiral reduction < SpiralAttackApproach > is effective in cases where the aircraft is able to actively decrease, and is absolutely useless for aircraft that are slowing down, such as FokkerDr1. The fact is that in the helix AI gives the aircraft a deep roll, and at the same time automatically increases the engine speed to compensate for this roll. If the aircraft drops slowly, then increasing the engine speed in a spiral will cause the aircraft to actually fly in a circle. Parameters of PID controllers . For unique airplanes, the PID parameters are initialized with random values ??(for example - 10, 10, 10), and then adjusted more precisely, based on the test results of the aircraft in the series of launches. For aircraft with existing analogues, the PID parameters are initialized with values ??from the analog configuration, and then are adjusted more precisely, based on the test results of the aircraft in the series of launches. In addition, there are scientific methods for configuring PID controllers, which you can learn from Wikipedia: http://en.wikipedia.org/wiki/PID_controller. [1] Here and below - the underlined font identifies the names of the configurable parameters. [2] Here and below - examples of the configuration of the parameters are highlighted in blue srisht. [3] In this dimension, the significance of the threat grows with the increase in its numerical value, while in the reciprocal dimension (in meters) the significance of the threat falls with the increase in the numerical value (the closer it is, the more dangerous it is). In addition, the threat assessment algorithm substitutes in the denominator of this dimension not a unit, but the scalar product of the normalized aircraft velocity vectors, which makes it possible to calculate the magnitude of the threat taking into account the trajectory of the aircraft. [4] Hereinafter, the sign of the outgoing signal calculates the control algorithm based on the sign of the incoming signal. [5] Error TAS = (target TAS - current TAS)