}
+/*** TODO: receive navaid
+***/
+double FGRadio::receiveNav(SGGeod tx_pos, double freq, int transmission_type) {
+
+ // need to implement transmitter power
+ if ( _propagation_model == 1) {
+ return LOS_calculate_attenuation(tx_pos, freq, 1);
+ }
+ else if ( _propagation_model == 2) {
+ return ITM_calculate_attenuation(tx_pos, freq, 1);
+ }
+
+ return -1;
+
+}
+
/*** Receive ATC radio communication as text
***/
void FGRadio::receiveATC(SGGeod tx_pos, double freq, string text,
void setFrequency(double freq, int radio);
double getFrequency(int radio);
void setTxPower(double txpower) { _transmitter_power = txpower; };
+ void setPropagationModel(int model) { _propagation_model = model; };
// transmission_type: 0 for air to ground 1 for ground to air, 2 for air to air, 3 for pilot to ground, 4 for pilot to air
void receiveATC(SGGeod tx_pos, double freq, string text, int transmission_type);
void receiveChat(SGGeod tx_pos, double freq, string text, int transmission_type);
- void setPropagationModel(int model) { _propagation_model = model; };
+ // returns signal quality
+ // transmission_type: 0 for VOR, 1 for ILS
+ double receiveNav(SGGeod tx_pos, double freq, int transmission_type);
};