Missile flight profiles – Arma 3
Ondrejkuzel (talk | contribs) (documentation v.1) |
Lou Montana (talk | contribs) m (Text replacement - "[[Arma 3 " to "[[Arma 3: ") |
||
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | |||
{{ | |||
Since Arma 1.82 it is possible for precision guided munitions to utilize different flight profiles or acquire targets after being launched. You can do that by adding an [[A3_Targeting_config_reference#flightProfiles|flightProfiles]] array to the ammo config and creating classes for specific profiles. Each profile has different properties which should be specified in order to avoid the usage of default values, which are usually just fallback values. | Since Arma 1.82 it is possible for precision guided munitions to utilize different flight profiles or acquire targets after being launched. You can do that by adding an [[A3_Targeting_config_reference#flightProfiles|flightProfiles]] array to the ammo config and creating classes for specific profiles. Each profile has different properties which should be specified in order to avoid the usage of default values, which are usually just fallback values. | ||
Line 26: | Line 23: | ||
There are no special properties. | There are no special properties. | ||
=== TopDown === | === TopDown === | ||
Flight profile that imitates | Flight profile that imitates {{Link|https://en.wikipedia.org/wiki/Top_attack|top attack}}. The missile initially gains desired flight level and keeps it till it’s close enough to the target, then performs a dive and strikes the target from the top | ||
* Initial phase - consists of the ascension part and the flight in the specified flight-level part | * Initial phase - consists of the ascension part and the flight in the specified flight-level part | ||
* Seeking phase - triggered by reaching the descendDistance (in relation to the target). The missile then starts turning towards the original target and keeps checking lock prerequisites (which would result in entering the Locked phase) | * Seeking phase - triggered by reaching the descendDistance (in relation to the target). The missile then starts turning towards the original target and keeps checking lock prerequisites (which would result in entering the Locked phase) | ||
** If the manual-control is enabled, missile will remember the point where the parent was aiming at the moment of fire and consider that position its target; after reaching the Seeking phase, the missile will start to act like a directly-fired manually-controlled one and will follow the parent’s aimpoint | ** If the manual-control is enabled, missile will remember the point where the parent was aiming at the moment of fire and consider that position its target; after reaching the Seeking phase, the missile will start to act like a directly-fired manually-controlled one and will follow the parent’s aimpoint | ||
* Lost - manually-controlled missiles can become locked again, if they start to fulfil the lock prerequisites (only past the Initial phase of course) | * Lost - manually-controlled missiles can become locked again, if they start to fulfil the lock prerequisites (only past the Initial phase of course) | ||
====minDistance==== | ==== minDistance ==== | ||
Minimal distance from the target to perform top-down attack; if the target is closer, Direct flight mode is chosen instead | Minimal distance from the target to perform top-down attack; if the target is closer, Direct flight mode is chosen instead | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
minDistance = 180.0; | minDistance = 180.0; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====ascendHeight==== | ==== ascendHeight ==== | ||
Desired flight level used to approach the target | Desired flight level used to approach the target | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
ascendHeight = 150; // missile won't try to reach this altitude once it passes the descendDistance | ascendHeight = 150; // missile won't try to reach this altitude once it passes the descendDistance | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====ascendAngle==== | ==== ascendAngle ==== | ||
Angle used to gain the desired flight level | Angle used to gain the desired flight level | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
ascendAngle = 30.0; // missile won't keep climbing once it passes the descendDistance | ascendAngle = 30.0; // missile won't keep climbing once it passes the descendDistance | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====descendDistance==== | ==== descendDistance ==== | ||
When reached, the missile will enter last phase of the flight - attack from the top | When reached, the missile will enter last phase of the flight - attack from the top | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
descendDistance = 180; // have some headroom for the missile turning down, the missiles won't be able to do much more than 45° descend angle | descendDistance = 180; // have some headroom for the missile turning down, the missiles won't be able to do much more than 45° descend angle | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== LoalDistance === | === LoalDistance === | ||
Lock-on After Launch mode, where a munition (missile) fired without a lock will start autonomously looking for available targets once it reaches a defined distance from parent object. It is intended to use this mode together with the [[A3_Targeting_config_reference#autoSeekTarget|auto seek]] ability, otherwise the missile gets lost after reaching the desired distance from parent and just flies straight forward. With the [[A3_Targeting_config_reference#autoSeekTarget|autoSeekTarget]] enabled the missile will search for a target in its (configured) [[ | Lock-on After Launch mode, where a munition (missile) fired without a lock will start autonomously looking for available targets once it reaches a defined distance from parent object. It is intended to use this mode together with the [[A3_Targeting_config_reference#autoSeekTarget|auto seek]] ability, otherwise the missile gets lost after reaching the desired distance from parent and just flies straight forward. With the [[A3_Targeting_config_reference#autoSeekTarget|autoSeekTarget]] enabled the missile will search for a target in its (configured) [[A3 Targeting config reference#missileLockCone|lock cone]] area. | ||
* Initial phase - consists of simple flight forward; this phase is left when the missile reaches the specified distance from parent | * Initial phase - consists of simple flight forward; this phase is left when the missile reaches the specified distance from parent | ||
* Seeking phase - consists of checks of lock prerequisites (in the case of enabled auto-seek) | * Seeking phase - consists of checks of lock prerequisites (in the case of enabled auto-seek) | ||
====lockSeekDistanceFromParent==== | ==== lockSeekDistanceFromParent ==== | ||
The desired distance from parent when the missile should start to seek a target | The desired distance from parent when the missile should start to seek a target | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
lockSeekDistanceFromParent = 500; | lockSeekDistanceFromParent = 500; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 67: | Line 64: | ||
* Initial phase - consists of simple fall; this phase is left when the munition reaches the specified altitude (again, it is not the above-sea-level one) | * Initial phase - consists of simple fall; this phase is left when the munition reaches the specified altitude (again, it is not the above-sea-level one) | ||
* Seeking phase - consists of checks of lock prerequisites (in the case of enabled auto-seek) around the original impact point | * Seeking phase - consists of checks of lock prerequisites (in the case of enabled auto-seek) around the original impact point | ||
====lockSeekAltitude==== | ==== lockSeekAltitude ==== | ||
The desired altitude upon which the bomb starts to seek a target | The desired altitude upon which the bomb starts to seek a target | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
lockSeekAltitude = 300; | lockSeekAltitude = 300; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Overfly === | === Overfly === | ||
Flight profile that imitates an overfly | Flight profile that imitates an overfly {{Link|https://en.wikipedia.org/wiki/Top_attack|top attack}} mode. Intended to be used together with [[Arma_3_Weapon_Config_Guidelines#Ammo_changes_on_fly_and_on_hit|submunition]] (an explosive formed projectile) that is created after reaching specified point above the target and strikes the target from the top. | ||
* Initial phase - consists of flight straight to the specified point above (potentially below, if the elevation is negative) the target | * Initial phase - consists of flight straight to the specified point above (potentially below, if the elevation is negative) the target | ||
Because this flight profile is so far intended only for missiles with submunition, no other phases are interesting in this case and the submunition should be created after reaching the point above the target) | Because this flight profile is so far intended only for missiles with submunition, no other phases are interesting in this case and the submunition should be created after reaching the point above the target) | ||
====overflyElevation==== | ==== overflyElevation ==== | ||
Elevation above the target when the missile is actually heading | Elevation above the target when the missile is actually heading | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
overflyElevation = 2.5; // use with same or bigger triggerDistance of the submunition | overflyElevation = 2.5; // use with same or bigger triggerDistance of the submunition | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Cruise === | === Cruise === | ||
Flight mode that in a simple manner imitates the behaviour of a | Flight mode that in a simple manner imitates the behaviour of a {{Link|https://en.wikipedia.org/wiki/TERCOM|terrain following}} missile. The missile uses sea-skimming/terrain-hugging in specified altitude while approaching the target. | ||
* Initial phase is defined by the flight towards target in the specified flight-level; the missile is performing sea-skimming/terrain-hugging while approaching the target | * Initial phase is defined by the flight towards target in the specified flight-level; the missile is performing sea-skimming/terrain-hugging while approaching the target | ||
* When the specified distance to target is reached, the missile starts to check target visibility (against the terrain only); if the target is visible, the missile enters Seeking phase | * When the specified distance to target is reached, the missile starts to check target visibility (against the terrain only); if the target is visible, the missile enters Seeking phase | ||
* If the lock prerequisites are met, the missile enters Locked phase | * If the lock prerequisites are met, the missile enters Locked phase | ||
====preferredFlightAltitude==== | ==== 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 | 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=" | <syntaxhighlight lang="cpp"> | ||
preferredFlightAltitude = 50; | preferredFlightAltitude = 50; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====lockDistanceToTarget==== | ==== lockDistanceToTarget ==== | ||
Distance to the target that triggers target visibility checks (only against terrain, objects are ignored) | Distance to the target that triggers target visibility checks (only against terrain, objects are ignored) | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
lockDistanceToTarget = 500; | lockDistanceToTarget = 500; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 105: | Line 102: | ||
* Black box displays text info about | * Black box displays text info about | ||
** missile flight profile | ** missile flight profile | ||
** current missile [[Arma_3_Missile_flight_profiles | ** current missile [[Arma_3_Missile_flight_profiles#Flight_phases|phase]] | ||
** missile height above the terrain | ** 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 | ** angle to the target and the distance to the target when the missile is past the initial state and its target (position) is valid | ||
Line 112: | Line 109: | ||
== Example Configuration == | == Example Configuration == | ||
=== cfgWeapons.hpp === | === cfgWeapons.hpp === | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
class my_launcher : MissileLauncher | class my_launcher : MissileLauncher | ||
{ | { | ||
Line 132: | Line 129: | ||
=== cfgAmmo.hpp === | === cfgAmmo.hpp === | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
class my_missile : MissileBase | class my_missile : MissileBase | ||
{ | { | ||
Line 173: | Line 170: | ||
* [[CfgAmmo_Config_Reference|CfgAmmo]] | * [[CfgAmmo_Config_Reference|CfgAmmo]] | ||
* [[CfgVehicles_Config_Reference|CfgVehicles]] | * [[CfgVehicles_Config_Reference|CfgVehicles]] | ||
* | * {{Link|link= https://forums.bohemia.net/forums/topic/213601-tanks-missile-flight-profiles-and-weapon-improvements/|text= Missile flight profiles thread}} | ||
* [[Arma 3 Targeting]] | * [[Arma 3: Targeting]] | ||
{{GameCategory|arma3|Weapon & Magazine Configuration}} |
Latest revision as of 10:38, 6 May 2024
Since Arma 1.82 it is possible for precision guided munitions to utilize different flight profiles or acquire targets after being launched. You can do that by adding an flightProfiles array to the ammo config and creating classes for specific profiles. Each profile has different properties which should be specified in order to avoid the usage of default values, which are usually just fallback values.
The flight profile also needs to be specified as a weapon's fire mode - paired by using the same name in both ammo and weapon configuration. Otherwise the weapon won't be able to utilize the munition's flight profile mode.
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
This is the default mode. It is automatically added when the ammo config does not specify any flight profile. It is also added if the weapon fire modes contain more fire modes (usable by the player) than those that are linked to specific missile flight profiles.
- Initial phase - only sets point to follow in case the manual control is enabled
- Seeking phase - depending on the fulfillment of lock conditions changes the status of the missile to either Locked or Lost
- Lost - manually-controlled missiles can become locked again, if they start to fulfil the lock prerequisites
There are no special properties.
TopDown
Flight profile that imitates top attack. The missile initially gains desired flight level and keeps it till it’s close enough to the target, then performs a dive and strikes the target from the top
- Initial phase - consists of the ascension part and the flight in the specified flight-level part
- Seeking phase - triggered by reaching the descendDistance (in relation to the target). The missile then starts turning towards the original target and keeps checking lock prerequisites (which would result in entering the Locked phase)
- If the manual-control is enabled, missile will remember the point where the parent was aiming at the moment of fire and consider that position its target; after reaching the Seeking phase, the missile will start to act like a directly-fired manually-controlled one and will follow the parent’s aimpoint
- Lost - manually-controlled missiles can become locked again, if they start to fulfil the lock prerequisites (only past the Initial phase of course)
minDistance
Minimal distance from the target to perform top-down attack; if the target is closer, Direct flight mode is chosen instead
minDistance = 180.0;
ascendHeight
Desired flight level used to approach the target
ascendHeight = 150; // missile won't try to reach this altitude once it passes the descendDistance
ascendAngle
Angle used to gain the desired flight level
ascendAngle = 30.0; // missile won't keep climbing once it passes the descendDistance
descendDistance
When reached, the missile will enter last phase of the flight - attack from the top
descendDistance = 180; // have some headroom for the missile turning down, the missiles won't be able to do much more than 45° descend angle
LoalDistance
Lock-on After Launch mode, where a munition (missile) fired without a lock will start autonomously looking for available targets once it reaches a defined distance from parent object. It is intended to use this mode together with the auto seek ability, otherwise the missile gets lost after reaching the desired distance from parent and just flies straight forward. With the autoSeekTarget enabled the missile will search for a target in its (configured) lock cone area.
- Initial phase - consists of simple flight forward; this phase is left when the missile reaches the specified distance from parent
- Seeking phase - consists of checks of lock prerequisites (in the case of enabled auto-seek)
lockSeekDistanceFromParent
The desired distance from parent when the missile should start to seek a target
lockSeekDistanceFromParent = 500;
LoalAltitude
Lock-on After Launch mode, where a munition (bomb) fired without a lock will start autonomously looking for available targets once it reaches a defined altitude. This flight mode is designed mainly for bombs. It is intended to use this mode together with the auto seek ability, otherwise the bomb gets lost after reaching the desired altitude and simply drops to the ground.
The bomb searches for a target in lockSeekRadius around the initially computed impact point (CCIP)
- Initial phase - consists of simple fall; this phase is left when the munition reaches the specified altitude (again, it is not the above-sea-level one)
- Seeking phase - consists of checks of lock prerequisites (in the case of enabled auto-seek) around the original impact point
lockSeekAltitude
The desired altitude upon which the bomb starts to seek a target
lockSeekAltitude = 300;
Overfly
Flight profile that imitates an overfly top attack mode. Intended to be used together with submunition (an explosive formed projectile) that is created after reaching specified point above the target and strikes the target from the top.
- Initial phase - consists of flight straight to the specified point above (potentially below, if the elevation is negative) the target
Because this flight profile is so far intended only for missiles with submunition, no other phases are interesting in this case and the submunition should be created after reaching the point above the target)
overflyElevation
Elevation above the target when the missile is actually heading
overflyElevation = 2.5; // use with same or bigger triggerDistance of the submunition
Cruise
Flight mode that in a simple manner imitates the behaviour of a terrain following missile. The missile uses sea-skimming/terrain-hugging in specified altitude while approaching the target.
- Initial phase is defined by the flight towards target in the specified flight-level; the missile is performing sea-skimming/terrain-hugging while approaching the target
- When the specified distance to target is reached, the missile starts to check target visibility (against the terrain only); if the target is visible, the missile enters Seeking phase
- If the lock prerequisites are met, the missile enters Locked phase
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
preferredFlightAltitude = 50;
lockDistanceToTarget
Distance to the target that triggers target visibility checks (only against terrain, objects are ignored)
lockDistanceToTarget = 500;
Diagnostics
- 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.