#include <uan-prop-bhp.h>
Inheritance diagram for UanPropagationBhp:
Public Member Functions | |
UanPropagationBhp () | |
Create Propagation BHP class. | |
virtual double | getPr (UanPhy *txif, UanPhy *rxif) |
Return path loss between txif and rxif. | |
void | updateResults (int addr, double srcDepth, double freq, set< double > depths, set< double > ranges) |
update simulation results if nodes have moved more than tollerances allow | |
double | getPLossRes (int addr, double depth, double range, double tsym) |
Get pathloss from Bellhop information being kept in memory. | |
double | getISIRes (int addr, double depth, double range, double tsym, double tclear) |
Get Intersymbol interference from Bellhop information being kept in memory. | |
ArrResults & | getDat (int addr, double depth, double range) |
Protected Member Functions | |
void | getResults (ArrResults &res, char *fileName) |
Protected Attributes | |
double | recDepthTol |
Allowed tollerance of receiver depth before rerunning Bellhop. | |
double | srcDepthTol |
Allowed tollerance of source depth before rerunning Bellhop. | |
double | rangeTol |
Allowed range tollerance before rerunning Bellhop. | |
double | freqTol |
Allowed frequencey tollerance before rerunning Bellhop. | |
double | maxDepth |
Maximum allowed depth probably equivalent to sea floor. | |
double | maxRange |
Going to be removed. | |
char * | bhExPath |
Pointer to C string containing path to Bellhop executable. | |
map< int, BhRun > | bhData |
STL map keeping Bellhop information in BhRun mapped to transmitter address. |
This class implementes the abstract getPr function from UanProp. This model works by actually running the Bellhop raytracing process to get the set of arrivals at the receiving node. It then uses the arrivals, and information about the symbol length and clearing time to determine the pathloss and ISI seen at the receiver.
To improve performance, several helper classes and methods are introduced that allow the UanChannelBhp to compute all the necessary arrivals at the same time. This will greatly reduce the required simulation time (although it will still take quite a long time to run. About 30 seconds per simulated node longer than a standard simulation - if the nodes do not move)
void UanPropagationBhp::updateResults | ( | int | addr, | |
double | srcDepth, | |||
double | freq, | |||
set< double > | depths, | |||
set< double > | ranges | |||
) |
update simulation results if nodes have moved more than tollerances allow
addr | Integer address of transmitting node | |
srcDepth | Depth of transmitting node | |
freq | Transmission frequency | |
depths | STL set of all receiver depths | |
ranges | STL set of all transmitter to receiver ranges |
Information is kept in STL map bhData which maps bellhop arrival information to all recievers to transmitter address.
double UanPropagationBhp::getPLossRes | ( | int | addr, | |
double | depth, | |||
double | range, | |||
double | tsym | |||
) |
Get pathloss from Bellhop information being kept in memory.
addr | Transmitter address | |
depth | Receiver depth | |
range | Horizontal distance to receiver from transmitter | |
tsym | Symbol time in ms |
double UanPropagationBhp::getISIRes | ( | int | addr, | |
double | depth, | |||
double | range, | |||
double | tsym, | |||
double | tclear | |||
) |
Get Intersymbol interference from Bellhop information being kept in memory.
addr | Transmitter address | |
depth | Receiver depth | |
range | Horizontal distance to receiver from transmitter | |
tsym | Symbol time in ms | |
tclear | Symbol clearing time in ms |
ArrResults & UanPropagationBhp::getDat | ( | int | addr, | |
double | depth, | |||
double | range | |||
) |
Returns a reference to an ArrResults class which keeps the information recorded from a Bellhop run from transmitter with address addr, to a receiver at depth depth and range range.
void UanPropagationBhp::getResults | ( | ArrResults & | res, | |
char * | fileName | |||
) | [protected] |
Function used by non BHP channel to retreive arrival information from the arrival file fileName. The data is stored in the ArrResults structure referenced by res.