Recon Altitudes and Recon Level
Posted: Thu 17 Mar 2011 1:03 pm
Are recon altitudes having an effect on the recon level in the current SEOW?
An Open Source community for historical flight simulation.
https://seowhq.net/seowforum/
Code: Select all
2433 'This function calculates the reconnaissance detection radius for a given altitude.
2434 Private Function dblReconRadius(ByVal dblAltitude As Double) As Double
2435 Try
2436 dblReconRadius = Max(dblMinReconRadius, Min(dblMaxReconRadius, dblReconRadiusScale * dblAltitude))
2437 Catch ex As Exception
2438 Call basMess.MessageBox("basMissionBuilder.dblReconRadius: " _
2439 & Err.Number & " " & Err.Description, vbCritical)
2440 End Try
2441 End Function
2442
2443
2444 'This function calculates the correction to a object's recon level due to being spotted by
2445 'an enemy air reconnaissance flight. The correction depends on distance between spotter
2446 'aircraft and the object, as well as the aircraft altitude and prevailing weather conditions.
2447 Private Function getReconIncrementFromAir(ByVal dblSeparation As Double, ByVal dblReconAltitude As Double) As Integer
2448 Dim dblSeparationFactor As Double
2449 Dim dblAltitudeFactor As Double
2450 Dim dblVisibilityFactor As Double
2451 Dim dblCloudHeightFactor As Double
2452 Dim dblDaylightFactor As Double
2453 Dim intReconGain As Integer
2454 Dim intReconEstimate As Integer
2455
2456 Try
2457 'We will use a multifactorial model for the recon correction.
2458 'The separation factor declines linearly with horizontal distance, to a minimum of 0.5
2459 'at the maximum radius for this recon altitude.
2460 dblSeparationFactor = 1.0 - 0.5 * dblSeparation / dblReconRadius(dblReconAltitude)
2461
2462 'The altitude factor declines exponentially with altitude from 1 at minimum recon altitude, to a
2463 'minimum of 0.81 at the maximum recon altitude.
2464 dblAltitudeFactor = Math.Exp(-0.2 * (dblReconAltitude - dblMinReconAltitude) _
2465 / (dblMaxReconAltitude - dblMinReconAltitude))
2466
2467 'The visibility factor declines exponentially with visibility from 1 at clear conditions, to a
2468 'minimum of 0.22 in thunderstorm or rain conditions.
2469 dblVisibilityFactor = Math.Exp(-CDbl(intVisibility) / 5.0)
2470
2471 'The cloud height factor is reduced where the spotter plane is above the cloud base unless
2472 'visibility is clear.
2473 dblCloudHeightFactor = 1.0
2474 If dblReconAltitude > intCloudBase And intVisibility > 2 Then
2475 dblCloudHeightFactor = 0.75
2476 End If
2477
2478 'The daylight factor is a simple step function, only 0.3 in night hours.
2479 dblDaylightFactor = 1.0
2480 If isDaylight = False Then
2481 dblDaylightFactor = 0.3
2482 End If
2483
2484 'Here is the recon gain calculation.
2485 intReconGain = CInt(CDbl(intMaximumReconGain) * _
2486 dblSeparationFactor * _
2487 dblAltitudeFactor * _
2488 dblVisibilityFactor * _
2489 dblCloudHeightFactor * _
2490 dblDaylightFactor)
2491
2492 getReconIncrementFromAir = Math.Max(0, intReconGain)
2493
2494 Catch ex As Exception
2495 Call basMess.MessageBox("basMissionBuilder.getReconIncrementFromAir: " _
2496 & Err.Number & " " & Err.Description, vbCritical)
2497 End Try
2498
2499 End Function
2500
Code: Select all
2889 'This function calculates the reconnaissance detection radius for a given altitude.
2890 Private Function dblReconRadius(ByVal dblAltitude As Double) As Double
2891 Try
2892 dblReconRadius = Math.Max(dblMinReconRadius, Min(dblMaxReconRadius, dblReconRadiusScale * dblAltitude))
2893 Catch ex As Exception
2894 Call basMess.MessageBox("basMissionBuilder.dblReconRadius: " _
2895 & Err.Number & " " & Err.Description, vbCritical)
2896 End Try
2897 End Function