WSF
HorizontalMapFunction Class Reference

#include <HorizontalMapFunction.hpp>

Inheritance diagram for HorizontalMapFunction:
Collaboration diagram for HorizontalMapFunction:

Classes

struct  PointCompare
 The function object for comparing two points at a specific variable index. More...
struct  ContourLevel
 A contour level for sedit contour level output. More...
class  ContourFunction
 The 'functor' for the contour filter. More...
class  Selector
struct  AnalysisMapOptions

Public Types

using Point = std::vector<double>
 The list of values at a specified sample point.

Public Member Functions

 HorizontalMapFunction (const WsfScenario &aScenario)
bool Execute (WsfSimulation &aSimulation) override
bool ProcessInput (UtInput &aInput) override
 Process the horizontal_map input block.
Public Member Functions inherited from MapPlotFunction
 MapPlotFunction ()=default
 MapPlotFunction (const WsfScenario &aScenario, const std::string &aScriptClassName="")
virtual ~MapPlotFunction ()=0
bool ProcessInput (UtInput &aInput) override
void RegisterMapPlotVariable (const std::string &aVarName, std::shared_ptr< MapPlotVariable > aVariablePtr)
Public Member Functions inherited from Function
 Function (const Function &)=default
 Function (const WsfScenario &aScenario, const std::string &aScriptClassName="")
virtual ~Function ()=default
const std::string & GetCommand () const
void SetCommand (const std::string &aCommand)
const WsfScenarioGetScenario () const
const std::string & GetPlotName () const
const WsfPlatformAvailabilityGetPlatformAvailability () const
bool IsPlatformAvailabilitySpecified () const
 Has the user provided a platform_availability block for the plot?

Static Public Attributes

static const double cUNDEFINED = 1.0E+30

Protected Types

using SelectorList = std::vector<Selector>

Protected Member Functions

bool BuildContours (size_t aPdVarIndex)
bool LoopOverTargetAltitude (size_t aPdVarIndex)
bool LoopOverTargetPitch (size_t aPdVarIndex)
bool LoopOverTargetRoll (size_t aPdVarIndex)
void ConvertCartesianToSpherical (double aDownRange, double aCrossRange, double &aLatitude, double &aLongitude)
 Given a down range and cross range value from the sensor, compute the equivalent latitude and longitude.
void ConvertSphericalToCartesian (double aLatitude, double aLongitude, double &aDownRange, double &aCrossRange)
 Given a latitude and longitude, compute the equivalent down range and cross range values.
void EvaluatePoint (double aSimTime, double aRowValue, double aColValue, std::vector< double > &aDataValues)
void InitializeSensorPlatforms (double aSimTime)
void CreateSensorList (WsfSimulation &aSimulation)
bool InSelectorList (WsfSensor *aSensorPtr, const SelectorList &aSelectorList)
bool ProcessTargetRegion (UtInput &aInput)
void ReadSelector (UtInput &aInput, SelectorList &aSelectorList)
void WriteDefendedAreaReport (const std::vector< double > &aAreaByPd)
 Write the defended area report if requested.
void WriteGnuPlotFile (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues)
 Write output gnuplot 'splot' output.
void WriteGnuPlotPlayerFile ()
 Write output gnuplot player location output.
void WriteKML_File (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues, size_t aVarIndex)
 Write the KML output if requested.
void WritePdMapFile (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues, size_t aVarIndex)
 Write the PdMap output if requested.
void WriteSeditContours (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues, size_t aVarIndex)
 Write the scenario editor output if requested.
void WriteWSFContours (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues, size_t aVarIndex)
 Write the scenario editor output if requested.
void WriteShapefile (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues, size_t aVarIndex)
 Write the shapefile output if requested.
void WriteAnalysisMapFile (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues, size_t aVarIndex)
void WriteTiffFile (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues) const
virtual void WriteCustomOutputFormats (const std::vector< double > &aRowValues, const std::vector< double > &aColValues, const std::vector< Point > &aVarValues, size_t aVarIndex)
std::string GetPdMapFileJsonMetadata () const

Static Protected Member Functions

static void GreatCircleHeadingAndDistance (double aBegLat, double aBegLon, double aEndLat, double aEndLon, double &aHeading, double &aDistance)

Protected Attributes

