Missile flight profiles – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(created)
 
(adding more stuff - WIP)
Line 5: Line 5:


== Flight phases ==
== Flight phases ==
FSM-like system is used to control different phases of missiles and the transitions between them
* '''Initial''' - phase when the missile is ignoring its target (position) - if it has any - and focuses on specified flight path (specified by the flight profile + its properties)
* '''Seeking''' - phase when the missile will start to seek a target - either the one originally specified or new one in the case of auto-seek missiles (phase, when the missile is trying to roughly aim at the target and then checks locking prerequisites)
* '''Locked''' - the missile fulfils all the needed prerequisites for being locked and is heading toward it’s target (position); if - at some point in time - missile stops fulfilling the lock conditions, the status of the missile is changed to Lost
* '''Lost''' - missile has not fulfilled some condition for being locked and is completely lost - flies straight forward


== Profiles ==
== Profiles ==
=== Direct ===
=== TopDown ===
====minDistance====
Minimal distance from the target to perform top-down attack; if the target is closer, Direct flight mode is chosen instead
<syntaxhighlight lang="c">
</syntaxhighlight>
====ascendHeight====
Desired flight level used to approach the target
<syntaxhighlight lang="c">
</syntaxhighlight>
====ascendAngle====
Angle used to gain the desired flight level
<syntaxhighlight lang="c">
</syntaxhighlight>
====descendDistance====
When reached, the missile will enter last phase of the flight - attack from the top
<syntaxhighlight lang="c">
</syntaxhighlight>
=== LoalDistance ===
====lockSeekDistanceFromParent====
The desired distance from parent when the missile should start to seek a target
<syntaxhighlight lang="c">
</syntaxhighlight>
=== LoalAltitude ===
====lockSeekDistanceFromParent====
The desired altitude upon which the bomb starts to seek a target
<syntaxhighlight lang="c">
</syntaxhighlight>
=== Overfly ===
====overflyElevation====
Elevation above the target when the missile is actually heading
<syntaxhighlight lang="c">
</syntaxhighlight>
=== Cruise ===
====preferredFlightAltitude====
Altitude above terrain/sea that the missile is trying to keep during the flight; this is not actually altitude above sea-level, this is just the vertical distance from ground/sea
<syntaxhighlight lang="c">
</syntaxhighlight>
====lockDistanceToTarget====
Distance to the target that triggers target visibility checks (only against terrain, objects are ignored)
<syntaxhighlight lang="c">
</syntaxhighlight>


== Diagnostics ==
== Diagnostics ==
Ref [[Arma_3_Diagnostics_Exe]]
* Use the '''Shots''' diagnostic
* Black box displays text info about
** missile flight profile
** current missile [[Flight phases|phase]]
** missile height above the terrain
** angle to the target and the distance to the target when the missile is past the initial state and its target (position) is valid
* During the Initial phase, the direction missile is following is displayed as blue arrow with the origin in the center of the missile


== Example Configuration ==
== Example Configuration ==

Revision as of 13:21, 26 April 2018

Template:Cfg ref

Overview

Flight phases

FSM-like system is used to control different phases of missiles and the transitions between them

  • Initial - phase when the missile is ignoring its target (position) - if it has any - and focuses on specified flight path (specified by the flight profile + its properties)
  • Seeking - phase when the missile will start to seek a target - either the one originally specified or new one in the case of auto-seek missiles (phase, when the missile is trying to roughly aim at the target and then checks locking prerequisites)
  • Locked - the missile fulfils all the needed prerequisites for being locked and is heading toward it’s target (position); if - at some point in time - missile stops fulfilling the lock conditions, the status of the missile is changed to Lost
  • Lost - missile has not fulfilled some condition for being locked and is completely lost - flies straight forward


Profiles

Direct

TopDown

minDistance

Minimal distance from the target to perform top-down attack; if the target is closer, Direct flight mode is chosen instead

ascendHeight

Desired flight level used to approach the target

ascendAngle

Angle used to gain the desired flight level

descendDistance

When reached, the missile will enter last phase of the flight - attack from the top

LoalDistance

lockSeekDistanceFromParent

The desired distance from parent when the missile should start to seek a target

LoalAltitude

lockSeekDistanceFromParent

The desired altitude upon which the bomb starts to seek a target

Overfly

overflyElevation

Elevation above the target when the missile is actually heading

Cruise

preferredFlightAltitude

Altitude above terrain/sea that the missile is trying to keep during the flight; this is not actually altitude above sea-level, this is just the vertical distance from ground/sea

lockDistanceToTarget

Distance to the target that triggers target visibility checks (only against terrain, objects are ignored)

Diagnostics

Ref Arma_3_Diagnostics_Exe

  • Use the Shots diagnostic
  • Black box displays text info about
    • missile flight profile
    • current missile phase
    • missile height above the terrain
    • angle to the target and the distance to the target when the missile is past the initial state and its target (position) is valid
  • During the Initial phase, the direction missile is following is displayed as blue arrow with the origin in the center of the missile

Example Configuration

cfgWeapons.hpp

class my_launcher : MissileLauncher
{
  modes[] = { "Direct", "TopDown" };
  class Direct : Mode_SemiAuto
  {
    
    textureType = "direct";
    displayName = "Direct";
    ...
  };
  class TopDown : Direct
  {
    textureType = "topdown";
    displayName = "Top-down";
  };
};

cfgAmmo.hpp

class my_missile : MissileBase
{
  ...
  lockSeekRadius = 100;
  flightProfiles[] = { "Direct", "TopDown", "LoalDistance", "LoalAltitude", "Overfly", "Cruise" };
  class Direct
  {
  };
  class TopDown : Direct
  {
    ascendHeight = 150.0;
    descendDistance = 200.0;
    minDistance = 150.0;
    ascendAngle = 70.0;
  };
  class LoalDistance : Direct
  {
    lockSeekDistanceFromParent = 300.0;
  };
  class LoalAltitude : Direct
  {
    lockSeekAltitude = 100.0;
  };
  class Overfly : Direct
  {
    overflyElevation = 4.0;
  };
  class Cruise : Direct
  {
    preferredFlightAltitude = 50.0;
  };
};

In this case, the launcher is capable of using Direct and TopDown flight profiles and the missile is capable of all the flight profiles. Thus - in the game - the player/AI will only be capable of switching between Direct and TopDown flight profile. If there will be another flight profile declared in the launcher - let’s call it XY - it would not be available to player/AI, because the ammunition does not support it.


Related