WSF
WsfEM_Util Class Reference

Utility methods used by the electromagnetic classes. More...

#include <WsfEM_Util.hpp>

Static Public Member Functions

static bool ComputeApparentPosition (double aEarthRadiusScale, const double aSrcLocWCS[3], const double aTgtLocWCS[3], double aApparentSrcLocWCS[3], double aApparentTgtLocWCS[3])
 A pass-through to the other form, not given the altitude.
static bool ComputeApparentPosition (double aEarthRadiusScale, const double aSrcLocWCS[3], const double aTgtLocWCS[3], double aSrcAlt, double aTgtAlt, double aApparentSrcLocWCS[3], double aApparentTgtLocWCS[3])
static void ComputeViewerAspect (UtEntity *aTargetPtr, const double aViewerLocWCS[3], double aEarthRadiusScale, double &aTargetToViewerAz, double &aTargetToViewerEl)
static bool MaskedByHorizon (double aLat1, double aLon1, double aAlt1, double aTrnHgt1, double aLat2, double aLon2, double aAlt2, double aTrnHgt2, double aEarthRadiusScale)
static bool StringToEnum (WsfEM_Types::Polarization &aPolarization, const std::string &aString)
static bool StringToEnum (WsfEM_Types::InfraredBand &aBand, const std::string &aString)
static bool StringToEnum (WsfEM_Types::OpticalBand &aBand, const std::string &aString)
static std::string EnumToString (WsfEM_Types::Polarization aPolarization)
static std::string EnumToString (WsfEM_Types::InfraredBand aBand)
static std::string EnumToString (WsfEM_Types::OpticalBand aBand)

Detailed Description

Utility methods used by the electromagnetic classes.

Member Function Documentation

◆ ComputeApparentPosition() [1/2]

bool WsfEM_Util::ComputeApparentPosition ( double aEarthRadiusScale,
const double aSrcLocWCS[3],
const double aTgtLocWCS[3],
double aApparentSrcLocWCS[3],
double aApparentTgtLocWCS[3] )
static

◆ ComputeApparentPosition() [2/2]

bool WsfEM_Util::ComputeApparentPosition ( double aEarthRadiusScale,
const double aSrcLocWCS[3],
const double aTgtLocWCS[3],
double aSrcAlt,
double aTgtAlt,
double aApparentSrcLocWCS[3],
double aApparentTgtLocWCS[3] )
static

Compute the apparent position of a target, accounting for refraction.

This routine computes the apparent position of a target using the well-known 'scaled-earth' model for refraction.

Parameters
aEarthRadiusScale[input] The scale factor for the earth radius (typically 4/3).
aSrcLocWCS[input] The source location.
aTgtLocWCS[input] The target location.
aSrcAlt[input] The altitude of the source, corresponding to aSrcLocWCS.
aTgtAlt[input] The altitude of the target, corresponding to aTgtLocWCS.
aApparentSrcLocWCS[output] The apparent location of the source when viewed from the target location. This may refer to the same memory as aSrcLocWCS.
aApparentTgtLocWCS[output] The apparent location of the target when viewed from the source location. This may refer to the same memory as aTgtLocWCS.
Returns
'true' if an adjustment was necessary, 'false' if not. The output values are valid in both cases.
Note
This method does NOT preserve slant range. Its' major purpose is to provide a location from with the caller can compute a unit vector that points to the apparent location.

◆ ComputeViewerAspect()

void WsfEM_Util::ComputeViewerAspect ( UtEntity * aTargetPtr,
const double aViewerLocWCS[3],
double aEarthRadiusScale,
double & aTargetToViewerAz,
double & aTargetToViewerEl )
static

Determine the azimuth and elevation of a viewer with respect to the target entity. This is a helper used by the signature script query methods that return a signature value.

Parameters
aTargetPtr[input] Pointer to the target entity.
aViewerLocWCS[input] Location of the viewer.
aEarthRadiusScale[input] The scale factor for the earth radius (typically 4/3).
aTargetToViewerAz[output] The azimuth of the viewer with respect to the target.
aTargetToViewerEl[output] The elevation of the viewer with respect to the target.

References ComputeApparentPosition().

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ EnumToString() [1/3]

std::string WsfEM_Util::EnumToString ( WsfEM_Types::InfraredBand aBand)
static

Convert an infrared band enumeration to an equivalent string.

Parameters
aBand[input] The band whose string value is desired.
Returns
The string value of the enumeration.

References WsfEM_Types::cIRBAND_DEFAULT, WsfEM_Types::cIRBAND_LONG, WsfEM_Types::cIRBAND_MEDIUM, WsfEM_Types::cIRBAND_SHORT, and WsfEM_Types::cIRBAND_VERY_LONG.

◆ EnumToString() [2/3]

std::string WsfEM_Util::EnumToString ( WsfEM_Types::OpticalBand aBand)
static

Convert an optical band enumeration to an equivalent string.

