|
|
| 171 |
* This model is invalid for small distance values. |
171 |
* This model is invalid for small distance values. |
| 172 |
* The current implementation returns the txpower as the rxpower |
172 |
* The current implementation returns the txpower as the rxpower |
| 173 |
* for any distance smaller than MinDistance. |
173 |
* for any distance smaller than MinDistance. |
|
|
174 |
* |
| 175 |
* In the implementation, \f$ \lambda \f$ is calculated as |
| 176 |
* \f$ \frac{C}{f} \f$, where \f$ C = 299792458\f$ m/s is the speed of light in |
| 177 |
* vacuum, and \f$ f \f$ is the frequency in Hz which can be configured by |
| 178 |
* the user via the Frequency attribute. |
| 174 |
*/ |
179 |
*/ |
| 175 |
class FriisPropagationLossModel : public PropagationLossModel |
180 |
class FriisPropagationLossModel : public PropagationLossModel |
| 176 |
{ |
181 |
{ |
|
|
| 179 |
FriisPropagationLossModel (); |
184 |
FriisPropagationLossModel (); |
| 180 |
/** |
185 |
/** |
| 181 |
* \param frequency (Hz) |
186 |
* \param frequency (Hz) |
| 182 |
* \param speed (m/s) |
|
|
| 183 |
* |
187 |
* |
| 184 |
* Set the main wavelength used in the Friis model |
188 |
* Set the carrier frequency used in the Friis model |
| 185 |
* calculation. |
189 |
* calculation. |
| 186 |
*/ |
190 |
*/ |
| 187 |
void SetLambda (double frequency, double speed); |
191 |
void SetFrequency (double frequency); |
| 188 |
/** |
|
|
| 189 |
* \param lambda (m) the wavelength |
| 190 |
* |
| 191 |
* Set the main wavelength used in the Friis model |
| 192 |
* calculation. |
| 193 |
*/ |
| 194 |
void SetLambda (double lambda); |
| 195 |
/** |
192 |
/** |
| 196 |
* \param systemLoss (dimension-less) |
193 |
* \param systemLoss (dimension-less) |
| 197 |
* |
194 |
* |
|
|
| 213 |
double GetMinDistance (void) const; |
210 |
double GetMinDistance (void) const; |
| 214 |
|
211 |
|
| 215 |
/** |
212 |
/** |
| 216 |
* \returns the current wavelength (m) |
213 |
* \returns the current frequency (Hz) |
| 217 |
*/ |
214 |
*/ |
| 218 |
double GetLambda (void) const; |
215 |
double GetFrequency (void) const; |
| 219 |
/** |
216 |
/** |
| 220 |
* \returns the current system loss (dimension-less) |
217 |
* \returns the current system loss (dimension-less) |
| 221 |
*/ |
218 |
*/ |
|
|
| 233 |
|
230 |
|
| 234 |
static const double PI; |
231 |
static const double PI; |
| 235 |
double m_lambda; |
232 |
double m_lambda; |
|
|
233 |
double m_frequency; |
| 236 |
double m_systemLoss; |
234 |
double m_systemLoss; |
| 237 |
double m_minDistance; |
235 |
double m_minDistance; |
| 238 |
}; |
236 |
}; |
|
|
| 259 |
* The crossover distance, below which Friis is used, is calculated as follows: |
257 |
* The crossover distance, below which Friis is used, is calculated as follows: |
| 260 |
* |
258 |
* |
| 261 |
* \f$ dCross = \frac{(4 * pi * Ht * Hr)}{lambda} \f$ |
259 |
* \f$ dCross = \frac{(4 * pi * Ht * Hr)}{lambda} \f$ |
|
|
260 |
* |
| 261 |
* In the implementation, \f$ \lambda \f$ is calculated as |
| 262 |
* \f$ \frac{C}{f} \f$, where \f$ C = 299792458\f$ m/s is the speed of light in |
| 263 |
* vacuum, and \f$ f \f$ is the frequency in Hz which can be configured by |
| 264 |
* the user via the Frequency attribute. |
| 262 |
*/ |
265 |
*/ |
| 263 |
class TwoRayGroundPropagationLossModel : public PropagationLossModel |
266 |
class TwoRayGroundPropagationLossModel : public PropagationLossModel |
| 264 |
{ |
267 |
{ |
| 265 |
public: |
268 |
public: |
| 266 |
static TypeId GetTypeId (void); |
269 |
static TypeId GetTypeId (void); |
| 267 |
TwoRayGroundPropagationLossModel (); |
270 |
TwoRayGroundPropagationLossModel (); |
|
|
271 |
|
| 268 |
/** |
272 |
/** |
| 269 |
* \param frequency (Hz) |
273 |
* \param frequency (Hz) |
| 270 |
* \param speed (m/s) |
|
|
| 271 |
* |
274 |
* |
| 272 |
* Set the main wavelength used in the TwoRayGround model |
275 |
* Set the carrier frequency used in the TwoRayGround model |
| 273 |
* calculation. |
276 |
* calculation. |
| 274 |
*/ |
277 |
*/ |
| 275 |
void SetLambda (double frequency, double speed); |
278 |
void SetFrequency (double frequency); |
| 276 |
/** |
279 |
|
| 277 |
* \param lambda (m) the wavelength |
|
|
| 278 |
* |
| 279 |
* Set the main wavelength used in the TwoRayGround model |
| 280 |
* calculation. |
| 281 |
*/ |
| 282 |
void SetLambda (double lambda); |
| 283 |
/** |
280 |
/** |
| 284 |
* \param systemLoss (dimension-less) |
281 |
* \param systemLoss (dimension-less) |
| 285 |
* |
282 |
* |
|
|
| 297 |
* \returns the minimum distance. |
294 |
* \returns the minimum distance. |
| 298 |
*/ |
295 |
*/ |
| 299 |
double GetMinDistance (void) const; |
296 |
double GetMinDistance (void) const; |
|
|
297 |
|
| 300 |
/** |
298 |
/** |
| 301 |
* \returns the current wavelength (m) |
299 |
* \returns the current frequency (Hz) |
| 302 |
*/ |
300 |
*/ |
| 303 |
double GetLambda (void) const; |
301 |
double GetFrequency (void) const; |
|
|
302 |
|
| 304 |
/** |
303 |
/** |
| 305 |
* \returns the current system loss (dimension-less) |
304 |
* \returns the current system loss (dimension-less) |
| 306 |
*/ |
305 |
*/ |
|
|
| 324 |
|
323 |
|
| 325 |
static const double PI; |
324 |
static const double PI; |
| 326 |
double m_lambda; |
325 |
double m_lambda; |
|
|
326 |
double m_frequency; |
| 327 |
double m_systemLoss; |
327 |
double m_systemLoss; |
| 328 |
double m_minDistance; |
328 |
double m_minDistance; |
| 329 |
double m_heightAboveZ; |
329 |
double m_heightAboveZ; |