1
0
Fork 0

Make polarization a configurable parameter

This commit is contained in:
adrian 2011-12-01 14:33:25 +02:00
parent 8184c290cc
commit ad6b0b81da
2 changed files with 5 additions and 1 deletions

View file

@ -60,6 +60,8 @@ FGRadioTransmission::FGRadioTransmission() {
_rx_line_losses = 2.0; // to be configured for each station
_tx_line_losses = 2.0;
_polarization = 1; // default vertical
_propagation_model = 2;
_terrain_sampling_distance = fgGetDouble("/sim/radio/sampling-distance", 90.0); // regular SRTM is 90 meters
}
@ -211,7 +213,7 @@ double FGRadioTransmission::ITM_calculate_attenuation(SGGeod pos, double freq, i
else
frq_mhz = freq;
int radio_climate = 5; // continental temperate
int pol=1; // assuming vertical polarization although this is more complex in reality
int pol= _polarization;
double conf = 0.90; // 90% of situations and time, take into account speed
double rel = 0.90;
double dbloss;

View file

@ -49,6 +49,7 @@ private:
double _rx_line_losses;
double _tx_line_losses;
double _terrain_sampling_distance;
int _polarization;
std::map<string, double[2]> _mat_database;
int _propagation_model; /// 0 none, 1 round Earth, 2 ITM
@ -76,6 +77,7 @@ public:
void setTxLineLosses(double tx_line_losses) { _tx_line_losses = tx_line_losses; };
void setRxLineLosses(double rx_line_losses) { _rx_line_losses = rx_line_losses; };
void setPropagationModel(int model) { _propagation_model = model; };
void setPolarization(int polarization) { _polarization = polarization; };
// 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);