Posted: Wed Sep 27, 2006 3:13 pm
While working with the source recently I got curious about the technical details of missile locks. I found the code quite informative and thought perhaps some other people might as well, although I’m sure a lot of people know this stuff already. So this is a brief summary of what I found and a few of my thoughts on the subject. They might all be wrong. I will keep the interpretation to a minimum as I’m not enough of a vet to make too many grand statements. All my specific numbers are based on the current version of DN.
In the code missile lock is a floating point value with a range of 0.0 to 1.0. With 0.0 corresponding to no lock and 1.0 corresponding to full lock.
The effect of lock is to modify the effectiveness of the algorithm used by the missile to predict where the target will be at the time of collision. This algorithm uses the relative velocity of the target and missile, combined with the lock value as follows:
Vector dV = m_target->GetVelocity() * m_lock - myVelocity;
When there is no lock (0.0), the algorithm effectively ignores the velocity of the target and simply aims for it’s current position. When there is full lock (1.0), the algorithm performs a first-order prediction of where the target will be, based on the assumption that it is moving at constant velocity. Values in between cause it to under-predict the motion of the ship.
Countermeasures (chaff) attempt to stop missiles from hitting you. Missile lock has no influence over the effectiveness of countermeasures. Countermeasures act on every missile targetted at you and spoof each one in turn if the following condition is true:
random(0, c) > random(0, m)
Where c is the countermeasure effectiveness and m is the missile countermeasure resistance, both determined by the core.
The incoming missile sound is pitch adjusted based on the highest lock value of all missiles targetted at your ship in the following line of code:
m_psoundMissileWarning->GetISoundTweakable()->SetPitch(0.75 + fBestLock/2);
So low pitch (speed x0.75) warning sounds indicate only unlocked missiles incoming, whereas high pitched sounds (speed x1.25) indicate at least one locked missile incoming. This may help conserve countermeasures if you think you can dodge an unlocked dumbfire for example.
Firing a missile at a target which you cannot see (ie, they just cloaked) is the same as firing at empty space, as you would expect.
You can fire a missile with no target at all and it will act like a rocket. This isn’t useful very often, except it has the advantage that your target’s countermeasures cannot act on a missile which does not have them set as the target. For example, SRM Anti-Base 1 only has a countermeasure resistance of 1. Even countermeasure 1 has a 50% chance of spoofing the missile. Against countermeasure 3 you have a less than 1 in 6 chance of hitting. So in a bomber on bomber battle, if you think you can hit your enemy with most of your Anti-Bases launched rocket-style in a perfectly straight line, you’ll give yourself a better chance if you don’t target him/her/it.
The case where lock makes the biggest difference to missile tracking performance is when the unlocked prediction is most different from the locked prediction. This would seem to be when target velocity perpendicular to the missile’s direction is maximum. For example when a ship is flying from left to right across your screen in range at a constant speed. In this case a locked missile will predict target position very well, unless it can’t turn enough (which is a whole separate discussion). In contrast an unlocked missile will take a curved path, sliding in behind the ship, taking a lot longer and potentially exceeding the missile lifetime.
A couple of final footnotes, in DN, SRM Dumbfire and LRM Killer never lock, they always use the position only targetting algorithm. MRM Seeker 1, MRM Quickfire 1 and LRM Hunter 1 have a maximum lock value of 0.75 and so are unlikely to hit a target in the scenario from the previous paragraph.
I hope that was interesting. I don’t know what to do with this except post it here. So if this isn’t appropriate I apologise. If I’m totally wrong it’d be nice to know too.
In the code missile lock is a floating point value with a range of 0.0 to 1.0. With 0.0 corresponding to no lock and 1.0 corresponding to full lock.
The effect of lock is to modify the effectiveness of the algorithm used by the missile to predict where the target will be at the time of collision. This algorithm uses the relative velocity of the target and missile, combined with the lock value as follows:
Vector dV = m_target->GetVelocity() * m_lock - myVelocity;
When there is no lock (0.0), the algorithm effectively ignores the velocity of the target and simply aims for it’s current position. When there is full lock (1.0), the algorithm performs a first-order prediction of where the target will be, based on the assumption that it is moving at constant velocity. Values in between cause it to under-predict the motion of the ship.
Countermeasures (chaff) attempt to stop missiles from hitting you. Missile lock has no influence over the effectiveness of countermeasures. Countermeasures act on every missile targetted at you and spoof each one in turn if the following condition is true:
random(0, c) > random(0, m)
Where c is the countermeasure effectiveness and m is the missile countermeasure resistance, both determined by the core.
The incoming missile sound is pitch adjusted based on the highest lock value of all missiles targetted at your ship in the following line of code:
m_psoundMissileWarning->GetISoundTweakable()->SetPitch(0.75 + fBestLock/2);
So low pitch (speed x0.75) warning sounds indicate only unlocked missiles incoming, whereas high pitched sounds (speed x1.25) indicate at least one locked missile incoming. This may help conserve countermeasures if you think you can dodge an unlocked dumbfire for example.
Firing a missile at a target which you cannot see (ie, they just cloaked) is the same as firing at empty space, as you would expect.
You can fire a missile with no target at all and it will act like a rocket. This isn’t useful very often, except it has the advantage that your target’s countermeasures cannot act on a missile which does not have them set as the target. For example, SRM Anti-Base 1 only has a countermeasure resistance of 1. Even countermeasure 1 has a 50% chance of spoofing the missile. Against countermeasure 3 you have a less than 1 in 6 chance of hitting. So in a bomber on bomber battle, if you think you can hit your enemy with most of your Anti-Bases launched rocket-style in a perfectly straight line, you’ll give yourself a better chance if you don’t target him/her/it.
The case where lock makes the biggest difference to missile tracking performance is when the unlocked prediction is most different from the locked prediction. This would seem to be when target velocity perpendicular to the missile’s direction is maximum. For example when a ship is flying from left to right across your screen in range at a constant speed. In this case a locked missile will predict target position very well, unless it can’t turn enough (which is a whole separate discussion). In contrast an unlocked missile will take a curved path, sliding in behind the ship, taking a lot longer and potentially exceeding the missile lifetime.
A couple of final footnotes, in DN, SRM Dumbfire and LRM Killer never lock, they always use the position only targetting algorithm. MRM Seeker 1, MRM Quickfire 1 and LRM Hunter 1 have a maximum lock value of 0.75 and so are unlikely to hit a target in the scenario from the previous paragraph.
I hope that was interesting. I don’t know what to do with this except post it here. So if this isn’t appropriate I apologise. If I’m totally wrong it’d be nice to know too.