Page 1 of 1

How does a missile work?

Posted: Mon Jan 23, 2012 4:10 am
by Commander Learner
I've noticed that in 1.76 (or maybe earlier...I'm outdated), missiles no longer have an "accuracy" variable. By looking at the missile AI.plist, I deduce that this tells the missile what to do when ECM'ed or when in desired range of the target.

So far, I don't see anything that tells the missile to "take the shortest path to your target", and missiles I fire still go round and round (yes they hit...but it could have been done faster). Is there any OXP missile that hits its target quickly?

And when the missile sets its state to DETONATE, is the damage controlled by weapon_energy in shipdata.plist?

Re: How does a missile work?

Posted: Mon Jan 23, 2012 7:31 am
by Thargoid
The command you're overlooking in the AI is performIntercept. That's the one which tells the missile to "take the shortest path to your target". To the best of my knowledge the accuracy shipdata key still exists and works for fine-tuning missile flight (and weapon accuracy), but I may have missed something.

And yes, missile damage is controlled by the shipdata weapon_energy key. When it detonates, the blast radius is set, the missile told to do damage within that radius and then to explosively remove itself from the game (all in the AI "DETONATE" state). Technically it does damage before it explodes, but in practice you won't notice that. It does maximum damage at the centre of the blast radius, with decreasing damage the further out you go in the sphere. Hence why missiles don't always kill you (it depends where in the sphere you happen to be when it hits you, depending somewhat on your FPS rate and your current TAF setting) and why they're more deadly against stationary opponents than ones that they are chasing (usually).

Re: How does a missile work?

Posted: Mon Jan 23, 2012 8:41 am
by Eric Walch
Commander Learner wrote:
I've noticed that in 1.76 (or maybe earlier...I'm outdated), missiles no longer have an "accuracy" variable.
There has never been an accuracy defined for the default missiles. That does not mean it is not used. The value is even used at two places. One use accepts a range between -5 and 10 and the other a range between 0 and 10.

The first one has already been present in oolite 1.65 and influences the spiraling by modifying the pitch. -5 is heavy spirals and 10 is almost straight ahead. When not defined, a random value is selected here.

The second use is in predictive tracking. With 0 it aims for the current position of the target while with 10 it aims to a location in front of the target based on missile and target speed. So with 10 it aims at the calculated interception point. Any other value aims at a point in between those two. When no accuracy is defined, this defaults to 0.

Oolite 1.74 and earlier had an interesting bug that they didn't anticipate on the target flying towards the missile and missiles with an accuracy defined were in fact fleeing from missiles when flying fast towards missiles :lol:
That there were never bug reports about this, is because almost no oxper defined an accuracy. I thing the anti ballistic missiles from nukes.oxp are the only I have ever seen with a defined accuracy. Its definitely an underused property. :wink:

The wiki is not fully complete in this. Until febr. 2008 it did mention the first use and than the wiki description was replaced by the second use of accuracy, while in fact the influence on pitch with an accuracy range of -5 to 10 is still present. The info should probably be that it is clamped between -5 and 10 while positive values add a predictive tracking to the accuracy.

Re: How does a missile work?

Posted: Mon Jan 23, 2012 10:20 am
by Switeck
The "accuracy" variable is also used by asteroid miner ships...which for them works differently than it does for missiles.

Re: How does a missile work?

Posted: Mon Jan 23, 2012 12:21 pm
by Eric Walch
Thargoid wrote:
It does maximum damage at the centre of the blast radius, with decreasing damage the further out you go in the sphere.
The used distance it the distance from the blast centre to the outside of the collision radius from the target. For calculating damage based on distance, the damage is divided by the squared distance. That means with a distance close to zero meters, the damage reaches infinity. :evil: For the missiles the actual distance on detonation is about 20 meters. But as stated elsewhere the actual distance can be much smaller on low FPS or high TAF values.

