dcs-liberation / dcs_liberation

DCS World dynamic campaign.
GNU Lesser General Public License v3.0
712 stars 185 forks source link

Schedule in flight refuelling for long range packages #919

Open SnappyComebacks opened 3 years ago

SnappyComebacks commented 3 years ago

Is your feature request related to a problem? Please describe. If the distance between the starting airbase and target is too great, the package may not reach the destination, or successfully return.

Describe the solution you'd like Add an option to add a refueling waypoint for the package. Ideally the tankers would be in places dictated by player, planned similarly to carriers and the refueling waypoint would be at their position. An alternative would be spawning a tanker somewhere in the middle of the journey between airport and target.

DanAlbert commented 3 years ago

One concern is that we'd need to guess at how long it would take the flight/package to refuel, and any waypoints past the refueling point would be delayed to handle that. Guess too low and the package cohesion is broken. Guess too high and you get a long hold while you wait for your schedule.

Not a problem for player-only flights, of course.

SnappyComebacks commented 3 years ago

Yes that's certainly a challenge. I would suppose too long is better than too short. If the AI gets itself organized into a tanker queue (I think that's the built in behavior, will have to check), one approach to timing could be (with assumption that all planes in the package are the same):

refuel_delay_time = buffer_time + number_of_refueling_planes * (time_to_connect_from_formation_to_tanker + expected_fueling_amount / tanker_fuel_flow)

Mustang-25 commented 3 years ago

I would think that one way to mitigate long delays would be to combine the refueling point and the hold point so packages can just do both at the same time/in the same space.

Would the be AI smart enough to refuel from multiple tankers if they're there's more than one tanker and a large strike package?

DanAlbert commented 3 years ago

I would think that one way to mitigate long delays would be to combine the refueling point and the hold point so packages can just do both at the same time/in the same space.

My plan was to put them at the join point. If you need to get get on the way in just leave the hold early to meet with the tanker.

AI tasking here is going to be hard. The formula above is right, but it's impossible to predict expected_fueling_amount for AI that uses AB unpredictably. expected_fueling_amount would need to always be max - bingo, essentially.

SnappyComebacks commented 3 years ago

I messed with a purely AI refueling mission of 16 (4 flights of 4) F-16s at 30% fuel and 2 tankers. The refueling waypoint the flights was placed two on one tanker's track, and two on the other's.

Would the be AI smart enough to refuel from multiple tankers if they're there's more than one tanker and a large strike package?

I didn't mess around too much, but it's appearing like the flights will choose the tanker that they are closest to when they reach the refueling waypoint. So if you wish to use multiple tankers in parallel, each flight's refueling waypoint need to be placed near the tanker you want them to refuel at. The tankers must stay on the same waypoint to refuel too (so circular/racetrack orbit is required, or a really long leg in theory), as when the tanker switches to the next waypoint the AI planes forget about refueling.

It also appears AI refueling can take a longer amount of time than I thought.

Check out the Tacview and mission here, if interested in seeing how long AI refueling can take.

but it's impossible to predict expected_fueling_amount for AI that uses AB unpredictably.

Would leveraging Restrict Afterburner be a good idea?

HILOK commented 3 years ago

could it be a solution to postpone AAR to after TOT, i.e. during egress/return to base? this way package sync would not be such an issue.

SnappyComebacks commented 2 years ago

More considerations here:

What if the tanker type is incompatible with some of the package's flights? IE the tanker is probe and drogue type and a flight is boom type? Do the incompatible aircraft follow (in Mission Editor speak) the tanker? Do they racetrack independently for a while?

How should tanker flight size be handled? If the tanker flight is size 2, the second tanker isn't used for refueling at all.

How to handle multiple tankers?