FtD GeneralMissile

generalmissile Configuration

How It Works

Example

The following is for dual-mode sea-skimming pop-up anti-ship missiles.

It will switch to anti-air mode if the target's elevation is greater than 10 meters (i.e. more than 10 meters above sea level or the ground).

When the surface profile is active, it will pop-up 250 meters from the target (as given by ground distance) to a height 30 meters above the target's ground. At a ground distance of 100 meters, it will enter the terminal phase and aim straight for the predicted aim point.

Config = {
   MinAltitude = 0,
   DetonationRange = nil,
   DetonationAngle = 30,
   LookAheadTime = 2,
   LookAheadResolution = 3,

   AirProfileElevation = 10,
   AntiAir = {
      Phases = {
         {
            -- Basically, just terminal phase all of the time
         },
      },
   },

   Phases = {
      {
         Distance = 100,
      },
      {
         Distance = 250,
         AboveSeaLevel = true,
         MinElevation = 3,
         Altitude = 30,
         RelativeTo = 3,
      },
      {
         Distance = 50,
         AboveSeaLevel = true,
         MinElevation = 3,
         Evasion = { 20, .25 },
      },
   },
}

Nomenclature

I try to keep the use of certain words consistent in the parameter names, regardless of the actual meanings outside of this context.

General Parameters

Profile Configuration

Both anti-air and surface profiles have a Phases array. The first phase in the array is always the terminal phase. The last is always the closing phase. The array must be sorted from least to greatest according to their Range value (for anti-air) or Distance value (for surface) except for the very last (aka closing) phase.

Common Phase Parameters

These are parameters that may be present in both anti-air and surface phases.

For the terminal phase, this allows modification of the final aim point, e.g. to constrain it above (or below) the water line.

Anti-Air Phase Parameters

Currently, the anti-air profile does not have any phase parameters specific to anti-air aside from Range, which may be omitted in certain situations as noted above.

Surface Phase Parameters

All phases require Distance.

All non-terminal phases also require AboveSeaLevel, and MinElevation. All other phase parameters are optional (i.e. may be nil or omitted).

For the closing phase, Distance represents the maximum distance to aim for when adjusting altitude. Smaller means the closing altitude is reached sooner, but a steeper angle must be made.

Omitting Anti-Air or Surface Configs

If you omit the AntiAir section, then the profile defined by Phases will always be used.

If you omit the Phases section, then the missiles will always be in anti-air mode and always use the AntiAir parameters.

If neither are omitted, then you must define AirProfileElevation to differentiate between the two modes.

Change Parameters

All phases in a profile may have an optional set of parameters that determine when and how to change the missile's state.

An example, which includes all currently supported parameters:

Change = {
   When = {
      Angle = nil,
      Range = nil,
      AltitudeGT = nil,
      AltitudeLT = nil,
   },
   Thrust = nil,
   ThrustDelay = nil,
   ThrustDuration = nil,
   BallastDepth = nil,
   BallastBuoyancy = nil,
   MagnetRange = nil,
   MagnetDelay = nil,
},

The When section describes when the state change is made. If it is omitted (or if all its conditions are nil), then the state will be changed immediately upon entering that phase.

When Conditions

If there are multiple non-nil conditions, then all conditions must be met before the state is changed.

State Parameters

Each parameter affects a single type of missile part. If there are multiple of such parts, then the same value is set in all of them (which the exception of variable thrusters, noted below).

More Examples

Note that none of these examples take advantage of Change parameters. That's really up to you and the type of missile you build.

However, in almost all non-torpedo cases that use variable thrusters, you will probably benefit from dynamic terminal thrust: set Thrust to -1 and Angle to something small, like 3 to 7 degrees, e.g.

Phases = {
   -- The terminal phase
   {
      Distance = 150,
      Change = {
         When = { Angle = 3 },
         Thrust = -1,
      },
   },
   ...
}

If you do set terminal thrust, it is also best to set Thrust of all non-terminal phases. This ensures the missile resumes normal thrust should it happen to miss.

Phases = {
   ...
   -- Other phases
   {
      Distance = 400,
      ...
      Change = { Thrust = 300, },
   },
   ...
}

Also be sure to read up on the wiki on calculating turning radius from the displayed turning rate. Since many profiles involve a 90-degree turn in the terminal phase, knowing the radius will help tune altitude (or depth) and the terminal phase ground distance.

Bottom-attack Torpedoes

Approaches 50 meters below target. In general, (closing depth)^2 + (terminal phase ground distance)^2 should be greater than (torpedo turn radius)^2.

Config = {
   MinAltitude = -500,
   DetonationRange = nil,
   DetonationAngle = 30,
   LookAheadTime = 2,
   LookAheadResolution = 3,

   Phases = {
      {
         Distance = 175,
      },
      {
         Distance = 50,
         AboveSeaLevel = false,
         MinElevation = 10,
         Altitude = -50,
         RelativeTo = 2,
      },
   },
}

Javelin-style Missiles

This assumes vertical launch with ejectors or horizontal launch from high-flying (>100 meters) aircraft.

If not the case, change the last phase (closing phase) Altitude to 100 and RelativeTo to 3 to keep the approach altitude consistent.

