BDArmory icon indicating copy to clipboard operation
BDArmory copied to clipboard

Bug report: Modular Missiles strange target lead behaviour

Open Skyer25 opened this issue 5 years ago • 3 comments

ISSUE TYPE
  • Bug Report (Something is broken)
KSP and BDA Version

1.61

1.2.4.0

OS / ENVIRONMENT

Windows 10

FAR Mod installed

SUMMARY

Radar guided Anti air missiles (AAMs) don't lead their target when the max off bore setting is set to less than 90° and radar guided missiles with off bore more than ~ 150° always want to align with the horizon and only then target the target (mainly a problem for Ground to Air Vertical launch missiles)

Heatseekers only appear to lead their target when max off bore is set to 360° and when its set above 90° they will not lead their target but they will see their target even if its behind them (that doesn't happen below 90° anymore)

A video of the tests I made https://youtu.be/jJtFCEW-2gs

STEPS TO REPRODUCE

make a BDA modular missile with AAM guidance and the targeting type to test (Heat or radar) and Max off boar test can be done at 90° 180° and 360°. then launch the missile at an flying target of choice

Log Files

KSP.log output_log.txt

Skyer25 avatar Mar 15 '19 19:03 Skyer25

Found the cause. This line of code causes the missile to stop leading the target and just head at the target without taking target velocity and accel into account. I understand the intent. You want to the missile to have a less accurate target location if it loses sight of the target. I think it would be better to remove this line and allow the missile to continue toward the target with leading info. I think IRL the missile should continue on course to the last know position but that would still take velocity and accel into account from when it could see the target, and once it was close enough it may have a target reenter view.

With the line gone I have missile with 30* max off boresight hit targets as they should.

Tangentially if true APN was implemented it would improve missiles even more as the missile may lose sight of the target, but on an APN course it would have the target re-enter view as it got closer to impact. The current guidance is very good, but with APN unless a target is pulling major GForce the missile should have to do very little maneuvering once it has a APN collision course. I have tried and continue to try to code it myself, but with very little knowledge of vectors or even unity for that matter I haven't got it working.

svm420 avatar Jun 04 '19 01:06 svm420

I believe this is the issue i was running into in #637. The missile i was using when i ran into the bug was a reproduction of the AIM-54 Phoenix that i was attempting to get as close as possible to the real thing so i set its max off boresight lower than the standard 90 degrees and it displayed the exact same issues. I think the difference between the two is that my missiles were being fired at much longer ranges though which resulted in the not leading th target appearing as the missile entirely failing to track.

Isenderen avatar Jun 05 '19 00:06 Isenderen

Thanks guys. It seems it will be easy to fix .

@svm420 Regarding APN I was looking to this https://en.m.wikipedia.org/wiki/Proportional_navigation

And it doesn't seem to be very difficult to implement. I might give it a try (in fact I think the RCS vacuum guidance uses the relative velocity approach)

jrodrigv avatar Jun 05 '19 06:06 jrodrigv