FGRadioTransmission::FGRadioTransmission() {
- _receiver_sensitivity = -110.0; // typical AM receiver sensitivity seems to be 0.8 microVolt at 12dB SINAD
+ _receiver_sensitivity = -105.0; // typical AM receiver sensitivity seems to be 0.8 microVolt at 12dB SINAD
/** AM transmitter power in dBm.
* Typical output powers for ATC ground equipment, VHF-UHF:
}
+double FGRadioTransmission::receiveBeacon(double lat, double lon, double elev, double heading, double pitch) {
+
+
+ _transmitter_power = 36;
+ _tx_antenna_height += 0.0;
+ _tx_antenna_gain += 0.5;
+ elev = elev * SG_FEET_TO_METER;
+ double freq = _root_node->getDoubleValue("station[0]/frequency", 118.0);
+ int ground_to_air = 1;
+ string text = "Beacon1";
+ double comm1 = getFrequency(1);
+ double comm2 = getFrequency(2);
+ if ( !(fabs(freq - comm1) <= 0.0001) && !(fabs(freq - comm2) <= 0.0001) ) {
+ return -1;
+ }
+ SGGeod tx_pos = SGGeod::fromDegM( lon, lat, elev );
+ double signal = ITM_calculate_attenuation(tx_pos, freq, ground_to_air);
+
+ return signal;
+}
+
+
/*** Receive ATC radio communication as text
***/
void FGRadioTransmission::receiveATC(SGGeod tx_pos, double freq, string text, int ground_to_air) {
double num_points= (double)elevations.size();
- _elevations.push_front(point_distance);
- _elevations.push_front(num_points -1);
+ elevations.push_front(point_distance);
+ elevations.push_front(num_points -1);
- int size = _elevations.size();
+ int size = elevations.size();
double *itm_elev;
itm_elev = new double[size];
for(int i=0;i<size;i++) {
- itm_elev[i]=_elevations[i];
+ itm_elev[i]=elevations[i];
}