Parameters
aBand[input] The band whose string value is desired.
Returns
The string value of the enumeration.

References WsfEM_Types::cOPT_DEFAULT, WsfEM_Types::cOPT_IR_LONG, WsfEM_Types::cOPT_IR_MEDIUM, WsfEM_Types::cOPT_IR_SHORT, WsfEM_Types::cOPT_IR_VERY_LONG, and WsfEM_Types::cOPT_VISUAL.

◆ EnumToString() [3/3]

std::string WsfEM_Util::EnumToString ( WsfEM_Types::Polarization aPolarization)
static

Convert a polarization enumeration to an equivalent string.

Parameters
aPolarization[input] The polarization whose string value is desired.
Returns
The string value of the enumeration.

References WsfEM_Types::cPOL_DEFAULT, WsfEM_Types::cPOL_HORIZONTAL, WsfEM_Types::cPOL_LEFT_CIRCULAR, WsfEM_Types::cPOL_RIGHT_CIRCULAR, WsfEM_Types::cPOL_SLANT_135, WsfEM_Types::cPOL_SLANT_45, and WsfEM_Types::cPOL_VERTICAL.

Referenced by WsfBistaticSig::Initialize(), WsfALARM_AntennaPattern::ALARM_Data::InitializeBase(), WsfEM_ITU_Attenuation::ProcessInput(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().

◆ MaskedByHorizon()

bool WsfEM_Util::MaskedByHorizon ( double aLat1,
double aLon1,
double aAlt1,
double aTrnHgt1,
double aLat2,
double aLon2,
double aAlt2,
double aTrnHgt2,
double aEarthRadiusScale )
static

Determine if the line of sight between two objects is masked by the horizon.

Parameters
aLat1The latitude of the first object.
aLon1The longitude of the first object.
aAlt1The MSL altitude of the first object.
aTrnHgt1The MSL height of the terrain under the first object.
aLat2The latitude of the second object.
aLon2The longitude of the second object.
aAlt2The MSL altitude of the second object.
aTrnHgt2The MSL height of the terrain under the second object.
aEarthRadiusScaleThe scale factor for the earth radius (typically 4/3).
Returns
true if the line of sight between the two objects is masked by the horizon.

Referenced by WsfEM_Interaction::MaskedByHorizon(), WsfEM_Interaction::MaskedByHorizon(), and UT_DEFINE_SCRIPT_METHOD().

◆ StringToEnum() [1/3]

bool WsfEM_Util::StringToEnum ( WsfEM_Types::InfraredBand & aBand,
const std::string & aString )
static

Convert a string representing a infrared band to its equivalent enumeration.

Parameters
aBand[output] The resulting enumeration.
aString[input] The string to converted.
Returns
'true' if successful or 'false' if the input string did not represent a valid polarization.

References WsfEM_Types::cIRBAND_DEFAULT, WsfEM_Types::cIRBAND_LONG, WsfEM_Types::cIRBAND_MEDIUM, WsfEM_Types::cIRBAND_SHORT, WsfEM_Types::cIRBAND_VERY_LONG, and ok.

◆ StringToEnum() [2/3]

bool WsfEM_Util::StringToEnum ( WsfEM_Types::OpticalBand & aBand,
const std::string & aString )
static

Convert a string representing a infrared band to its equivalent enumeration.

Parameters
aBand[output] The resulting enumeration.
aString[input] The string to converted.
Returns
'true' if successful or 'false' if the input string did not represent a valid polarization.

References WsfEM_Types::cOPT_DEFAULT, WsfEM_Types::cOPT_IR_LONG, WsfEM_Types::cOPT_IR_MEDIUM, WsfEM_Types::cOPT_IR_SHORT, WsfEM_Types::cOPT_IR_VERY_LONG, WsfEM_Types::cOPT_VISUAL, and ok.

◆ StringToEnum() [3/3]

bool WsfEM_Util::StringToEnum ( WsfEM_Types::Polarization & aPolarization,
const std::string & aString )
static

Convert a string representing a polarization to its equivalent enumeration.

Parameters
aPolarization[output] The resulting enumeration.
aString[input] The string to converted.
Returns
'true' if successful or 'false' if the input string did not represent a valid polarization.

References WsfEM_Types::cPOL_DEFAULT, WsfEM_Types::cPOL_HORIZONTAL, WsfEM_Types::cPOL_LEFT_CIRCULAR, WsfEM_Types::cPOL_RIGHT_CIRCULAR, WsfEM_Types::cPOL_SLANT_135, WsfEM_Types::cPOL_SLANT_45, WsfEM_Types::cPOL_VERTICAL, and ok.

Referenced by AntennaPlotFunction::ProcessInput(), WsfALARM_AntennaPattern::ALARM_Data::ProcessInput(), WsfEM_ITU_Attenuation::ProcessInput(), WsfEM_Rcvr::ProcessInput(), WsfEM_XmtrRcvr::ProcessInput(), WsfEOIR_IRST_SensorMode::ProcessInput(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().


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