Like bottom-attack torpedoes above, (closing altitude)^2 + (terminal phase ground distance)^2 should be at least (missile turn radius)^2.

Config = {
   MinAltitude = 0,
   DetonationRange = nil,
   DetonationAngle = 30,
   LookAheadTime = nil,
   LookAheadResolution = 3,

   AirProfileElevation = 10,
   AntiAir = {
      Phases = {
         {
         },
      },
   },

   Phases = {
      {
         Distance = 150,
      },
      {
         Distance = 50,
         AboveSeaLevel = true,
         MinElevation = 3,
         Altitude = 0,
         RelativeTo = 4,
         Evasion = { 20, .25 },
      },
   },
}

Javelin-style Missiles (Alternate)

Alternate high-altitude version. If launched >500 meters (ground distance) from the target, it will climb to 300 meters. Works best when the terminal phase Thrust is set to -1 (along with a suitably small terminal phase Angle).

If your normal engagement range is closer than 500 meters, change the Distance of the middle phase. The idea behind the middle phase is to prevent the missile from climbing to 300 meters should it miss (or while pursuing an air target that crashed).

Config = {
   MinAltitude = 0,
   DetonationRange = nil,
   DetonationAngle = 30,
   LookAheadTime = nil,
   LookAheadResolution = 3,

   AirProfileElevation = 10,
   AntiAir = {
      Phases = {
         {
         },
      },
   },

   Phases = {
      {
         Distance = 150,
      },
      {
         Distance = 500,
         AboveSeaLevel = true,
         MinElevation = 3,
         Altitude = 0,
         RelativeTo = 4,
         Evasion = { 20, .25 },
      },
      {
         Distance = 50,
         AboveSeaLevel = true,
         MinElevation = 3,
         Altitude = 300,
         RelativeTo = 0,
         Evasion = { 20, .25 },
      },
   },
}

Duck-under Missiles

Approaches by skimming the sea. Dives ~100 meters from target to take advantage of underwater explosive buff.

Missile should be a full explosive missile with a single torpedo propeller or ballast tank (needs experimenting, but the propeller works well for my designs).

Config = {
   MinAltitude = -50,
   DetonationRange = nil,
   DetonationAngle = 30,
   LookAheadTime = 2,
   LookAheadResolution = 3,

   AirProfileElevation = 10,
   AntiAir = {
      Phases = {
         {
         },
      },
   },

   Phases = {
      {
         Distance = 50,
      },
      {
         Distance = 110,
         AboveSeaLevel = false,
         MinElevation = 10,
         Altitude = -25,
         RelativeTo = 2,
      },
      {
         Distance = 50,
         AboveSeaLevel = true,
         MinElevation = 3,
         Evasion = { 20, .25 },
      },
   },
}

ASROC-style Torpedoes

Meant for underwater targets only, but can switch to AA-mode if needed. Missile should more or less be a full torpedo (with ballast tanks and propellers) with a variable thruster.

Assumes horizontal launch close to sea level. If this isn't the case, adjust the closing phase altitude appropriately (it is meant to approach <50 meters above the sea).

Config = {
   MinAltitude = -500,
   DetonationRange = 15,
   DetonationAngle = 30,
   LookAheadTime = 2,
   LookAheadResolution = 3,

   AirProfileElevation = 10,
   AntiAir = {
      Phases = {
         {
         },
      },
   },

   Phases = {
      {
         Distance = 300,
      },
      {
         Distance = 400,
         AboveSeaLevel = true,
         MinElevation = 3,
         Altitude = 50,
         RelativeTo = 3,
      },
      {
         Distance = 50,
         AboveSeaLevel = true,
         MinElevation = 3,
         Altitude = 0,
         RelativeTo = 4,
         Evasion = { 20, .25 },
      },
   },
}

Plain Torpedoes

This is basically a copy of the bottom-attack torpedo profile but with less extreme closing depth.

Config = {
   MinAltitude = -500,
   DetonationRange = nil,
   DetonationAngle = 30,
   LookAheadTime = 2,
   LookAheadResolution = 3,

   Phases = {
      {
         Distance = 150,
      },
      {
         Distance = 50,
         AboveSeaLevel = false,
         MinElevation = 10,
         Altitude = -10,
         RelativeTo = 2,
      },
   },
}

"Ballistic" Missiles

Vertically-launched missiles (with ejectors) made up of: fins, short range thruster(s), fuel tanks, Lua receiver, APN (gain 10), warheads, and a seeker head of some sort (radar works). Guidance delay should be set to max.

Climbs up to ~350 meters, gets within 650 meters (ground distance) of the target, kills the short range thruster and then glides the rest of the way in. Undetectable by missile warners.

Config = {
   MinAltitude = 0,
   DetonationRange = nil,
   DetonationAngle = 30,
   LookAheadTime = 2,
   LookAheadResolution = 3,

   Phases = {
      {
         Distance = 650,
         Change = {
            When = { AltitudeGT = 100, },
            ThrustDuration = 0,
         },
      },
      {
         Distance = 50,
         AboveSeaLevel = true,
         MinElevation = 3,
         Altitude = 350,
         RelativeTo = 0,
      },
   },
}

blogroll

social