ciribob / DCS-CTLD

Complete Troops and Logistics Deployment for DCS World
167 stars 53 forks source link

JTAC Laser low accuracy with moving targets #108

Open m1n91 opened 5 months ago

m1n91 commented 5 months ago

Hi guys and thanks for your hard work.

The JTAC auto lase is rather poor with moving targets,

From what I can see, the update rate is rather slow. A fast update rate would cure this, or a clever equation that predicts the future position based on it's trajectory and speed.

RexAttaque commented 4 months ago

The update rate of the JTAC laser spot is already determined based on the speed of the moving target and a reference length of 5 meters (max distance the target is allowed to drive before the laser spot moves to follow).

If you're not having success on moving targets, that's because the laser actually needs to anticipate movements slightly for good effect, even more with wind. You can turn on the JTAC special options menu in the script and allow the use of the laser spot correction option in the F10 menus. With it enabled, the laser will anticipate the target movements and bomb drift from wind (tested with GBU-12s).

m1n91 commented 4 months ago

HI RexAttaque and thanks for your reply.

Further to my last,

Simply changing:

local maxUpdateDist = 5

to

local maxUpdateDist = 0.01

Solves everything

No need for wind/speed correction factors at all.

RexAttaque commented 4 months ago

Could you provide a video of what exactly the problem is? In your original answer you said speed correction factors helped but those lase off of the target, not on target which is what you are doing by changing this value.

5m is a perfectly reasonable distance to update the laser spot, it's about 1 tank length and anything other than a tank will be destroyed just fine if the hit is 1m behind. A distance of 1cm has an insane performance cost and will not be kept for CTLD I can already tell you that. The parameter will be moved to the config part of CTLD however.

What is the wind speed at the target altitude, what is the speed of the vehicules you're trying to hit ? Is this in MP where desync can take place (and was an issue in the past for lasers) ?

m1n91 commented 4 months ago

CTLD TRACKS.zip Hi Rex,

I have attached a whole host of track files with a varying update resolution applied.

The original is terrible as you can see, at least with my weapon of choice.

0.01M also seems unnecessary.

1M works great on larger targets,

Very small fast targets require down to 0.5M I feel.

As for performance cost, This is beyond my expertise, but given how much else is going on in DCS. I can't imagine it's too much to ask.

RexAttaque commented 4 months ago

I'll have a look at the tracks later, thank you. What is your weapon of choice ? If it's the APKWS I'm even more confused by your statement that wind/speed corrections helped, it's also what I'd expect would work the least well with a 5m distance update.

I'll also renew my question that IS important, was this in MP ? Desync has been known to impact the refreshing of the laser spot and cause terrible accuracy, but worked perfectly fine in SP.

Finally, calling this update function thousands of times a second HAS a significant cost, remember also that CTLD can be used in complex missions to start with and that DCS runs all of the game mechanics on a single core which does get saturated on large servers and results in desync etc. 1 meter is much more reasonable already, and again this value will be moved to the config portion of CTLD so that it is easy for users to modify.

m1n91 commented 4 months ago

Hi Rex,

Weapons I've tried this was in recent time are the Hellfire. I imagine APKWS will behave similarly as it leads ahead by itself just like the hellfire.

This is in SP.

Whilst a GBU12/or larger of course will still destroy a target if it lands close/in the blast radius. Smaller munitions won't hit dead on and thus won't kill/always kill.

Going down to 1M/ or even 0.5M then does away with the need for wind/speed correction requirements.

RexAttaque commented 4 months ago

Ok so wind/speed corrections should not be used for firing smart weapons. None of the Paveway II series (GBU-12, GBU-10 etc.) lead their targets which is the use case for such corrections. Sorry I didn't explain this better. The laser goes off of the target (it goes in front of it to anticipate) when using corrections.

5m is starting to be a lot for direct weapons indeed, I'll try with 2-3m which should be more than enough. If a weapon leads on its own, going below the length of the vehicules won't change anything.

However, it may also be due to the fact that the laser is 2m above target "center" to correct for the fact that some vehicules have their "center" below ground. Basically if the vehicule you are aiming at does have a correct "center" (ie on ground or close), and you lase 2m above, then the missile might go over the target unless it happens to be higher than 2m wherever the laser is.

You should take a look at the pull request documentation for the wind/speed corrections and moving vehicule tracking. #79