View Single Post
Old 03-01-14, 12:19 AM   #2917
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Working on a new patch to the SHSim.act file that would decrease the attacker's sonar signal strength returned if the attackee is moving slow enough and is close enough to the bottom.

Right now I'm in the discovery phase of the development. I've defined the following variables:
- speed above which signal strength is not reduced at all - 2.0 knots (UpperSpeed)
- speed below which signal strength can be reduced - 1.0 knots (LowerSpeed)
- depth above which signal strength is not reduced at all - 25m (UpperDepth)
- depth below which signal strength can be reduced - max depth for location - let's say it's 40m for this example (LowerDepth)
- minimum signal strength reduction - 20%
- maximum signal strength reduction - 60%

This means if attackee's speed is > 2 knots or depth is between 0-25m then signal strength is not reduced at all. Depth % is 0.0 and Speed % is 0.0

If attackee's speed or depth is between the Upper and Lower limits then:
- find difference between depth Lower and Upper limits - i.e. 40m - 25m = 15m
- subtract attackee's current depth from Lower limit - i.e. 40m - 32m = 8m
- calculate (depth difference - 8m / limits difference - 15m) and subtract this from 1.0 thus getting % of limit range used. Thus the closer you are to LowerDepth the higher the % - this is Depth % (0.53333)
- find difference between speed Upper and Lower Limits - i.e. 2.0 - 1.0 = 1.0 knots
- subtract attackee's current speed from Upper limit - i.e. 2.0 - 1.3 = 0.7 knots
- calculate (speed difference - 0.7 / limits difference - 1.0) thus getting % of limit range used. Thus the closer you are to LowerSpeed the higher the % - this is Speed % (0.7)

If attackee's speed is <= 1.0 knots and depth >= 40m then Speed % and depth % will be 1.0

- calculate difference between max and min signal strength reduction (0.60 - 0.20 = 0.40) - this is DeltaSignalStrengthRed
- get a random number in range 0.0 - 1.0 - let's say random number is 0.39
- multiply random number (0.39) by DeltaSignalStrengthRed (0.4) and add min signal strength reduction to it (0.20) thus getting the signal strength reduction - 0.356
- multiply result above (0.356) by Depth % (0.53333) - new result is 0.18987
- multiply result above (0.18987) by Speed % (0.7) - new result is 0.13291

Signal signal reduction for attacker's sonar is 13.291% for this example

What do you all think about these values? Look good or need different values?

Last edited by TheDarkWraith; 03-01-14 at 12:44 AM.
TheDarkWraith is offline   Reply With Quote