Post by jtyotjotjipaefvj on Aug 24, 2017 19:12:13 GMT
After a long time of being frustrated at poor homing accuracy in any missile I could put out, I finally managed to make a missile that can reliably hit moving targets even when they're not launched from a collision course.
I'm fairly familiar with homing AI, having written a few of them myself, so I have a fairly good grasp of how they should fly and what variables to use for that. In my previous designs in CoaDE though, I have always used missiles with either one gimballed thruster or several without a gimbal, which seems to be a bad idea with this game's homing AI. Since the AI can't plan for velocity changes caused by turning burns, it usually just ends up oscillating on a close enough trajectory, unless you put the damping stupidly high, like it is on all the vanilla RC modules.
To circumvent this issue, I designed a missile with a single fixed-mount main thruster, as well as several extremely low-powered thrusters used for turning. Additionally, I made the thrusters use different fuels (methane for the RCS thrusters, hydrogen deuterium for the main one) and kept the burn times of both fuels close enough so that even if the RCS thrusters ran on full power for the whole flight, they wouldn't run out of juice.
The low-powered RCS thrusters placed symmetrically ahead and behind the center of mass mean that the missile can turn with almost no linear velocity change. And this allows me to drop the dampening factors for the homing behaviour extremely low, which results in very high accuracy. The result is a homing behaviour that first burns off all tangential velocity relative to the target, and then turns head-on and accelerates as fast as it can afford while maintaining the collision course. This kind of trajectory is quite robust and can land solid hits even when launched from a ship with several km/s tangential velocity. Below are the missile designs as well as some images from a test combat I did.
Missile design: dl.dropbox.com/s/e2fwt2zmixflxbr/20170824214926_1.jpg
RC module design: dl.dropbox.com/s/xz82ai53ux2tmiw/20170824214934_1.jpg
Start of combat. The launch ship has ~5 km/s perpendicular velocity but that's fine.
dl.dropbox.com/s/47168a75h5jnrem/20170824214538_1.jpg
Missiles start burning sideways to kill the perpendicular velocity:
dl.dropbox.com/s/9n6roe645c1lbwt/20170824214555_1.jpg
Once that's done, they turn towards the target and burn some more. This makes a nice curve of missiles heading for the target:
dl.dropbox.com/s/r4ftmc7eq9l678v/20170824214649_1.jpg
The first six missiles got lasered, but the seventh missile is a direct hit.
dl.dropbox.com/s/hom99mrckayq9x8/20170824214704_1.jpg
In fact every single missile after that hits as far as I can tell. Even after the ship is in pieces, they keep hitting the largest piece:
dl.dropbox.com/s/26bqvs97ac6lywc/20170824214738_1.jpg
Finally, here's what little remains of the gunship:
dl.dropbox.com/s/kxpiybkcrehbok8/20170824214806_1.jpg
I'm fairly familiar with homing AI, having written a few of them myself, so I have a fairly good grasp of how they should fly and what variables to use for that. In my previous designs in CoaDE though, I have always used missiles with either one gimballed thruster or several without a gimbal, which seems to be a bad idea with this game's homing AI. Since the AI can't plan for velocity changes caused by turning burns, it usually just ends up oscillating on a close enough trajectory, unless you put the damping stupidly high, like it is on all the vanilla RC modules.
To circumvent this issue, I designed a missile with a single fixed-mount main thruster, as well as several extremely low-powered thrusters used for turning. Additionally, I made the thrusters use different fuels (methane for the RCS thrusters, hydrogen deuterium for the main one) and kept the burn times of both fuels close enough so that even if the RCS thrusters ran on full power for the whole flight, they wouldn't run out of juice.
The low-powered RCS thrusters placed symmetrically ahead and behind the center of mass mean that the missile can turn with almost no linear velocity change. And this allows me to drop the dampening factors for the homing behaviour extremely low, which results in very high accuracy. The result is a homing behaviour that first burns off all tangential velocity relative to the target, and then turns head-on and accelerates as fast as it can afford while maintaining the collision course. This kind of trajectory is quite robust and can land solid hits even when launched from a ship with several km/s tangential velocity. Below are the missile designs as well as some images from a test combat I did.
Missile design: dl.dropbox.com/s/e2fwt2zmixflxbr/20170824214926_1.jpg
RC module design: dl.dropbox.com/s/xz82ai53ux2tmiw/20170824214934_1.jpg
Start of combat. The launch ship has ~5 km/s perpendicular velocity but that's fine.
dl.dropbox.com/s/47168a75h5jnrem/20170824214538_1.jpg
Missiles start burning sideways to kill the perpendicular velocity:
dl.dropbox.com/s/9n6roe645c1lbwt/20170824214555_1.jpg
Once that's done, they turn towards the target and burn some more. This makes a nice curve of missiles heading for the target:
dl.dropbox.com/s/r4ftmc7eq9l678v/20170824214649_1.jpg
The first six missiles got lasered, but the seventh missile is a direct hit.
dl.dropbox.com/s/hom99mrckayq9x8/20170824214704_1.jpg
In fact every single missile after that hits as far as I can tell. Even after the ship is in pieces, they keep hitting the largest piece:
dl.dropbox.com/s/26bqvs97ac6lywc/20170824214738_1.jpg
Finally, here's what little remains of the gunship:
dl.dropbox.com/s/kxpiybkcrehbok8/20170824214806_1.jpg