#include <uan-prop-bhf.h>
Inheritance diagram for UanPropagationBhf:
Public Member Functions | |
UanPropagationBhf () | |
Create UanPropagationBhf. | |
int | pLoss (double srcDepth, double recDepth, double range, double freq=24.0) |
Get path loss from file. | |
virtual int | command (int argc, const char *const *argv) |
Standard NS2 command, does nothing special. | |
virtual double | getPr (UanPhy *txif, UanPhy *rxif) |
Returns SNR between interfaces txif and rxif. Uses pLoss to retreive info from file. | |
Protected Member Functions | |
int | getfig (const char *fname, int element) |
Method that extracts the desired pathloss element (element) from the data file fname. | |
Protected Attributes | |
double | srcDepthRes |
Resolution between source depth Bellhop simulations in meters. | |
double | recDepthRes |
Resolution between receiver depths in Bellhop simulations in meters. | |
double | rangeRes |
Resolution between ranges in Bellhop simulations. | |
double | freqRes |
Frequency resolution in Bellhop simulations. Not currently used. | |
int | maxDepth |
Maximum range in Bellhop simulation set. | |
int | maxRange |
Max Range in Bellhop simulation set. | |
int | numRanges |
Number of ranges in Bellhop simulation set (should be (maxRange-rangeRes)/numRanges I think. | |
char * | dataPath |
Pointer to C string indicating path to file set containing Bellhop data. | |
char * | filePrefix |
Data file Prefix as described in class description. | |
char * | fileSuffix |
Data file suffix as described in class description. |
This class implementes the abstract getPr function from UanProp. It works by reading from a set of binary data files created from Bellhop Matlab simulations. These files should be in UAN_PROP_DPDEF directory, have names beginning with UAN_PROP_FPDEF and end with UAN_PROP_FSDEF. Between UAN_PROP_FPDEF and UAN_PROP_FSDEF should be the depth of the source in meters.
For example, by default, files should be named: souce#.txt in /home/ltracy/workspace/NSUAN/uan/pdata/ where # should be the source depth in meters.
Source depth runs should be spaced srcDepthRes meters apart (default 10) And the files should be organized so that they include numRanges ranges spaced rangeRes meters apart in order of increasing range followed by increased receiver depth at recDepthRes meters spacing until max depth is reached. Each entry should be the 16 bit integer path loss between source and receiver.
TODO: Needs to be updated to include different frequencies. TODO: Update to keep arrivals instead of pathloss
int UanPropagationBhf::pLoss | ( | double | srcDepth, | |
double | recDepth, | |||
double | range, | |||
double | freq = 24.0 | |||
) |
Get path loss from file.
srcDepth | Depth of source in meters (double) | |
recDepth | Depth of receiver in meters (double) | |
range | Range in meters between source and receiver (double) | |
freq | Transmission frequency in kH. Not currently used (leave as default) |