FullRange=pRange - value from the AllPlaneDB.dat file, for HurricaneMkIIb - 1000 km
If the first type of suspended tanks is chosen the next lines and values are used:
HurricaneMkIIb;Allies;1;England;USSR;None;1;Fighter;FBomber;None;None;1000;220;318;
333;606;0
HurricaneMkIIb;3500;3500;0;0;0;0;0;0;1;1;1;0;0;1;0;
1;0;0;2xDrop44;All
(these lines are used in my assembly of mods, in other versions options of arms can be others therefore I officially don't prepare files for mods of versions - each user has to correct independently files of the generator for the version)
So, when using the first type of suspended tanks (2xDrop44) FullRange is recalculated.
pCurrentRange := Trunc(pRange + ((pRange * (pFuelDT[LongRangeType] * 0.72)) / pFuel0));
pCurrentRange = 1000 + ((1000 * (333 * 0,72)) / 318) = 1000 + (1000 * 239) / 318 = 1000 + 751 =
1751 km
In this formula there is a transfer of liters to kilograms (333 * 0,72) and are calculated how many kilometers it is possible to fly by on 239 kg of additional fuel if 318 kg of fuel in internal tanks are spent for 1000 km.
FullRange=pCurrentRange
Then fighting radius in meters taking into account a reserve is calculated. For fighters of 20%, for bombers of 10%.
Radius := Trunc((pCurrentRange / 2 * 1000) - ((pCurrentRange / 2 * 1000)/100*20))
Radius = (1751 / 2 * 1000) - ((1751 / 2 * 1000) / 100 * 20)) = 875500 - (875500 / 100 * 20) = 875500 - 175100 = 700400m (700km)
According to radius search of the purpose is carried out.
When the purpose is defined need of installation of suspended tanks is calculated.
tmpRadius := Trunc((FullRange / 2) - ((FullRange / 2)/100*45));
tmpRadius = (1751 / 2) - ((1751 / 2) /100 * 45) = 875 - (875 / 100 * 45) = 875 - 394 = 481km - it is fighting radius with suspended tanks and a reserve 45%
distance to the purpose - misDist = 376 km
Comparison misDist <= tmpRadius gives that in this departure suspended fuel tanks are superfluous.
By calculations everything is correct. But I understood where here a mistake - refusing tanks I don't check availability of the purpose without tanks. Sometimes it is useful to return to these calculations.
In the flowing, developed version I will add check and if the purpose is available without tanks with a reserve 45% of tanks won't be. Otherwise they will remain.