22# error This library requires C++
25#include <simgear/compiler.h>
26#include <simgear/structure/subsystem_mgr.hxx>
30#include <simgear/math/sg_geodesy.hxx>
31#include <simgear/debug/logstream.hxx>
39 double _receiver_sensitivity;
40 double _transmitter_power;
41 double _tx_antenna_height;
42 double _rx_antenna_height;
43 double _rx_antenna_gain;
44 double _tx_antenna_gain;
45 double _rx_line_losses;
46 double _tx_line_losses;
48 double _terrain_sampling_distance;
50 std::map<std::string, double[2]> _mat_database;
51 SGPropertyNode *_root_node;
52 int _propagation_model;
53 double polarization_loss();
62 double ITM_calculate_attenuation(SGGeod tx_pos,
double freq,
int ground_to_air);
68 double LOS_calculate_attenuation(SGGeod tx_pos,
double freq,
int ground_to_air);
76 void calculate_clutter_loss(
double freq,
double itm_elev[], std::deque<std::string*> &materials,
77 double transmitter_height,
double receiver_height,
int p_mode,
78 double horizons[],
double &clutter_loss);
84 void get_material_properties(std::string* mat_name,
double &height,
double &density);
97 inline void setTxPower(
double txpower) { _transmitter_power = txpower; };
98 inline void setRxSensitivity(
double sensitivity) { _receiver_sensitivity = sensitivity; };
99 inline void setTxAntennaHeight(
double tx_antenna_height) { _tx_antenna_height = tx_antenna_height; };
100 inline void setRxAntennaHeight(
double rx_antenna_height) { _rx_antenna_height = rx_antenna_height; };
101 inline void setTxAntennaGain(
double tx_antenna_gain) { _tx_antenna_gain = tx_antenna_gain; };
102 inline void setRxAntennaGain(
double rx_antenna_gain) { _rx_antenna_gain = rx_antenna_gain; };
103 inline void setTxLineLosses(
double tx_line_losses) { _tx_line_losses = tx_line_losses; };
104 inline void setRxLineLosses(
double rx_line_losses) { _rx_line_losses = rx_line_losses; };
119 void receiveATC(SGGeod tx_pos,
double freq, std::string text,
int transmission_type);
125 void receiveChat(SGGeod tx_pos,
double freq, std::string text,
int transmission_type);
131 double receiveNav(SGGeod tx_pos,
double freq,
int transmission_type);
139 double receiveBeacon(SGGeod &tx_pos,
double heading,
double pitch);
void receiveATC(SGGeod tx_pos, double freq, std::string text, int transmission_type)
double getFrequency(int radio)
void setTxAntennaGain(double tx_antenna_gain)
void setRxSensitivity(double sensitivity)
double receiveNav(SGGeod tx_pos, double freq, int transmission_type)
static double dbm_to_watt(double dbm)
void setRxLineLosses(double rx_line_losses)
void receiveChat(SGGeod tx_pos, double freq, std::string text, int transmission_type)
double receiveBeacon(SGGeod &tx_pos, double heading, double pitch)
void setRxAntennaHeight(double rx_antenna_height)
void setPropagationModel(int model)
static double dbm_to_microvolt(double dbm)
void setPolarization(int polarization)
void setTxPower(double txpower)
void setRxAntennaGain(double rx_antenna_gain)
void setTxAntennaHeight(double tx_antenna_height)
static double watt_to_dbm(double power_watt)
static convenience functions for unit conversions
void setTxLineLosses(double tx_line_losses)
void setFrequency(double freq, int radio)
a couple of setters and getters for convenience, call after initializing frequency is in MHz,...