<%
Function Log10(X)
Log10 = Log(X) / Log(10)
End Function
Function FreeSpaceLoss(mhz, miles)
first = 20*Log10(mhz)
sec = 20*Log10(miles)
FreeSpaceLoss = first + sec + 36.6
End Function
Function RxSignalLevel(txPower, txCableLoss, txAntennaGain, FSL, rxAntennaGain, _
rxCableLoss)
RxSignalLevel = txPower - txCableLoss + txAntennaGain - FSL + rxAntennaGain _
- rxCableLoss
End Function
Function SystemOperatingMargin(rxSignalLevel, rxSensitivity)
SystemOperatingMargin = rxSignalLevel - rxSensitivity
End Function
Dim FSL
Dim RSL
Dim SOM
Dim variables
Dim strItem
Dim errorThrown
Dim submittedButtonVal
Set variables=Server.CreateObject("Scripting.Dictionary")
Set math=Server.CreateObject("Scripting.Dictionary")
For Each strItem In Request.Form
If (isNull(Request.Form(strItem))) Or (isEmpty(Request.Form(strItem))) Or (Len(Request.Form(strItem)) = 0) Then
variables.Add strItem, ""
math.Add strItem, "0"
ElseIf (strItem = "submit") Or (strItem = "submitted") Then
'//Do Nothing
Else
If Not isNumeric(Request.Form(strItem)) Then
errorThrown = "Please enter only numeric values:"
variables.Add strItem, ""
math.Add strItem, "0"
Else
variables.Add strItem, Request.Form(strItem)
math.Add strItem, Request.Form(strItem)
End If
End If
Next
If Len(variables.item("rxSensitivity")) = 0 Then
variables.item("rxSensitivity") = "-83"
math.item("rxSensitivity") = "-83"
End If
If Len(variables.item("mhz")) = 0 Then
variables.item("mhz") = "2400"
math.item("mhz") = "2400"
End If
If (Len(variables.item("miles")) = 0) Or ( variables.item("miles") = "0" ) Then
submitted = "nothing"
infinite = "inf"
End if
If (Len(variables.item("mhz")) = 0) Or ( variables.item("mhz") = "0" ) Then
submitted = "nothing"
infinite = "inf"
End if
If Request.Form("submitted") = "submitted" Then
submittedButtonVal = "Re-Calculate"
If infinite = "inf" Then
FSL = "inf"
RSL = "inf"
SOM = "inf"
Else
If isEmpty(errorThrown) Then
FSL = Round(FreeSpaceLoss(math.item("mhz"), math.item("miles")), 1)
RSL = Round(RxSignalLevel(math.item("txPower"),math.item("txCable"),math.item("txAntenna"),FSL,math.item("rxAntenna"),math.item("rxCable")), 1)
SOM = Round(SystemOperatingMargin( RSL, math.item("rxSensitivity") ), 1)
End If
End If
results = "
" & _
"" & _
"| Free Space Loss: | " & _
"" & FSL & " | " & _
"
" & _
"" & _
"| Rx Signal Level: | " & _
"" & RSL & " | " & _
"
" & _
"| System Operating Margin: | " & _
"" & SOM & " |
" & _
"
Through the use of the Antenna Gains calculator it is possible to identify the necessary system antenna gain needed to ensure good transmission and signal strength.