WSF
WsfTabularAttenuation Class Reference

An attenuation model defined by externally-created tables. More...

#include <WsfTabularAttenuation.hpp>

Inheritance diagram for WsfTabularAttenuation:
Collaboration diagram for WsfTabularAttenuation:

Public Member Functions

 WsfTabularAttenuation ()
 WsfTabularAttenuation (const WsfTabularAttenuation &aSrc)
WsfTabularAttenuationoperator= (const WsfTabularAttenuation &)=delete
WsfEM_AttenuationClone () const override
bool Initialize (WsfEM_XmtrRcvr *aXmtrRcvrPtr) override
bool ProcessInput (UtInput &aInput) override
bool AcceptsInlineBlockInput () const override
double ComputeAttenuationFactor (WsfEM_Interaction &aInteraction, WsfEnvironment &aEnvironment, WsfEM_Interaction::Geometry aGeometry) override
Public Member Functions inherited from WsfEM_Attenuation
 WsfEM_Attenuation ()
 ~WsfEM_Attenuation () override
virtual bool Initialize (WsfEM_Xmtr *aXmtrPtr)
const char * GetScriptClassName () const override
bool DebugEnabled () const
 Is 'debug' enabled?
virtual bool IsNullModel () const
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Static Public Member Functions

static WsfEM_AttenuationObjectFactory (const std::string &aTypeName)
 Factory method called by WsfEM_AttenuationTypes.

Publicly accessible utility methods for processing MODTRAN spectral data.

static void BuildResponseVector (UtTable::Curve &aReponseCurve, const std::vector< double > &aWavenumbers, std::vector< double > &aResponseVector)
static double ComputeAverageContrastTransmittance (const std::vector< double > &aWavenumbers, const std::vector< double > &aSensorToTargetTransmittances, const std::vector< double > &aTargetToBackgroundRadiances, const std::vector< double > &aSensorResponse)
static double ComputeAverageTransmittance (const std::vector< double > &aWavenumbers, const std::vector< double > &aTransmittances, const std::vector< double > &aSensorResponse)
static bool ReadSpectralData (std::istream &aFile, double &aAltitude, double &aElevation, double &aRange, std::vector< double > &aWavenumbers, std::vector< double > &aValues)
static void ReadSpectralHeaders (std::istream &aFile, std::string aHeaders[3])

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
Protected Member Functions inherited from WsfEM_Attenuation
 WsfEM_Attenuation (const WsfEM_Attenuation &aSrc)
virtual double ComputeAttenuationFactorP (double aRange, double aElevation, double aAltitude, double aFrequency)
void GetAltitudesAndGroundRange (WsfEM_Interaction &aInteraction, WsfEM_Interaction::Geometry aGeometry, double &aAltitude1, double &aAltitude2, double &aGroundRange)
void GetRangeElevationAltitude (WsfEM_Interaction &aInteraction, WsfEM_Interaction::Geometry aGeometry, double &aRange, double &aElevation, double &aAltitude)
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).
Protected Attributes inherited from WsfEM_Attenuation
bool mDebugEnabled
bool mSortEndPoints

Detailed Description

An attenuation model defined by externally-created tables.

Constructor & Destructor Documentation

◆ WsfTabularAttenuation() [1/2]

WsfTabularAttenuation::WsfTabularAttenuation ( )

◆ WsfTabularAttenuation() [2/2]

WsfTabularAttenuation::WsfTabularAttenuation ( const WsfTabularAttenuation & aSrc)

Member Function Documentation

◆ AcceptsInlineBlockInput()

bool WsfTabularAttenuation::AcceptsInlineBlockInput ( ) const
inlineoverridevirtual

Does the accept inline block input?

This is called by WsfEM_Attenuation::LoadReference when attempting to load a reference to an attenuation model from within another object (i.e.: a 'transmitter').

