WSF
WsfLOS_Manager Class Reference

#include <WsfLOS_Manager.hpp>

Inheritance diagram for WsfLOS_Manager:
Collaboration diagram for WsfLOS_Manager:

Classes

class  State
 State data used in LOS calculations. More...
class  LOS_Key
 Line-of-sight key - a combination of the unique IDs of the two entities. More...

Public Member Functions

 WsfLOS_Manager (WsfLOS_ManagerData &aData)
 ~WsfLOS_Manager () override
bool Initialize () override
 Initialize the LOS manager.
void PlatformDeleted (double aSimTime, WsfPlatform *aPlatformPtr)
 Removes LOS data when a platform is deleted.
void Update (double aSimTime)
 Simulation time has advanced; platforms are updated.
bool DebugEnabled () const
 Determine if debugging is enabled.
void SetDebugEnabled (bool aDebugEnabled)
Public Member Functions inherited from WsfSimulationExtension
 WsfSimulationExtension ()
 ~WsfSimulationExtension () override=default
WsfSimulationGetSimulation () const
const WsfScenarioGetScenario () const
virtual void AddedToSimulation ()
virtual bool PrepareExtension ()
virtual bool PlatformsInitialized ()
virtual void PendingStart ()
virtual void Start ()
virtual void Complete (double aSimTime)
Public Member Functions inherited from WsfExtension
virtual ~WsfExtension ()=default
const std::string & GetExtensionName () const
Public Member Functions inherited from WsfLOS_ManagerData
 WsfLOS_ManagerData ()
bool ProcessInput (UtInput &aInput)
 Process the line_of_sight_manager block.

Static Public Member Functions

static WsfLOS_ManagerFind (const WsfSimulation &aSimulation)
static void __private_SetSim (WsfSimulationExtension &aExtension, WsfSimulation *aSimPtr)

Vegetation masking methods