WsfSimulationmSimulationPtr
double mSensorPlatformYaw
double mSensorPlatformPitch
double mSensorPlatformRoll
std::string mModeName
size_t mModeIndex
Target mTarget
double mTargetAlt
bool mTargetAltAGL
double mTargetAltMin
double mTargetAltMax
double mTargetAltStep
bool mTargetAltRangeAGL
bool mAutomaticTargetCueing
bool mLineOfSightMasking
WsfStringId mTargetPlatformId
double mLatMin
double mLatMax
double mLatStep
double mLonMin
double mLonMax
double mLonStep
double mDownRangeMin
double mDownRangeMax
double mDownRangeStep
std::string mDownRangeUnits
double mCrossRangeMin
double mCrossRangeMax
double mCrossRangeStep
std::string mCrossRangeUnits
SupTMProjection mProjection
double mHeading
double mCenterLat
double mCenterLon
double mCenterEarthRadius
bool mUseTM_Projection
std::string mGnuPlotFile
std::string mGnuPlotPlayerFile
std::string mPdMapFile
std::string mHeaderLine1
std::string mHeaderLine2
std::string mHeaderLine3
size_t mOutputColumnLimit
std::string mKML_File
std::string mShapefile
std::string mSeditFile
std::string mWSF_File
std::vector< ContourLevelmContourLevels
std::string mContourVariable {"pd"}
std::string mDefendedAreaReportFile
AnalysisMapOptions mAnalysisMapOptions
std::string mTiffFilename
SelectorList mExclusionList
SelectorList mInclusionList
std::vector< WsfSensor * > mSensors
std::vector< WsfSensor * > mExcludedSensors
double mSensorToENU_Transform [3][3]
bool mFirstWrite
Protected Attributes inherited from MapPlotFunction
MapPlotVariables mPlotVariables {}
Protected Attributes inherited from Function
WsfPlatformAvailability mPlatformAvailability

Additional Inherited Members

Static Public Member Functions inherited from Function
static bool IsSensorPlotMode ()

Member Typedef Documentation

◆ Point

using HorizontalMapFunction::Point = std::vector<double>

The list of values at a specified sample point.

◆ SelectorList

using HorizontalMapFunction::SelectorList = std::vector<Selector>
protected

Constructor & Destructor Documentation

◆ HorizontalMapFunction()

Member Function Documentation

◆ BuildContours()

◆ ConvertCartesianToSpherical()

void HorizontalMapFunction::ConvertCartesianToSpherical ( double aDownRange,
double aCrossRange,
double & aLatitude,
double & aLongitude )
protected

Given a down range and cross range value from the sensor, compute the equivalent latitude and longitude.

References mCenterEarthRadius, mCenterLat, mCenterLon, mProjection, mSensorToENU_Transform, and mUseTM_Projection.

Referenced by BuildContours(), WriteAnalysisMapFile(), WriteKML_File(), WriteSeditContours(), WriteShapefile(), and WriteWSFContours().

◆ ConvertSphericalToCartesian()

void HorizontalMapFunction::ConvertSphericalToCartesian ( double aLatitude,
double aLongitude,
double & aDownRange,
double & aCrossRange )
protected

Given a latitude and longitude, compute the equivalent down range and cross range values.

References mCenterEarthRadius, mCenterLat, mCenterLon, mProjection, mSensorToENU_Transform, and mUseTM_Projection.

Referenced by WriteGnuPlotPlayerFile().

◆ CreateSensorList()

◆ EvaluatePoint()

void HorizontalMapFunction::EvaluatePoint ( double aSimTime,
double aRowValue,
double aColValue,
std::vector< double > & aVarValues )
protected

Determine the function value for a point.

This routine will perform a detection attempt from all sensors against the target. The return value is the selected function for the sensor that had the best probability of detection.

References WsfEM_Interaction::cRCVR_TERRAIN_MASKING, Utility::CueSensorToTarget(), WsfEM_Interaction::cXMTR_TERRAIN_MASKING, WsfMode::GetModeIndex(), WsfEM_Interaction::MaskedByTerrain(), mAutomaticTargetCueing, WsfEM_Interaction::mCheckedStatus, mDownRangeUnits, mExcludedSensors, WsfEM_Interaction::mFailedStatus, mLineOfSightMasking, mModeIndex, MapPlotFunction::mPlotVariables, mSensors, mSimulationPtr, mTarget, mTargetPlatformId, and settings().

Referenced by BuildContours().

◆ Execute()

◆ GetPdMapFileJsonMetadata()

std::string HorizontalMapFunction::GetPdMapFileJsonMetadata ( ) const
protected

Returns the JSON metadata to be associated with a PD map output file. The metadata contains the name of the variable that the data pertains to as well as the names of the data that make up the X and Y axes. This metadata can be used to label the data in visualizations; e.g., in the IDE.

References mCrossRangeUnits, mDownRangeUnits, and MapPlotFunction::mPlotVariables.