When originally developed none of the models required additional input, and the command stream was simply 'attenuation_model <x>'. Some of the newer models however have optional inputs that may be provided and thus require the 'block' input (i.e.: they require a 'end_attenuation_model' terminator. Models that have optional inputs should return 'true'.

Reimplemented from WsfEM_Attenuation.

◆ BuildResponseVector()

void WsfTabularAttenuation::BuildResponseVector ( UtTable::Curve & aResponseCurve,
const std::vector< double > & aWavenumbers,
std::vector< double > & aResponseVector )
static

Build the sensor response vector.

Parameters
aResponseCurve[input] The sensor response curve as a function of wavelength
aWavenumbers[input] The wavenumber of the bin centers.
aResponseVector[output] The sensor response the wavenumber bin centers.

◆ Clone()

WsfEM_Attenuation * WsfTabularAttenuation::Clone ( ) const
overridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements WsfEM_Attenuation.

References WsfEM_Attenuation::WsfEM_Attenuation(), and WsfTabularAttenuation().

◆ ComputeAttenuationFactor()

double WsfTabularAttenuation::ComputeAttenuationFactor ( WsfEM_Interaction & aInteraction,
WsfEnvironment & aEnvironment,
WsfEM_Interaction::Geometry aGeometry )
overridevirtual

Compute the attenuation loss factor along a specified path segment.

Parameters
aInteractionThe WsfEM_Interaction object containing all geometry needed to perform the calculation.
aEnvironmentThe environment object (for future use to determine inhomogeneous conditions).
aGeometryIndicates which segment of the path is to be computed (Xmtr->Tgt, Tgt->Rcvr or Xmtr->Rcvr).
Returns
The fraction of the signal that remains at the end of the segment, in the range [0, 1].
Note
This is the public interface to the attenuation calculations that is called by WsfEM_Interaction. A derived class may implement this method for the most general capabilities, or may implement the protected 4-argument form which is called by the base class implementation of this form.

Reimplemented from WsfEM_Attenuation.

References WsfEM_Attenuation::GetAltitudesAndGroundRange(), WsfEM_XmtrRcvr::GetFrequency(), WsfEM_Attenuation::GetRangeElevationAltitude(), WsfEM_Interaction::GetReceiver(), and WsfEM_Interaction::GetTransmitter().

◆ ComputeAverageContrastTransmittance()

double WsfTabularAttenuation::ComputeAverageContrastTransmittance ( const std::vector< double > & aWavenumbers,
const std::vector< double > & aSensorToTargetTransmittances,
const std::vector< double > & aTargetToBackgroundRadiances,
const std::vector< double > & aSensorResponse )
static

Compute the average transmittance over the band.

Parameters
aWavenumbers[input] The wavenumber of the bin centers.
aSensorToTargetTransmittances[input] The transmittance in each bin.
aTargetToBackgroundRadiances[input] The radiance of background at the target in each bin.
aSensorResponse[input] The sensor response in each bin.
Returns
The contrast transmittance.

◆ ComputeAverageTransmittance()

double WsfTabularAttenuation::ComputeAverageTransmittance ( const std::vector< double > & aWavenumbers,
const std::vector< double > & aTransmittances,
const std::vector< double > & aSensorResponse )
static

Compute the average transmittance over the band.

Parameters
aWavenumbers[input] The wavenumber of the bin centers.
aTransmittances[input] The transmittance in each bin.
aSensorResponse[input] The sensor response in each bin.
Returns
The average transmittance.

◆ Initialize()

bool WsfTabularAttenuation::Initialize ( WsfEM_XmtrRcvr * aXmtrRcvrPtr)
overridevirtual

Initialize the attenuation object.

Parameters
aXmtrRcvrPtrThe transmitter/receiver to which the attenuation object is attached.

Reimplemented from WsfEM_Attenuation.

References WsfEM_Attenuation::Initialize(), and ok.

◆ ObjectFactory()

WsfEM_Attenuation * WsfTabularAttenuation::ObjectFactory ( const std::string & aTypeName)
static

◆ operator=()

◆ ProcessInput()

bool WsfTabularAttenuation::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from WsfEM_Attenuation.

References WsfEM_Attenuation::mSortEndPoints, and WsfEM_Attenuation::ProcessInput().

◆ ReadSpectralData()

bool WsfTabularAttenuation::ReadSpectralData ( std::istream & aFile,
double & aAltitude,
double & aElevation,
double & aSlantRange,
std::vector< double > & aWavenumbers,
std::vector< double > & aValues )
static

Read one set of spectral data for a given observation condition from MODTRAN (or some other similar program)

Parameters
aFile[input] file being read
aAltitude[output] The observation altitude.
aElevation[output] The observation (look) angle (relative to horizontal)
aSlantRange[output] The observation slant range.
aWavenumbers[output] The wavenumbers of the bins (cm-1)
aValues[output] The transmittance values [0..1] or radiance values (W/cm^2/sr).
Returns
true if data successfully read or false if end-of-file encountered.
Exceptions
UtExceptionif there is an error in the data.

◆ ReadSpectralHeaders()

void WsfTabularAttenuation::ReadSpectralHeaders ( std::istream & aFile,
std::string aHeaders[3] )
static

Read the file headers (first three lines) from a spectral data file.

Parameters
aFile[input] file being read
aHeaders[output] The headers.

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved