edu.cmu.emulator.signal
Class RiceanFadingModel

java.lang.Object
  extended by edu.cmu.emulator.signal.RiceanFadingModel
All Implemented Interfaces:
FadingModel, RSAListener

public class RiceanFadingModel
extends Object
implements FadingModel, RSAListener

Dummy Ricean fading model implementation. This should be replaced with a real implementation.


Field Summary
protected static int channelI
           
protected static int channelQ
           
protected  Antenna destAntenna
           
protected  float[][] fadingTable
          Table of fading factors.
protected static HashMap fadingTableMap
           
static double fcarrier_GHz
           
static double FT_DURATION_SEC
           
static double FT_RESOLUTION_SEC
           
protected  int ftOffset
          This instance's offset within the fading table.
protected  double k
           
protected static Logger log
           
static double MAX_SPEED_MPS
           
protected  double minSpeed
           
protected  Path path
           
static int SIZE_FADING_TABLE
           
protected  double speed
           
protected  Antenna srcAntenna
           
static String TYPE
           
 
Constructor Summary
protected RiceanFadingModel()
          Constructor.
  RiceanFadingModel(double k, double minSpeed)
           
  RiceanFadingModel(double k, double minSpeed, long seed)
          Constructor for manual use.
 
Method Summary
protected static float[][] createFadingTable(double K, int ftSize)
          Precompute the fading table.
protected static float[][] getFadingTable(double k)
           
 double getK()
           
 double getLossI(Antenna a1, Antenna a2, long timeMillis)
          Calculate the current fading for this fading model instance at the time given.
 double getLossQ(Antenna a1, Antenna a2, long timeMillis)
          Calculate the current fading for this fading model instance at the time given.
 double getMinSpeed()
           
protected static float[][] getOrCreateFadingTable(double k)
           
 double getSpeed()
           
 String getType()
           
 void initPathFading(Path path)
           
static void main(String[] args)
           
 void newValue(RelSpatialAttribute rsAttrib, long timeMillis, Object value)
           
 void parseSubClass(Element fadingModelDef)
          Parse an XML definition for RiceanFadingModel.
 void stopPathFading(Path path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

path

protected Path path

srcAntenna

protected Antenna srcAntenna

destAntenna

protected Antenna destAntenna

k

protected double k

minSpeed

protected double minSpeed

speed

protected double speed

fadingTable

protected float[][] fadingTable
Table of fading factors.


ftOffset

protected int ftOffset
This instance's offset within the fading table.


channelI

protected static int channelI

channelQ

protected static int channelQ

fadingTableMap

protected static HashMap fadingTableMap

TYPE

public static final String TYPE
See Also:
Constant Field Values

SIZE_FADING_TABLE

public static final int SIZE_FADING_TABLE
See Also:
Constant Field Values

MAX_SPEED_MPS

public static final double MAX_SPEED_MPS
See Also:
Constant Field Values

fcarrier_GHz

public static final double fcarrier_GHz
See Also:
Constant Field Values

FT_DURATION_SEC

public static double FT_DURATION_SEC

FT_RESOLUTION_SEC

public static double FT_RESOLUTION_SEC

log

protected static Logger log
Constructor Detail

RiceanFadingModel

protected RiceanFadingModel()
Constructor.


RiceanFadingModel

public RiceanFadingModel(double k,
                         double minSpeed,
                         long seed)
Constructor for manual use.


RiceanFadingModel

public RiceanFadingModel(double k,
                         double minSpeed)
Method Detail

createFadingTable

protected static float[][] createFadingTable(double K,
                                             int ftSize)
Precompute the fading table. After creation this table is read-only.


getOrCreateFadingTable

protected static float[][] getOrCreateFadingTable(double k)

getFadingTable

protected static float[][] getFadingTable(double k)

getType

public String getType()
Specified by:
getType in interface FadingModel

getK

public double getK()
Returns:
k

getSpeed

public double getSpeed()
Returns:
speed

getMinSpeed

public double getMinSpeed()

initPathFading

public void initPathFading(Path path)
Specified by:
initPathFading in interface FadingModel

stopPathFading

public void stopPathFading(Path path)
Specified by:
stopPathFading in interface FadingModel

newValue

public void newValue(RelSpatialAttribute rsAttrib,
                     long timeMillis,
                     Object value)
Specified by:
newValue in interface RSAListener

getLossI

public double getLossI(Antenna a1,
                       Antenna a2,
                       long timeMillis)
Calculate the current fading for this fading model instance at the time given.

Specified by:
getLossI in interface FadingModel
Parameters:
timeMillis - the time to calculate fading for
Returns:
the current fading loss (I)

getLossQ

public double getLossQ(Antenna a1,
                       Antenna a2,
                       long timeMillis)
Calculate the current fading for this fading model instance at the time given.

Specified by:
getLossQ in interface FadingModel
Parameters:
timeMillis - the time to calculate fading for
Returns:
the current fading loss (I)

parseSubClass

public void parseSubClass(Element fadingModelDef)
Parse an XML definition for RiceanFadingModel.

Specified by:
parseSubClass in interface FadingModel
Parameters:
fadingModelDef - the root XML element

main

public static void main(String[] args)


Copyright © 2013. All Rights Reserved.