Prior to Oolite 1.76 there used to be a bug in how the distance was corrected for the collision radius. This resulted in less damage for objects with a high collision radius. e.g. missiles did almost no damage on the bad-rock from the asteroid mission. That is corrected in 1.76 and only the distance determines the damage.

Prior to Oolite 1.76 also an explosion inside the collision radius did no damage. That means when you triggered a collision with the AI "COLLISION" message, no damage was done. That is because this message triggered when the actual meshes touched each other and that is closer than the collision radius that only describes a sphere around the ship. That felt completely wrong, so that the damage inside the collision radius is since 1.76, the value defined for weapon_damage (without further distance correction).

Re: How does a missile work?

Posted: Mon Jan 23, 2012 3:01 pm
by SandJ
Slightly off-topic, but I know two things about missiles.

1. Quality control is awful
I knew a bloke who was quality control supervisor for an electronics firm who made the circuit boards for missile guidance systems. He assured me the quality is dreadful. "Most missiles are destroyed because of age or treaty, so they don;t get used. When they are used, nobody complains much if they miss. When the missiles are accurate, they kill people. The people making them know all this, so they don't care about the quality."

2. Missiles are different from hittiles.
According to my father-in-law, a career armourer, modern anti-aircraft missiles are intended to go bang when near or in front of an aircraft; the shock wave / shrapnel / enclosed wire mesh damages the aircraft sufficiently to prevent it flying. Job done. Actually trying to hit a fighter aircraft is just too damn hard.

Applied to the Ooniverse:

1: if a succession of missiles each behave slightly differently, that might be normal manufacturing variance.
2: the Oolite missiles sound like they are missiles, not hittiles.

Re: How does a missile work?

Posted: Sun Jan 29, 2012 3:39 pm
by DaddyHoggy
I worked for the MOD for 13 years as a missile guidance specialist (I used to refer to them as missiles and hitiles respectively but that used to upset Ahruman's sensibilities).

Given something like a MANPAD (Man portable Air Defence) missile such as SA-7, SA-18, Stinger are designed to self destruct after approximately 15 seconds of flight the electronics, especially on the former Soviet Union stuff I used to work on, is remarkable robust - we used to persuade the electronics and cooling system to last for many 10s of hours of testing

Re: How does a missile work?

Posted: Sun Jan 29, 2012 8:39 pm
by JensAyton
DaddyHoggy wrote:
I worked for the MOD for 13 years as a missile guidance specialist (I used to refer to them as missiles and hitiles respectively but that used to upset Ahruman's sensibilities).
I don’t object to the jargon, I just object to it being presented as “correct” terminology. :-)

Re: How does a missile work?

Posted: Tue Jan 31, 2012 12:32 am
by Cmdr Wyvern
I watched some show where the subject was early guided missiles, and aircraft that carried them into combat.

It was said commanders declared the age of air to air dogfighting with guns was over. They thought the missile was a perfect, one-shot-one-kill weapon. In practice, however, the missile was anything but.
According to one interviewed pilot, the failure to intercept rate of those early weapons was 70% if not worse. In his words, "If they were more accurate, they would've been called hittles instead."

Re: How does a missile work?

Posted: Wed Feb 01, 2012 11:15 am
by DaddyHoggy
I think what Ahruman objected to was me calling things that have to hit a target hitiles and things which don't missiles. And while I concur that from a language point of view a missile has always been a missile (be it a thrown stone, an arrow or a rocket powered device) I also believe language to be context based and to that end, within the "missile" community there has been a need to differentiate between flying weapons that need to hit the target to damage it and those that don't and therefore we've always referred to them as missiles or hitiles to avoid confusion. That is how language develops after all...

Re: How does a missile work?

Posted: Thu Feb 02, 2012 8:19 am
by Cmdr James
DaddyHoggy wrote:
That is how language develops after all...
I think it is rather the difference between normal everyday use of language and domain specific or "technical terms" people use. To most people, a missile is a missile, and a hitile is a ban pun.

It is rather like Organic food, to me as a chemist, almost everything considered food is organic. The confusion comes where we start using one form of terminology in an unexpected context.