Referenced by WritePdMapFile().

◆ GreatCircleHeadingAndDistance()

void HorizontalMapFunction::GreatCircleHeadingAndDistance ( double aBegLat,
double aBegLon,
double aEndLat,
double aEndLon,
double & aHeading,
double & aDistance )
staticprotected

◆ InitializeSensorPlatforms()

void HorizontalMapFunction::InitializeSensorPlatforms ( double aSimTime)
protected

◆ InSelectorList()

◆ LoopOverTargetAltitude()

bool HorizontalMapFunction::LoopOverTargetAltitude ( size_t aPdVarIndex)
protected

◆ LoopOverTargetPitch()

bool HorizontalMapFunction::LoopOverTargetPitch ( size_t aPdVarIndex)
protected

References LoopOverTargetRoll(), mTarget, and ok.

Referenced by LoopOverTargetAltitude().

◆ LoopOverTargetRoll()

bool HorizontalMapFunction::LoopOverTargetRoll ( size_t aPdVarIndex)
protected

References BuildContours(), mTarget, and ok.

Referenced by LoopOverTargetPitch().

◆ ProcessInput()

◆ ProcessTargetRegion()

bool HorizontalMapFunction::ProcessTargetRegion ( UtInput & aInput)
protected

Process target region definition commands. Formerly these could go only in a 'target_region' block, but now they can also appear outside the block. This makes it consistent with the vertical_map command where the region commands weren't bounded by a block. Requiring them to be in a block was kind of useless, so now we'll accept it either way.

References mCrossRangeMax, mCrossRangeMin, mCrossRangeStep, mCrossRangeUnits, mDownRangeMax, mDownRangeMin, mDownRangeStep, mDownRangeUnits, mLatMax, mLatMin, mLatStep, mLonMax, mLonMin, and mLonStep.

Referenced by ProcessInput().

◆ ReadSelector()

◆ WriteAnalysisMapFile()

void HorizontalMapFunction::WriteAnalysisMapFile ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues,
size_t aVarIndex )
protected

◆ WriteCustomOutputFormats()

virtual void HorizontalMapFunction::WriteCustomOutputFormats ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues,
size_t aVarIndex )
inlineprotectedvirtual

Referenced by BuildContours().

◆ WriteDefendedAreaReport()

void HorizontalMapFunction::WriteDefendedAreaReport ( const std::vector< double > & aAreaByPd)
protected

◆ WriteGnuPlotFile()

void HorizontalMapFunction::WriteGnuPlotFile ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues )
protected

◆ WriteGnuPlotPlayerFile()

void HorizontalMapFunction::WriteGnuPlotPlayerFile ( )
protected

Write output gnuplot player location output.

References ConvertSphericalToCartesian(), cUNDEFINED, mCrossRangeUnits, mDownRangeUnits, mGnuPlotPlayerFile, mLatMax, mSimulationPtr, mTarget, and platformPtr.

Referenced by BuildContours().

◆ WriteKML_File()

void HorizontalMapFunction::WriteKML_File ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues,
size_t aVarIndex )
protected

◆ WritePdMapFile()

void HorizontalMapFunction::WritePdMapFile ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues,
size_t aVarIndex )
protected

◆ WriteSeditContours()

void HorizontalMapFunction::WriteSeditContours ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues,
size_t aVarIndex )
protected

◆ WriteShapefile()

void HorizontalMapFunction::WriteShapefile ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues,
size_t aVarIndex )
protected

Write the shapefile output if requested.

References ContourFilter2D::Contour(), ConvertCartesianToSpherical(), cUNDEFINED, mContourLevels, mLatMax, mShapefile, and mSimulationPtr.

Referenced by BuildContours().

◆ WriteTiffFile()

void HorizontalMapFunction::WriteTiffFile ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues ) const
protected

◆ WriteWSFContours()

void HorizontalMapFunction::WriteWSFContours ( const std::vector< double > & aRowValues,
const std::vector< double > & aColValues,
const std::vector< Point > & aVarValues,
size_t aVarIndex )
protected

Member Data Documentation

◆ cUNDEFINED

◆ mAnalysisMapOptions

AnalysisMapOptions HorizontalMapFunction::mAnalysisMapOptions
protected

◆ mAutomaticTargetCueing

bool HorizontalMapFunction::mAutomaticTargetCueing
protected

◆ mCenterEarthRadius

double HorizontalMapFunction::mCenterEarthRadius
protected

◆ mCenterLat

double HorizontalMapFunction::mCenterLat
protected

◆ mCenterLon