typedef std::map< unsigned int, StateStateMapType
typedef std::map< unsignedint, State >::iterator StateMapTypeIterator
typedef std::pair< unsigned int, StateStateMapTypePair
typedef std::map< LOS_Key, bool > LOS_MapType
typedef std::map< LOS_Key, bool >::iterator LOS_MapTypeIterator
typedef std::pair< LOS_Key, bool > LOS_MapTypePair
typedef std::list< unsigned int > LOS_RequestType
typedef std::list< unsignedint >::iterator LOS_RequestTypeIterator
typedef std::map< unsigned int, unsigned int > PriorityQueueType
typedef std::map< unsignedint, unsignedint >::iterator PriorityQueueTypeIterator
typedef std::pair< unsigned int, unsigned int > PriorityQueueTypePair
bool MaskedByVegetation (WsfPlatform *aPlatformPtr, WsfPlatform *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool MaskedByVegetation (WsfEM_Antenna *aAntennaPtr, WsfPlatform *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool MaskedByVegetation (WsfEM_Antenna *aAntennaPtr, WsfEM_Antenna *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
StateMapTypeGetStateData ()
 Reference to the LOS manager state data so worker thread can use it.

Platform and part move check methods

bool PlatformMoved (WsfPlatform *aPlatformPtr)
bool PlatformMoveCheck (WsfPlatform *aPlatformPtr, StateMapTypeIterator &aIter)
bool PartMoved (WsfArticulatedPart *aPartPtr)
bool PartMoveCheck (WsfArticulatedPart *aPartPtr, StateMapTypeIterator &aIter)

LOS check methods

bool IsTargetVisible (WsfPlatform *aPlatformPtr, WsfPlatform *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool IsTargetVisible (WsfEM_Antenna *aAntennaPtr, WsfPlatform *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool IsTargetVisible (WsfEM_Antenna *aAntennaPtr, WsfEM_Antenna *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)

Terrain masking methods

bool MaskedByTerrain (WsfPlatform *aPlatformPtr, WsfPlatform *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool MaskedByTerrain (WsfEM_Antenna *aAntennaPtr, WsfPlatform *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool MaskedByTerrain (WsfEM_Antenna *aAntennaPtr, WsfEM_Antenna *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)

LOS check methods - Non-threaded

bool IsTargetVisibleNow (WsfPlatform *aPlatformPtr, WsfPlatform *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool IsTargetVisibleNow (WsfEM_Antenna *aAntennaPtr, WsfPlatform *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool IsTargetVisibleNow (WsfEM_Antenna *aAntennaPtr, WsfEM_Antenna *aTargetPtr, double aMaxRange=0.0, double aRadiusScale=1.0)
bool Moved (WsfEM_Antenna *aAntennaPtr)
 Returns true if entity's movement is greater than the move tolerance (default is true).
bool Moved (WsfPlatform *aPlatformPtr)
bool LOS_DataExists (unsigned int aID1, unsigned int aID2)
 Returns true if LOS data exists for the two entities.
bool LOS_DataExists (unsigned int aID1, unsigned int aID2, LOS_MapTypeIterator &aIter)
bool LOS_DataExists (unsigned int aID1, unsigned int aID2, LOS_MapType &aLOS_Map, LOS_MapTypeIterator &aIter)
bool StateDataExists (unsigned int aID)
 Returns true is state data exists for the entity.
bool StateDataExists (unsigned int aID, StateMapTypeIterator &iter)
bool SetLOS_Data (unsigned int aID1, unsigned int aID2, bool aVisible)
 Returns true if LOS data was successfully updated.
bool SetLOS_Data (unsigned int aID1, unsigned int aID2, bool aVisible, LOS_MapTypeIterator &aIter)
bool SetStateData (unsigned int aID, State &aNewState)
 Returns true if state data was successfully updated.
bool SetStateData (unsigned int aID, State &aNewState, StateMapTypeIterator &aIter)
void DeleteLOS_Data (unsigned int aID, LOS_MapType &aLOS_Map)
 Removes all map entries from the given map with a LOS_Key containing the given ID.
void UpdateStateData (LOS_RequestType &aLOS_RequestQueue)
 Used in multi-threaded mode; updates the platform and part state data.

Additional Inherited Members

Public Attributes inherited from WsfLOS_ManagerData
double mMaxAllowableLocDelta
 Maximum location change allowed to determine if move occurred.
bool mMultiThreaded
 Thread behavior.
bool mDebugEnabled
 Debug flag.
bool mVegLayerMaskingEnabled
 Vegetation Layer Masking.
bool mUseHeightForGroundPlatforms
ThreadData mThreadData
Protected Member Functions inherited from WsfExtension
void InitializeExtensionName (const std::string &aName)

Detailed Description

The line of sight manager provides a centralized location from which LOS checks are handled. These checks occur particularly frequently in sensor AttemptToDetect methods. Through caching LOS checks, particularly for static platforms, the "m on n" computational problem is somewhat mitigated.

Note
Line of sight manager Works in both a threaded and non-threaded mode.

Member Typedef Documentation

◆ LOS_MapType

typedef std::map<LOS_Key, bool> WsfLOS_Manager::LOS_MapType

◆ LOS_MapTypeIterator

typedef std::map<LOS_Key,bool>::iterator WsfLOS_Manager::LOS_MapTypeIterator

◆ LOS_MapTypePair

typedef std::pair<LOS_Key, bool> WsfLOS_Manager::LOS_MapTypePair

◆ LOS_RequestType

typedef std::list<unsigned int> WsfLOS_Manager::LOS_RequestType

◆ LOS_RequestTypeIterator

typedef std::list<unsignedint>::iterator WsfLOS_Manager::LOS_RequestTypeIterator

◆ PriorityQueueType

typedef std::map<unsigned int, unsigned int> WsfLOS_Manager::PriorityQueueType

◆ PriorityQueueTypeIterator

typedef std::map<unsignedint,unsignedint>::iterator WsfLOS_Manager::PriorityQueueTypeIterator

◆ PriorityQueueTypePair

typedef std::pair<unsigned int, unsigned int> WsfLOS_Manager::PriorityQueueTypePair

◆ StateMapType

typedef std::map<unsigned int, State> WsfLOS_Manager::StateMapType

◆ StateMapTypeIterator

typedef std::map<unsignedint,State>::iterator WsfLOS_Manager::StateMapTypeIterator

◆ StateMapTypePair

typedef std::pair<unsigned int, State> WsfLOS_Manager::StateMapTypePair

Constructor & Destructor Documentation

◆ WsfLOS_Manager()

◆ ~WsfLOS_Manager()

WsfLOS_Manager::~WsfLOS_Manager ( )
override

Member Function Documentation

◆ DebugEnabled()

bool WsfLOS_Manager::DebugEnabled ( ) const
inline

Determine if debugging is enabled.

References WsfLOS_ManagerData::mDebugEnabled.

◆ DeleteLOS_Data()

void WsfLOS_Manager::DeleteLOS_Data ( unsigned int aID,
LOS_MapType & aLOS_Map )
protected

Removes all map entries from the given map with a LOS_Key containing the given ID.

Delete all LOS data containing the given ID.

Parameters
aID[input] The ID to remove.
aLOS_Map[input] The LOS container to process.

Referenced by PlatformDeleted(), and Update().

◆ Find()

WsfLOS_Manager * WsfLOS_Manager::Find ( const WsfSimulation & aSimulation)
static

◆ GetStateData()

StateMapType & WsfLOS_Manager::GetStateData ( )
inline

Reference to the LOS manager state data so worker thread can use it.

◆ Initialize()

bool WsfLOS_Manager::Initialize ( )
overridevirtual

Initialize the LOS manager.

Initializes the LOS manager; called by WsfSimulation.

Returns
'true'.

Reimplemented from WsfSimulationExtension.

References WsfSimulationExtension::GetSimulation(), WsfLOS_ManagerData::mMultiThreaded, PlatformDeleted(), and WsfObserver::PlatformDeleted().

◆ IsTargetVisible() [1/3]

bool WsfLOS_Manager::IsTargetVisible ( WsfEM_Antenna * aAntennaPtr,
WsfEM_Antenna * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target visible.

Parameters
aAntennaPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if target is visible or 'false' if not.

References WsfEM_Antenna::GetArticulatedPart(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfSimulationExtension::GetSimulation(), WsfUniqueId::GetUniqueId(), IsTargetVisibleNow(), LOS_DataExists(), WsfLOS_ManagerData::mDebugEnabled, WsfLOS_ManagerData::mMultiThreaded, and simTime.

◆ IsTargetVisible() [2/3]

bool WsfLOS_Manager::IsTargetVisible ( WsfEM_Antenna * aAntennaPtr,
WsfPlatform * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target visible.

Parameters
aAntennaPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if target is visible or 'false' if not.

References WsfEM_Antenna::GetArticulatedPart(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfSimulationExtension::GetSimulation(), WsfUniqueId::GetUniqueId(), IsTargetVisibleNow(), LOS_DataExists(), WsfLOS_ManagerData::mDebugEnabled, WsfLOS_ManagerData::mMultiThreaded, and simTime.

◆ IsTargetVisible() [3/3]

bool WsfLOS_Manager::IsTargetVisible ( WsfPlatform * aPlatformPtr,
WsfPlatform * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target visible.

Parameters
aPlatformPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if target is visible or 'false' if not.

References WsfObject::GetName(), WsfSimulationExtension::GetSimulation(), WsfUniqueId::GetUniqueId(), IsTargetVisibleNow(), LOS_DataExists(), WsfLOS_ManagerData::mDebugEnabled, WsfLOS_ManagerData::mMultiThreaded, and simTime.

◆ IsTargetVisibleNow() [1/3]

bool WsfLOS_Manager::IsTargetVisibleNow ( WsfEM_Antenna * aAntennaPtr,
WsfEM_Antenna * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )
protected

Is the line-of-sight to a target visible.

Parameters
aAntennaPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if target is visible or 'false' if not.

References WsfEM_Antenna::GetArticulatedPart(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfUniqueId::GetUniqueId(), LOS_DataExists(), MaskedByTerrain(), MaskedByVegetation(), WsfLOS_ManagerData::mDebugEnabled, Moved(), WsfLOS_ManagerData::mVegLayerMaskingEnabled, and SetLOS_Data().

◆ IsTargetVisibleNow() [2/3]

bool WsfLOS_Manager::IsTargetVisibleNow ( WsfEM_Antenna * aAntennaPtr,
WsfPlatform * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )
protected

Is the line-of-sight to a target visible.

Parameters
aAntennaPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if target is visible or 'false' if not.

References WsfEM_Antenna::GetArticulatedPart(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfUniqueId::GetUniqueId(), LOS_DataExists(), MaskedByTerrain(), MaskedByVegetation(), WsfLOS_ManagerData::mDebugEnabled, Moved(), WsfLOS_ManagerData::mVegLayerMaskingEnabled, and SetLOS_Data().

◆ IsTargetVisibleNow() [3/3]

bool WsfLOS_Manager::IsTargetVisibleNow ( WsfPlatform * aPlatformPtr,
WsfPlatform * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )
protected

Is the line-of-sight to a target visible.

Parameters
aPlatformPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if target is visible or 'false' if not.

References WsfObject::GetName(), WsfUniqueId::GetUniqueId(), LOS_DataExists(), MaskedByTerrain(), MaskedByVegetation(), WsfLOS_ManagerData::mDebugEnabled, Moved(), WsfLOS_ManagerData::mVegLayerMaskingEnabled, and SetLOS_Data().

Referenced by IsTargetVisible(), IsTargetVisible(), and IsTargetVisible().

◆ LOS_DataExists() [1/3]

bool WsfLOS_Manager::LOS_DataExists ( unsigned int aID1,
unsigned int aID2 )
protected

Returns true if LOS data exists for the two entities.

Does line-of-sight data already exist for the two entities.

Parameters
aID1[input] Unique ID of endpoint entity.
aID2[input] Unique ID of other endpoint entity.
Returns
'true' if LOS data exists or 'false' if not.

References WsfSimulationExtension::GetSimulation(), and WsfSimulation::MultiThreadingActive().

Referenced by IsTargetVisible(), IsTargetVisible(), IsTargetVisible(), IsTargetVisibleNow(), IsTargetVisibleNow(), and IsTargetVisibleNow().

◆ LOS_DataExists() [2/3]

bool WsfLOS_Manager::LOS_DataExists ( unsigned int aID1,
unsigned int aID2,
LOS_MapType & aLOS_Map,
LOS_MapTypeIterator & aIter )
protected

Does line-of-sight data already exist for the two entities.

Parameters
aID1[input] Unique ID of endpoint entity.
aID2[input] Unique ID of other endpoint entity.
aLOS_Map[input] LOS data container to search
aIter[output] Iterator pointing to the entry if it exists.
Returns
'true' if LOS data exists or 'false' if not.

References WsfSimulationExtension::GetSimulation(), and WsfSimulation::MultiThreadingActive().

◆ LOS_DataExists() [3/3]

bool WsfLOS_Manager::LOS_DataExists ( unsigned int aID1,
unsigned int aID2,
LOS_MapTypeIterator & aIter )
protected

Does line-of-sight data already exist for the two entities.

Parameters
aID1[input] Unique ID of endpoint entity.
aID2[input] Unique ID of other endpoint entity.
aIter[output] Iterator pointing to the entry if it exists.
Returns
'true' if LOS data exists or 'false' if not.

References WsfSimulationExtension::GetSimulation(), and WsfSimulation::MultiThreadingActive().

◆ MaskedByTerrain() [1/3]

bool WsfLOS_Manager::MaskedByTerrain ( WsfEM_Antenna * aAntennaPtr,
WsfEM_Antenna * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target obscured by the terrain.

Parameters
aAntennaPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if masked by terrain or 'false' if not.

References WsfEM_Antenna::GetLocationLLA(), WsfSimulationExtension::GetSimulation(), WsfSimulation::GetTerrainInterface(), and wsf::TerrainInterface::MaskedByTerrain().

◆ MaskedByTerrain() [2/3]

bool WsfLOS_Manager::MaskedByTerrain ( WsfEM_Antenna * aAntennaPtr,
WsfPlatform * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target obscured by the terrain.

Parameters
aAntennaPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if masked by terrain or 'false' if not.

References WsfPlatform::GetHeight(), WsfEM_Antenna::GetLocationLLA(), WsfSimulationExtension::GetSimulation(), WsfPlatform::GetSpatialDomain(), WsfSimulation::GetTerrainInterface(), wsf::TerrainInterface::MaskedByTerrain(), WsfLOS_ManagerData::mUseHeightForGroundPlatforms, and WSF_SPATIAL_DOMAIN_LAND.

◆ MaskedByTerrain() [3/3]

bool WsfLOS_Manager::MaskedByTerrain ( WsfPlatform * aPlatformPtr,
WsfPlatform * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target obscured by the terrain.

Parameters
aPlatformPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if masked by terrain or 'false' if not.

References WsfPlatform::GetHeight(), WsfSimulationExtension::GetSimulation(), WsfPlatform::GetSpatialDomain(), WsfSimulation::GetTerrainInterface(), wsf::TerrainInterface::MaskedByTerrain(), WsfLOS_ManagerData::mUseHeightForGroundPlatforms, and WSF_SPATIAL_DOMAIN_LAND.

Referenced by IsTargetVisibleNow(), IsTargetVisibleNow(), and IsTargetVisibleNow().

◆ MaskedByVegetation() [1/3]

bool WsfLOS_Manager::MaskedByVegetation ( WsfEM_Antenna * aAntennaPtr,
WsfEM_Antenna * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target obscured by the vegetation layer.

Parameters
aAntennaPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if masked by terrain or 'false' if not.

References WsfEM_Antenna::GetLocationLLA(), WsfSimulationExtension::GetSimulation(), WsfSimulation::GetTerrainInterface(), and wsf::TerrainInterface::MaskedByVegetation().

◆ MaskedByVegetation() [2/3]

bool WsfLOS_Manager::MaskedByVegetation ( WsfEM_Antenna * aAntennaPtr,
WsfPlatform * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target obscured by the vegetation layer.

Parameters
aAntennaPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if masked by terrain or 'false' if not.

References WsfEM_Antenna::GetLocationLLA(), WsfSimulationExtension::GetSimulation(), WsfSimulation::GetTerrainInterface(), and wsf::TerrainInterface::MaskedByVegetation().

◆ MaskedByVegetation() [3/3]

bool WsfLOS_Manager::MaskedByVegetation ( WsfPlatform * aPlatformPtr,
WsfPlatform * aTargetPtr,
double aMaxRange = 0.0,
double aRadiusScale = 1.0 )

Is the line-of-sight to a target obscured by the vegetation layer.

Parameters
aPlatformPtr[input] Pointer to the source.
aTargetPtr[input] Pointer to the target.
aMaxRange[input] Distance at which to stop checking. (default = 0.0; no range checking)
aRadiusScale[input] Effective earth radius multiplier (default = 1.0)
Returns
'true' if masked by terrain or 'false' if not.

References WsfSimulationExtension::GetSimulation(), WsfSimulation::GetTerrainInterface(), and wsf::TerrainInterface::MaskedByVegetation().

Referenced by IsTargetVisibleNow(), IsTargetVisibleNow(), and IsTargetVisibleNow().

◆ Moved() [1/2]

bool WsfLOS_Manager::Moved ( WsfEM_Antenna * aAntennaPtr)
protected

Returns true if entity's movement is greater than the move tolerance (default is true).

Has the entity moved beyond the allowable tolerance.

Parameters
aAntennaPtr[input] Pointer to the entity.
Returns
'true' if entity has moved or 'false' if not.

References WsfEM_Antenna::GetArticulatedPart(), and PartMoved().

Referenced by IsTargetVisibleNow(), IsTargetVisibleNow(), and IsTargetVisibleNow().

◆ Moved() [2/2]

bool WsfLOS_Manager::Moved ( WsfPlatform * aPlatformPtr)
protected

Has the entity moved beyond the allowable tolerance.

Parameters
aPlatformPtr[input] Pointer to the entity.
Returns
'true' if entity has moved or 'false' if not.

References PlatformMoved().

◆ PartMoveCheck()

bool WsfLOS_Manager::PartMoveCheck ( WsfArticulatedPart * aPartPtr,
StateMapTypeIterator & aIter )
protected

Performs a move check on a platform part and save the state data.

Parameters
aPartPtr[input] A pointer to the platform.
aIter[input] Iterator pointing to the entry.
Returns
'true' if the platform part has moved or 'false' if not.

References WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfUniqueId::GetUniqueId(), WsfLOS_ManagerData::mDebugEnabled, WsfLOS_Manager::State::mLLA, WsfLOS_Manager::State::mLocationWCS, WsfLOS_ManagerData::mMaxAllowableLocDelta, WsfLOS_Manager::State::mMoved, WsfLOS_Manager::State::mPlatformIndex, WsfLOS_Manager::State::mTime, and SetStateData().

Referenced by PartMoved(), and UpdateStateData().

◆ PartMoved()

bool WsfLOS_Manager::PartMoved ( WsfArticulatedPart * aPartPtr)
protected

Performs a move check on a platform part and save the state data.

Parameters
aPartPtr[input] A pointer to the platform.
Returns
'true' if the platform part has moved or 'false' if not.

References WsfPlatform::GetIndex(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfUniqueId::GetUniqueId(), WsfLOS_ManagerData::mDebugEnabled, WsfLOS_Manager::State::mLLA, WsfLOS_Manager::State::mLocationWCS, WsfLOS_Manager::State::mMoved, WsfLOS_Manager::State::mPlatformIndex, PartMoveCheck(), SetStateData(), and StateDataExists().

Referenced by Moved().

◆ PlatformDeleted()

void WsfLOS_Manager::PlatformDeleted ( double aSimTime,
WsfPlatform * aPlatformPtr )

Removes LOS data when a platform is deleted.

Perform cleanup associated with a platform being deleted from the simulation.

Parameters
aSimTime[input] The current simulation time.
aPlatformPtr[input] Pointer to the platform to be deleted.

References WsfComponentList::RoleIterator< T >::AtEnd(), DeleteLOS_Data(), WsfSimulationExtension::GetSimulation(), WsfUniqueId::GetUniqueId(), WsfLOS_ManagerData::mMultiThreaded, WsfSimulation::MultiThreadingActive(), and StateDataExists().

Referenced by Initialize().

◆ PlatformMoveCheck()

bool WsfLOS_Manager::PlatformMoveCheck ( WsfPlatform * aPlatformPtr,
StateMapTypeIterator & aIter )
protected

Performs a move check on a platform and save the state data.

Parameters
aPlatformPtr[input] A pointer to the platform.
aIter[input] Iterator pointing to the entry.
Returns
'true' if the platform has moved or 'false' if not.

References WsfObject::GetName(), WsfUniqueId::GetUniqueId(), WsfLOS_ManagerData::mDebugEnabled, WsfLOS_Manager::State::mLLA, WsfLOS_Manager::State::mLocationWCS, WsfLOS_ManagerData::mMaxAllowableLocDelta, WsfLOS_Manager::State::mMoved, WsfLOS_Manager::State::mPlatformIndex, WsfLOS_Manager::State::mTime, and SetStateData().

Referenced by PlatformMoved(), and UpdateStateData().

◆ PlatformMoved()

bool WsfLOS_Manager::PlatformMoved ( WsfPlatform * aPlatformPtr)
protected

Performs a move check on a platform and save the state data.

Parameters
aPlatformPtr[input] A pointer to the platform.
Returns
'true' if the platform has moved or 'false' if not.

References WsfPlatform::GetIndex(), WsfObject::GetName(), WsfUniqueId::GetUniqueId(), WsfLOS_ManagerData::mDebugEnabled, WsfLOS_Manager::State::mLLA, WsfLOS_Manager::State::mLocationWCS, WsfLOS_Manager::State::mMoved, WsfLOS_Manager::State::mPlatformIndex, PlatformMoveCheck(), SetStateData(), and StateDataExists().

Referenced by Moved().

◆ SetDebugEnabled()

void WsfLOS_Manager::SetDebugEnabled ( bool aDebugEnabled)
inline

Set the debug state.

Parameters
aDebugEnabledNew debug state

References WsfLOS_ManagerData::mDebugEnabled.

◆ SetLOS_Data() [1/2]

bool WsfLOS_Manager::SetLOS_Data ( unsigned int aID1,
unsigned int aID2,
bool aVisible )
protected

Returns true if LOS data was successfully updated.

Set the line-of-sight data.

Parameters
aID1[input] Unique ID of endpoint entity.
aID2[input] Unique ID of other endpoint entity.
aVisible[input] True if line-of-sight between entities is not masked.
Returns
'true' if update was successful or 'false' if not.

References WsfSimulationExtension::GetSimulation(), WsfLOS_ManagerData::mMultiThreaded, and WsfSimulation::MultiThreadingActive().

Referenced by IsTargetVisibleNow(), IsTargetVisibleNow(), and IsTargetVisibleNow().

◆ SetLOS_Data() [2/2]

bool WsfLOS_Manager::SetLOS_Data ( unsigned int aID1,
unsigned int aID2,
bool aVisible,
LOS_MapTypeIterator & aIter )
protected

Set the line-of-sight data.

Parameters
aID1[input] Unique ID of endpoint entity.
aID2[input] Unique ID of other endpoint entity.
aVisible[input] True if line-of-sight between entities is not masked.
aIter[output] Iterator pointing to the entry if it exists.
Returns
'true' if update was successful or 'false' if not.

References WsfSimulationExtension::GetSimulation(), WsfLOS_ManagerData::mMultiThreaded, and WsfSimulation::MultiThreadingActive().

◆ SetStateData() [1/2]

bool WsfLOS_Manager::SetStateData ( unsigned int aID,
State & aNewState )
protected

Returns true if state data was successfully updated.

Set the state data.

Parameters
aID[input] Unique ID of entity.
aNewState[input] Current state of entity.
Returns
'true' if update was successful or 'false' if not.

References WsfSimulationExtension::GetSimulation(), WsfLOS_ManagerData::mMultiThreaded, and WsfSimulation::MultiThreadingActive().

Referenced by PartMoveCheck(), PartMoved(), PlatformMoveCheck(), and PlatformMoved().

◆ SetStateData() [2/2]

bool WsfLOS_Manager::SetStateData ( unsigned int aID,
State & aNewState,
StateMapTypeIterator & aIter )
protected

Set the state data.

Parameters
aID[input] Unique ID of entity.
aNewState[input] Current state of entity.
aIter[output] Iterator pointing to the entry if it exists.
Returns
'true' if update was successful or 'false' if not.

References WsfSimulationExtension::GetSimulation(), WsfLOS_ManagerData::mMultiThreaded, and WsfSimulation::MultiThreadingActive().

◆ StateDataExists() [1/2]

bool WsfLOS_Manager::StateDataExists ( unsigned int aID)
protected

Returns true is state data exists for the entity.

Does state data already exist for the entity.

Parameters
aID[input] Unique ID of entity.
Returns
'true' if state data exists or 'false' if not.

References WsfSimulationExtension::GetSimulation(), and WsfSimulation::MultiThreadingActive().

Referenced by PartMoved(), PlatformDeleted(), and PlatformMoved().

◆ StateDataExists() [2/2]

bool WsfLOS_Manager::StateDataExists ( unsigned int aID,
StateMapTypeIterator & aIter )
protected

Does state data already exist for the entity.

Parameters
aID[input] Unique ID of entity.
aIter[output] Iterator pointing to the entry if it exists.
Returns
'true' if state data exists or 'false' if not.

References WsfSimulationExtension::GetSimulation(), and WsfSimulation::MultiThreadingActive().

◆ Update()

void WsfLOS_Manager::Update ( double aSimTime)

Simulation time has advanced; platforms are updated.

Called by WsfFrameStepSimulatio::AdvanceFrame. Updates the state data.

Parameters
aSimTime[input] The current simulation time.

References DeleteLOS_Data(), WsfLOS_ManagerData::mDebugEnabled, WsfLOS_ManagerData::mMultiThreaded, and UpdateStateData().

◆ UpdateStateData()

void WsfLOS_Manager::UpdateStateData ( LOS_RequestType & aLOS_RequestQueue)
protected

Used in multi-threaded mode; updates the platform and part state data.

Update the LOS manager state data.

Parameters
aLOS_RequestQueue[output] The list of platforms or parts that have moved this frame.

References WsfSimulation::GetPlatformByIndex(), WsfSimulationExtension::GetSimulation(), PartMoveCheck(), PlatformMoveCheck(), and platformPtr.

Referenced by Update().


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