edu.cmu.emulator.signal
Class GeoFadingModel

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

public class GeoFadingModel
extends Object
implements FadingModel, RSAListener

Implementation of Geometrical V2V fading model 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.
static double MAX_SPEED_MPS
           
protected  double minSpeed
           
protected  Path path
           
static int SIZE_FADING_TABLE
           
protected  String specName
           
protected  double speed
           
protected  Antenna srcAntenna
           
static String TYPE
           
 
Constructor Summary
protected GeoFadingModel()
          Constructor.
  GeoFadingModel(String specName, double minSpeed)
           
  GeoFadingModel(String specName, double minSpeed, long seed)
          Constructor for manual use.
 
Method Summary
protected static float[][] createFadingTable(String SpecName, int ftSize)
          Precompute the fading table.
protected static float[][] getFadingTable(String specName)
           
 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(String specName)
           
 String getSpecName()
           
 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 GeoFadingModel.
 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

specName

protected String specName

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
Constructor Detail

GeoFadingModel

protected GeoFadingModel()
Constructor.


GeoFadingModel

public GeoFadingModel(String specName,
                      double minSpeed,
                      long seed)
Constructor for manual use.


GeoFadingModel

public GeoFadingModel(String specName,
                      double minSpeed)
Method Detail

createFadingTable

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


getOrCreateFadingTable

protected static float[][] getOrCreateFadingTable(String specName)

getFadingTable

protected static float[][] getFadingTable(String specName)

getType

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

getSpecName

public String getSpecName()
Returns:
specName

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 GeoFadingModel.

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

main

public static void main(String[] args)


Copyright © 2013. All Rights Reserved.