double HorizontalMapFunction::mCenterLon
protected

◆ mContourLevels

std::vector<ContourLevel> HorizontalMapFunction::mContourLevels
protected

◆ mContourVariable

std::string HorizontalMapFunction::mContourVariable {"pd"}
protected

Referenced by Execute(), and ProcessInput().

◆ mCrossRangeMax

◆ mCrossRangeMin

◆ mCrossRangeStep

double HorizontalMapFunction::mCrossRangeStep
protected

◆ mCrossRangeUnits

◆ mDefendedAreaReportFile

std::string HorizontalMapFunction::mDefendedAreaReportFile
protected

◆ mDownRangeMax

◆ mDownRangeMin

◆ mDownRangeStep

double HorizontalMapFunction::mDownRangeStep
protected

◆ mDownRangeUnits

◆ mExcludedSensors

std::vector<WsfSensor*> HorizontalMapFunction::mExcludedSensors
protected

◆ mExclusionList

SelectorList HorizontalMapFunction::mExclusionList
protected

◆ mFirstWrite

bool HorizontalMapFunction::mFirstWrite
protected

◆ mGnuPlotFile

std::string HorizontalMapFunction::mGnuPlotFile
protected

◆ mGnuPlotPlayerFile

std::string HorizontalMapFunction::mGnuPlotPlayerFile
protected

◆ mHeaderLine1

std::string HorizontalMapFunction::mHeaderLine1
protected

◆ mHeaderLine2

std::string HorizontalMapFunction::mHeaderLine2
protected

◆ mHeaderLine3

std::string HorizontalMapFunction::mHeaderLine3
protected

◆ mHeading

double HorizontalMapFunction::mHeading
protected

◆ mInclusionList

SelectorList HorizontalMapFunction::mInclusionList
protected

◆ mKML_File

std::string HorizontalMapFunction::mKML_File
protected

◆ mLatMax

◆ mLatMin

◆ mLatStep

double HorizontalMapFunction::mLatStep
protected

◆ mLineOfSightMasking

bool HorizontalMapFunction::mLineOfSightMasking
protected

◆ mLonMax

◆ mLonMin

◆ mLonStep

double HorizontalMapFunction::mLonStep
protected

◆ mModeIndex

size_t HorizontalMapFunction::mModeIndex
protected

◆ mModeName

std::string HorizontalMapFunction::mModeName
protected

◆ mOutputColumnLimit

size_t HorizontalMapFunction::mOutputColumnLimit
protected

◆ mPdMapFile

std::string HorizontalMapFunction::mPdMapFile
protected

◆ mProjection

SupTMProjection HorizontalMapFunction::mProjection
protected

Used for converting between X/Y and Lat/Lon. Only used when use_tm_projection input is true.

Referenced by BuildContours(), ConvertCartesianToSpherical(), ConvertSphericalToCartesian(), and HorizontalMapFunction().

◆ mSeditFile

std::string HorizontalMapFunction::mSeditFile
protected

◆ mSensorPlatformPitch

double HorizontalMapFunction::mSensorPlatformPitch
protected

◆ mSensorPlatformRoll

double HorizontalMapFunction::mSensorPlatformRoll
protected

◆ mSensorPlatformYaw

double HorizontalMapFunction::mSensorPlatformYaw
protected

◆ mSensors

std::vector<WsfSensor*> HorizontalMapFunction::mSensors
protected

◆ mSensorToENU_Transform

double HorizontalMapFunction::mSensorToENU_Transform[3][3]
protected

◆ mShapefile

std::string HorizontalMapFunction::mShapefile
protected

◆ mSimulationPtr

◆ mTarget

◆ mTargetAlt

double HorizontalMapFunction::mTargetAlt
protected

◆ mTargetAltAGL

bool HorizontalMapFunction::mTargetAltAGL
protected

◆ mTargetAltMax

double HorizontalMapFunction::mTargetAltMax
protected

◆ mTargetAltMin

double HorizontalMapFunction::mTargetAltMin
protected

◆ mTargetAltRangeAGL

bool HorizontalMapFunction::mTargetAltRangeAGL
protected

◆ mTargetAltStep

double HorizontalMapFunction::mTargetAltStep
protected

◆ mTargetPlatformId

WsfStringId HorizontalMapFunction::mTargetPlatformId
protected

◆ mTiffFilename

std::string HorizontalMapFunction::mTiffFilename
protected

◆ mUseTM_Projection

bool HorizontalMapFunction::mUseTM_Projection
protected

◆ mWSF_File

std::string HorizontalMapFunction::mWSF_File
protected

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