From 135c544f6e6a95510743b33da8b790c9a74ef854 Mon Sep 17 00:00:00 2001 From: adrian Date: Sun, 4 Sep 2011 16:13:47 +0300 Subject: [PATCH] bugfix --- src/ATC/trafficcontrol.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ATC/trafficcontrol.cxx b/src/ATC/trafficcontrol.cxx index f49026f48..4a8fa7cde 100644 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@ -834,7 +834,7 @@ double FGATCController::calculate_attenuation(FGTrafficRecord * rec, FGAirportDy if (distance_m > 400000) return -1.0; - int e_size = (deque::size_type)max_points; + unsigned int e_size = (deque::size_type)max_points; while (_elevations.size() < e_size) { probe_distance += point_distance; @@ -888,14 +888,16 @@ double FGATCController::calculate_attenuation(FGTrafficRecord * rec, FGAirportDy // !!! small aircraft have portable transmitters which operate at 36 dBm output (4 Watts) // later store this value in aircraft description // ATC comms usually operate high power equipment, thus making the link asymetrical; this is ignored for now + double transmitter_power = 43.0; + double antenna_gain = 2.0; if(ground_to_air) - double transmitter_power = 49.0; + transmitter_power = 49.0; else - double transmitter_power = 43.0; + transmitter_power = 43.0; if(ground_to_air) - double antenna_gain = 5.0; //pilot plane's antenna gain + Controller antenna gain + antenna_gain = 5.0; //pilot plane's antenna gain + Controller antenna gain else - double antenna_gain = 2.0; //pilot plane's antenna gain + AI aircraft antenna gain + antenna_gain = 2.0; //pilot plane's antenna gain + AI aircraft antenna gain double link_budget = transmitter_power - receiver_sensitivity + antenna_gain;