WSF
WsfSensor Class Referenceabstract

#include <WsfSensor.hpp>

Inheritance diagram for WsfSensor:
Collaboration diagram for WsfSensor:

Classes

class  Settings
class  ModeChangeEvent

Public Types

enum  {
  cACTIVE = 0x00000001 , cSEMI_ACTIVE = 0x00000002 , cPASSIVE = 0x00000004 , cRADIO = 0x00000010 ,
  cINFRARED = 0x00000020 , cVISUAL = 0x00000040 , cACOUSTIC = 0x00000080 , cIMAGING = 0x00001000
}
using Result = WsfSensorResult
Public Types inherited from WsfArticulatedPart
enum  SlewMode { cSLEW_FIXED = 0 , cSLEW_AZ = 1 , cSLEW_EL = 2 , cSLEW_AZ_EL = 3 }
enum  SlewDirection { cUNDEFINED = 0 , cPOSITIVE = 1 , cNEGATIVE = 2 }
enum  {
  cNOT_CUED = 0x0000 , cMIN_AZ = 0x0001 , cMAX_AZ = 0x0002 , cMIN_EL = 0x0004 ,
  cMAX_EL = 0x0008 , cAT_LIMIT_AZ_MASK = 0x0003 , cAT_LIMIT_EL_MASK = 0x000B , cAT_LIMIT_MASK = 0x000F ,
  cCUED_AZ = 0x0010 , cCUED_EL = 0x0020 , cCUED_AZ_EL = 0x0030 , cCUED_MASK = 0x0030
}
enum  CueType { cCUED_TO_NOTHING , cCUED_TO_LOCATION , cCUED_TO_ANGLE }
Public Types inherited from WsfPlatformPart
enum  { cLEVEL_ONE_DEBUG = 0x00000001 , cLEVEL_TWO_DEBUG = 0x00000002 }
using InternalMessageQueue = std::queue<WsfMessage*>
using RecipientMessageQueue = std::queue<std::pair<WsfPlatformPart*, WsfMessage*>>
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
Public Types inherited from WsfComponentT< WsfPlatform >
typedef WsfPlatform ParentType
 This is needed to support the WsfComponentList template.

Public Member Functions

 WsfSensor (const WsfScenario &aScenario)
 ~WsfSensor () override
Public Member Functions inherited from WsfArticulatedPart
 WsfArticulatedPart (const WsfScenario &aScenario, int aPartType)
 WsfArticulatedPart (const WsfArticulatedPart &aSrc)
 ~WsfArticulatedPart () override
void SetPositionRateECS (const double aDX, const double aDY, const double aDZ)
void GetCurrentPositionRateECS (double &aDX, double &aDY, double &aDZ) const
double GetDX () const
double GetDY () const
double GetDZ () const
void EnableArticulationUpdates (double aSimTime, double aInterval)
void DisableArticulationUpdates (double aSimTime)
void SetArticulationUpdateInterval (double aUpdateInterval)
double GetArticulationUpdateInterval () const
unsigned int GetArticulationUpdateEventEpoch () const
void IncrementArticulationUpdateEventEpoch ()
bool ArticulationUpdateEventActive () const
 Is an 'Update' event active?
void SetArticulationUpdateEventActive (bool aUpdateEventActive)
 Indicate if the 'Update' event is active.
virtual double TimeToCue (double aDesiredAz, double aDesiredEl) const
const char * GetScriptClassName () const override
void OnPlatformUpdated (double, WsfPlatform *) override
SlewMode GetSlewMode () const
 Get the allowed slewing mode.
double GetAzSlewRate () const
 Get the current azimuth slew rate.
double GetElSlewRate () const
 Get the current elevation slew rate.
double GetMaxAzSlewRate () const
 Get the maximum allowable azimuth slew rate.
double GetMaxElSlewRate () const
 Get the maximum allowable elevation slew rate.
double GetMinAzSlew () const
 Gets the minimum azimuth slew limit.
double GetMaxAzSlew () const
 Gets the maximum azimuth slew limit.
double GetMinElSlew () const
 Gets the minimum elevation slew limit.
double GetMaxElSlew () const
 Gets the maximum elevation slew limit.
int GetSlewState () const
 Get the slew limit state.
void SetSlewMode (SlewMode aSlewMode)
 Set the allowed slewing mode.
void SetSlewRates (double aAzSlewRate, double aElSlewRate)
 Set the angular slew rates, limited by the maximum slew rates.
void SetAzSlewLimits (double aMinAzSlew, double aMaxAzSlew)
 Set the azimuth slew limits.
void SetElSlewLimits (double aMinElSlew, double aMaxElSlew)
 Set the elevation slew limits.
void SetAzimuthSlewDirection (SlewDirection aAzSlewDirection)
 Set the azimuth slew direction.
bool IsSlewing () const
bool WithinSlewLimits (double aThisToTgtAz, double aThisToTgtEl) const
SlewMode GetCueMode () const
 Get the allowed cueing mode.
double GetAzCueRate () const
 Get the azimuth cue rate.
double GetElCueRate () const
 Get the elevation cue rate.
double GetMinAzCue () const
 Gets the minimum azimuth cue limit.
double GetMaxAzCue () const
 Gets the maximum azimuth cue limit.
double GetMinElCue () const
 Gets the minimum elevation cue limit.
double GetMaxElCue () const
 Gets the maximum elevation cue limit.
void SetCueMode (SlewMode aCueMode)
 Set the allowed cueing mode.
void SetCueRates (double aAzCueRate, double aElCueRate)
 Set the angular cueing rates.
void SetAzCueLimits (double aMinAzCue, double aMaxAzCue)
 Set the azimuth cueing limits.
void SetElCueLimits (double aMinElCue, double aMaxElCue)
 Set the elevation cueing limits.
double GetRoll () const
void SetRoll (double aRoll)
 Set the platform-relative (ECS) roll angle of the articulated part.
double GetPitch () const
void SetPitch (double aPitch)
double GetYaw () const
void SetYaw (double aYaw)
 Set the platform-relative (ECS) yaw angle of the articulated part.
double GetTilt () const
void SetTilt (double aTilt)
void GetCurrentOrientationECS (double &aYaw, double &aPitch, double &aRoll)
void GetLOS_UnitVectorWCS (double aUnitLOS_WCS[3])
 Get the current WCS Frame Line-Of-Sight unit vector.
CueType GetCueType () const
bool IsCued () const
 Get the cued status.
void ClearCueing ()
bool GetActualCuedOrientation (double &aAzimuth, double &aElevation) const
void GetCurrentCuedOrientation (double &aAzimuth, double &aElevation) const
bool GetCuedLocationWCS (double aCuedLocationWCS[3]) const
void SetCuedLocationWCS (const double aCuedLocationWCS[3])
bool GetCuedOrientation (double &aAzimuth, double &aElevation) const
void SetCuedOrientation (double aAzimuth, double aElevation)
void GetAbsoluteCuedOrientation (double &aAzimuth, double &aElevation, double aBaseNED[3])
void ClearTransientCue ()
bool TransientCueActive () const
bool GetTransientCuedLocationWCS (double aCuedLocationWCS[3]) const
void SetTransientCuedLocationWCS (const double aCuedLocationWCS[3])
WsfStringId GetMaskingPatternState () const
void SetMaskingPatternState (WsfStringId aMaskingPatternStateId)
double GetMaskingPatternFactor (double aViewAzPCS, double aViewElPCS, const double aViewVecWCS[3])
void SetIsPrivate (bool aIsPrivate)
bool IsPrivate () const
Public Member Functions inherited from WsfPlatformPart
 WsfPlatformPart (const WsfScenario &aScenario, int aPartType)
WsfPlatformPartoperator= (const WsfPlatformPart &aRhs)=delete
 ~WsfPlatformPart () override
bool DebugEnabled () const
 Returns 'true' if debugging is enabled for this instance.
void SetDebugEnabled (bool aDebugEnabled)
unsigned int GetDebugMask ()
bool IsExternallyControlled () const
virtual void SetExternallyControlled (double aSimTime, bool aIsExternallyControlled)
int GetPartType () const
const char * GetScriptClassName () const override
WsfSimulationGetSimulation () const
const WsfScenarioGetScenario () const
WsfStringId GetComponentName () const override
void ComponentParentChanged (WsfPlatform *aPlatformPtr) override
WsfPlatformGetPlatform () const
double GetLastStatusChangeTime () const
void SetLastStatusChangeTime (double aSimTime)
 Allows a system to set the time at which the device was initialized.
bool CanBeMadeOperational () const
 Returns an indication that this system can be made operational.
bool CanBeMadeNonOperational () const
 Returns an indication that this system can be made non-operational.
bool CanBeTurnedOn () const
 Returns an indication that this system can be turned on.
bool CanBeTurnedOff () const
 Returns an indication that this system can be turned off.
bool IsTurnedOn () const
bool InitiallyTurnedOn () const
 Is the system to be turned 'on' when added to the simulation?
void SetInitiallyTurnedOn (bool aInitiallyTurnedOn)
 Sets if the system is turned on when added to the simulation.
virtual void Restore (double aSimTime)
bool IsOperational () const
bool SetOperational (double aSimTime, bool aMakeOperational)
double GetDamageFactor () const
bool SetDamageFactor (double aSimTime, double aDamageFactor)
bool IsCritical () const
void SetCritical (bool aValue)
virtual void OnPlatformBrokenEvent (double aSimTime)
 Owning platform has issued a broken event.
bool IsBroken () const
WsfInternalLinksGetInternalLinks ()
 Return the internal links for this part.
virtual bool HasInternalLinks () const
 Does this platform part have a communication link to other platform parts?
virtual bool ProcessMessage (double aSimTime, const WsfMessage &aMessage)
virtual bool ReceiveMessage (double aSimTime, const WsfMessage &aMessage)
virtual void SendMessage (double aSimTime, const WsfMessage &aMessage)
virtual void SendMessageTo (double aSimTime, const WsfMessage &aMessage, WsfStringId aRecipientId)
void SendMessageToProcessor (double aSimTime, const WsfMessage &aMessage, WsfStringId aRecipientId)
virtual void SendQueuedMessages (double aSimTime)
const WsfCategoryListGetCategories () const
 Get the categories to which this part belongs.
void AddCategory (WsfStringId aCategoryId)
 Adds the provided category to the platform part's category list.
bool IsCategoryMember (WsfStringId aCategoryId) const
const WsfGroupListGetGroups () const
 Get the groups to which this platform part belongs.
void JoinGroup (WsfGroup *aGroupPtr)
 Join the given group.
void LeaveGroup (WsfGroup *aGroupPtr)
 Leave the given group.
bool IsGroupMember (WsfStringId aGroupId)
unsigned int GetUpdateEventEpoch () const
void IncrementUpdateEventEpoch ()
bool UpdateEventActive () const
 Is an 'Update' event active?
void SetUpdateEventActive (bool aUpdateEventActive)
 Indicate if the 'Update' event is active.
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)
Public Member Functions inherited from WsfComponentT< WsfPlatform >
 WsfComponentT ()
 WsfComponentT (const WsfComponentT &) noexcept
WsfComponentToperator= (const WsfComponentT &) noexcept
 ~WsfComponentT () override=default
ParentTypeGetComponentParent () const
void SetComponentParent (ParentType *aParentPtr)
Public Member Functions inherited from WsfComponent
virtual ~WsfComponent ()=default
template<typename T>
bool QueryInterfaceT (T *&aRolePtr)
bool ComponentHasRole (int aRole)
 Returns true if the component has the specified role.
Public Member Functions inherited from WsfUniqueId
 WsfUniqueId ()
 Construtor initializes the unique identifier to 0.
 WsfUniqueId (const WsfUniqueId &)
 Copy constructor initializes the unique identifier to 0.
WsfUniqueIdoperator= (const WsfUniqueId &)
unsigned int GetUniqueId () const
 Get the unique identifier assigned to this object.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
Public Member Functions inherited from WsfAuxDataEnabled
 WsfAuxDataEnabled ()=default
 WsfAuxDataEnabled (const WsfAuxDataEnabled &aSrc)=default
WsfAuxDataEnabledoperator= (const WsfAuxDataEnabled &aRhs)
 WsfAuxDataEnabled (WsfAuxDataEnabled &&)=default
WsfAuxDataEnabledoperator= (WsfAuxDataEnabled &&)=default
virtual ~WsfAuxDataEnabled () noexcept
void SetAuxData (const WsfAttributeContainer &aAuxData)
void DeleteAuxData ()
 Delete the aux data container from the object.
void MergeAuxData (const WsfAuxDataEnabled &aSrc)
 Merge the object's aux data with aux data from an existing object.
void UpdateAuxData (const WsfAuxDataEnabled &aSrc)
 Update the object's aux data with aux data from an existing object.
bool HasAuxData () const
 Returns true if this object has aux data.
bool ProcessInput (UtInput &aInput)
template<typename T>
void Serialize (T &aBuff)
 (De)serialization for XIO
WsfAttributeContainerGetAuxData ()
const WsfAttributeContainerGetAuxData () const noexcept
const WsfAttributeContainerGetAuxDataConst () const noexcept
Public Member Functions inherited from WsfSinglePlatformObserver
virtual ~WsfSinglePlatformObserver ()
virtual void OnPlatformDeleting (double aSimTime, WsfPlatform *aPlatformPtr)
 Called before the platform is actually deleted.
virtual void OnPlatformDeleted (double aSimTime, WsfPlatform *aPlatformPtr)
 Called just before the platform is removed from the simulation.

Component list support.

A processor contains a list of components.

using ComponentList = WsfComponentListT<WsfSensorComponent>
ComponentListGetComponents ()
const ComponentListGetComponents () const

Methods for simulation control of the update interval.

Note
These methods are only intended for use by simulation executives (classes derived from WsfSimulation) and objects associated with controlling calls to Update(). Any other use is at your own risk!
bool mThreadSafe
std::unique_ptr< WsfSensorModeListmModeListPtr
std::unique_ptr< WsfSensorSchedulermSchedulerPtr
std::unique_ptr< WsfSensorTrackermTrackerPtr
double mNextUpdateTime
 The time when the next call to Update() SHOULD occur.
int mMessageLength
 The logical length (in bits) of report messages that originate from this sensor.
int mMessagePriority
 The priority of report messages that originate from this sensor.
WsfStringId mZoneAttenuationModifier
 If non-zero, the name of ID of the category to be used for zone-based attenuation.
WsfCategoryList mIgnoredCategories
 Categories which this sensor should ignore.
std::vector< WsfStringIdmIgnoredSides
 The sides (teams) which this sensor should ignore.
unsigned int mIgnoredDomains
 A bit mask of ignored domains.
bool mIgnoreSameSide
 'true' if the sensor should not detect platforms on the same side.
void SetUpdateInterval (double aUpdateInterval) override
unsigned int GetUpdateEventEpoch () const
void IncrementUpdateEventEpoch ()
bool UpdateEventActive () const
 Is an 'Update' event active?
void SetUpdateEventActive (bool aUpdateEventActive)
 Indicate if the 'Update' event is active.
void AdjustNextUpdateTime (double aNextUpdateTime)
double GetNextUpdateTime () const
void SetNextUpdateTime (double aSimTime, double aNextUpdateTime)
void GetMessageParameters (int &aMessageLength, int &aMessagePriority) const
 Get the base level message parameters (may get overridden by the mode).
WsfStringId GetZoneAttenuationModifier () const
 Get the zone attenuation modifier.
bool SendDis ()
 Return mSendDis flag.
ut::Random & GetRandom ()
 Get the sensor's random number generator.
virtual bool GetFilteredDoppler () const
bool ScriptAllowDetection (double aSimTime, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
 If a script exists, allows it to impose further constraints on a sensor detection.
 WsfSensor (const WsfSensor &aSrc)
 Copy constructor (for Clone()).
WsfSensoroperator= (const WsfSensor &aSrc)=delete
void SetClass (int aClass)
 Set the 'classification' of the sensor.
void SetModeList (std::unique_ptr< WsfSensorModeList > aModeListPtr)
UtScriptContext * GetScriptAccessibleContext () const override
 Return the context from the script.
void SetPlatform (WsfPlatform *aPlatformPtr) override

Component infrastructure methods not provided by WsfPlatformPart.

WsfComponentCloneComponent () const override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override
int GetComponentInitializationOrder () const override
bool AllowDetectionChancesFor (WsfPlatform *aPlatformPtr)
void AddIgnoredCategory (const std::string &aCategory)
virtual bool AttemptToDetect (double aSimTime, WsfPlatform *aTargetPtr, Settings &aSettings, WsfSensorResult &aResult)

Common infrastructure methods.

const char * GetScriptClassName () const override
WsfSensorClone () const override=0
bool PreInitialize (double aSimTime) override
bool Initialize (double aSimTime) override
bool Initialize2 (double aSimTime) override
void PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr) override
void PlatformDeleted (WsfPlatform *aPlatformPtr) override
void PreInput () override
bool ProcessInput (UtInput &aInput) override
void Update (double aSimTime) override
void UpdatePosition (double aSimTime) override
virtual void PerformScheduledDetections (double aSimTime)

Thread safe methods.

bool ThreadSafe () const
 Returns true if the sensor update is thread safe.
void SetThreadSafe ()
void SetNotThreadSafe ()

Calibration data methods.

bool ShowCalibrationData () const
 Returns true if the sensor calibration should be output.
void SetShowCalibrationData (bool aShowCalibrationData)

Methods to attach, delete and notify to sensor observers.

Observers receive notification of sensor updates, detection attempts and deletion.

void AttachObserver (WsfSingleSensorObserver *aObserverPtr)
void DetachObserver (WsfSingleSensorObserver *aObserverPtr)
void NotifyDeleted ()
void NotifyTrackInitiated (double aSimTime, const WsfTrack &aTrack)
void NotifyTrackUpdated (double aSimTime, const WsfTrack &aTrack)
void NotifyTrackDropped (double aSimTime, const WsfTrack &aTrack)
void NotifyTargetUpdated (double aSimTime, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
void NotifyTurnedOff (double aSimTime)
void NotifyTurnedOn (double aSimTime)
virtual void NotifySensorDetectionAttempted (double aSimTime, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)

Methods to query the class of a sensor.

These methods should be only be used to determine the general way in which a sensor operates.

int GetClass () const
 Returns the sensor class information.
bool IsClassActive () const
 Is the sensor an 'active' sensor?
bool IsClassPassive () const
 Is the sensor a 'passive' sensor?
bool IsClassSemiActive () const
 Is the sensor a 'semi-active' sensor.
bool IsClassAcoustic () const
 Is this an 'acoustic' sensor?
bool IsClassInfrared () const
 Is this an 'infrared' sensor?
bool IsClassRadio () const
 Is this a 'radio frequency' sensor?
bool IsClassVisual () const
 Is this a 'visual' sensor?
bool IsClassImaging () const
 Does this sensor produce an image?

Status methods.

void TurnOff (double aSimTime) override
void TurnOn (double aSimTime) override
void SetNonOperational (double aSimTime) override
void SetOperational (double aSimTime) override
void PartBroken (double aSimTime) override
double GetUpdateInterval () const override

Transmitter/receiver access methods.

These methods support accessing the underlying transmitter and receiver components.

virtual size_t GetEM_RcvrCount () const
virtual WsfEM_RcvrGetEM_Rcvr (size_t aIndex) const
virtual size_t GetEM_RcvrCount (size_t aModeIndex) const
virtual WsfEM_RcvrGetEM_Rcvr (size_t aModeIndex, size_t aIndex) const
virtual size_t GetEM_XmtrCount () const
virtual WsfEM_XmtrGetEM_Xmtr (size_t aIndex) const
virtual size_t GetEM_XmtrCount (size_t aModeIndex) const
virtual WsfEM_XmtrGetEM_Xmtr (size_t aModeIndex, size_t aIndex) const

Field of view methods.

Determines if the platform is within the sensor field of view.

virtual bool WithinFieldOfView (double aSimTime, WsfPlatform *aPlatformPtr)
virtual bool WithinFieldOfView (double aSimTime, WsfTrack *aTrackPtr)

Mode selection methods.

These methods support the control of a multi-mode sensor.

Note
Not all implementations support multiple modes.
virtual WsfStringId GetCurrentModeName () const
 Return the string ID of the string associated with the name of the current mode.
virtual WsfSensorModeGetCurrentMode () const
virtual size_t GetModeCount () const
 Get the number of modes associated with the sensor.
virtual WsfSensorModeGetModeEntry (size_t aModeIndex) const
virtual size_t GetModeIndex (WsfStringId aModeNameId) const
virtual WsfStringId GetModeName (size_t aModeIndex) const
virtual void DeselectMode (double aSimTime, WsfStringId aModeNameId)
virtual void SelectMode (double aSimTime, WsfStringId aModeNameId)
virtual void ScheduleModeChange (double aSimTime, bool aSelectModeFlag, WsfStringId aModeNameId)
virtual bool IsModeChangeScheduled () const
virtual double GetModeSelectDelay () const
WsfSensorModeListGetModeList () const

Track request methods

These methods support the control of a cued sensor.

virtual int GetActiveRequestCount () const
 Get the number of requests being maintained in all modes.
virtual int GetActiveRequestCount (WsfStringId aModeNameId) const
virtual int GetMaximumRequestCount () const
virtual int GetMaximumRequestCount (WsfStringId aModeNameId) const
virtual bool HaveRequestFor (const WsfTrackId &aTrackId) const
 Has a tracking request for the specified track ID been submitted.
virtual bool StartTracking (double aSimTime, const WsfTrack &aTrack, WsfStringId aModeNameId)
virtual bool StopTracking (double aSimTime, const WsfTrackId &aRequestId)
 Indicate the sensor should no longer track the specified track.

Track status notification methods.

These methods are called from sensor components to inform the simulation about the change in status of a track.

virtual int GetActiveTrackCount () const
 Return the number of active tracks the sensor is maintaining.
virtual void GetActiveTrackList (WsfTrackList &aActiveTrackList) const
 Return the active tracks the sensor is maintaining.
virtual int GetMaximumTrackCount () const
 Return the maximum number of tracks the sensor can maintain.
virtual void SendTrackCoastMessage (double aSimTime, const WsfTrack *aTrackPtr)
virtual void SendTrackDropMessage (double aSimTime, const WsfTrack *aTrackPtr)
virtual void SendTrackUpdateMessage (double aSimTime, const WsfTrack *aTrackPtr)
virtual void SetMessageParameters (WsfStringId aModeNameId, WsfMessage &aMessage)
virtual void TrackCoasted (double aSimTime, WsfTrack *aTrackPtr)
virtual void TrackDropped (double aSimTime, WsfTrack *aTrackPtr)
virtual void TrackUpdated (double aSimTime, WsfTrack *aTrackPtr)

Slave status methods.

A 'slave sensor' is one whose detection opportunities are controlled by some other sensor that is defined to be the 'master'. The Update() method of a slave sensor will never be called by the simulation.

bool IsSlave () const
 Get the current 'slave' status of a sensor.
void SetIsSlave (double aSimTime, bool aIsSlave)

Sensor scheduler and tracker maintenance.

The 'scheduler' is responsible for determining when detection chances are to be performed to be performed against targets. The 'tracker' takes the detection results and creates tracks.

WsfSensorSchedulerGetScheduler () const
void SetScheduler (std::unique_ptr< WsfSensorScheduler > aSchedulerPtr)
std::unique_ptr< WsfSensorSchedulerSwapScheduler (std::unique_ptr< WsfSensorScheduler > aSchedulerPtr)
WsfSensorTrackerGetTracker () const
void SetTracker (std::unique_ptr< WsfSensorTracker > aTrackerPtr)
std::unique_ptr< WsfSensorTrackerSwapTracker (std::unique_ptr< WsfSensorTracker > aTrackerPtr)

Determine the 'required Pd for detection' for a detection event.

static double GetRequiredPd (const WsfSensorMode *aModePtr)

Additional Inherited Members

UtCallbackListN< void(double)> SlewComplete
Static Public Attributes inherited from WsfArticulatedPart
static constexpr double cINFINITE_SLEW_RATE = 1.0E+12 * UtMath::cRAD_PER_DEG
static constexpr double cALMOST_FULL_CIRCLE = 359.999 * UtMath::cRAD_PER_DEG
Static Public Attributes inherited from WsfAuxDataEnabled
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataAccessed
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataDestroyed
bool FullCircle () const
virtual double GetAzimuthRotationRate () const
virtual double GetElevationRotationRate () const
void SlewToOrientation (double aSimTime, double aDesiredAz, double aDesiredEl)
virtual void TimeToRotate (double &aDeltaAz, double &aDeltaEl, double &aAzRate, double &aElRate, double &aTimeToAz, double &aTimeToEl) const
void UpdateCuedOrientation (double aSimTime)
bool UpdateOrientation (double aSimTime)
 WsfPlatformPart (const WsfPlatformPart &aSrc)
 Copy constructor (for Clone()).
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).
Protected Member Functions inherited from WsfUniqueId
void AssignUniqueId (WsfSimulation *aSimulationPtr)
WsfMaskingPatternmMaskingPatternPtr
 The masking factor.
WsfStringId mMaskingPatternName
WsfStringId mMaskingPatternStateId
double mYaw
 The orientation of the device coordinate system.
double mPitch
double mRoll
double mDX
 The velocity of the part.
double mDY
double mDZ
double mTilt
 The tilt angle above below the scan plane.
double mAzSlewRate
 The slewing rates and limits of the device with respect to the device coordinate system.
double mElSlewRate
double mMaxAzSlewRate
double mMaxElSlewRate
double mMinAzSlew
double mMaxAzSlew
double mMinElSlew
double mMaxElSlew
SlewMode mSlewMode
SlewDirection mAzSlewDirection
int mSlewState
double mAzCueRate
 The cueing rates and limits of the device with respect to the device coordinate system.
double mElCueRate
double mMinAzCue
double mMaxAzCue
double mMinElCue
double mMaxElCue
SlewMode mCueMode
 The directions (az and/or el) in which cueing can be performed.
CueType mCueType
bool mTransientCueActive
 'true' if the transient cue is defined
double mCuedLocationWCS [3]
 The cued location if mCueType is cCUED_TO_LOCATION.
double mCuedAz
 The cued azimuth if mCueType == cCUED_TO_ANGLE.
double mCuedEl
 The cued elevation if mCueType == cCUED_TO_ANGLE.
double mTransientCuedLocationWCS [3]
 The transient cue, if mTransientCueActive is true.
double mActualCuedAz
 The actual cued location, subject to the slewing limits.
double mActualCuedEl
double mCurrentAz
double mCurrentEl
double mLastAzElUpdateTime
 The time when the current az/el were last updated.
double mLastUpdateTime
 The time when the x/y/z position was last updated.
bool mSlewMethodCoordinated
 'true' if slcue rates are dynamically adjusted so the target angles are reached simultaneously.
bool mIsSlewing
 'true' if the part is slewing to satisfy a cueing request.
bool mIsPrivate
 'true' if the part is considered 'private' and not to visible to external simulations.

Detailed Description

A base class for all types of sensing systems. A sensor acts as the 'sensory organs' (eyes, ears, etc.) of a platform.

A sensor is considered to be a collection of 'modes', where each mode is defined to be a particular set of operating characteristics. A sensor is implemented by:

  • Creating a subclass of WsfSensor. This is generally a very simple class that populates a few base class members.
  • Creating a subclass of WsfSensorMode. This is generally where everything happens. Here one creates the WsfSensorMode::AttemptsToDetect method that performs the actual detection chances.

Note that ALL sensors are inherently 'multi-mode' even if they only support one mode. WsfSensorModeList provides all of the basic support for defining modes from the input stream and selecting and deselecting modes at run time.

In addition, there are a a couple of support classes.

  • WsfSensorScheduler which controls how detection chances are scheduled. WsfDefaultSensorScheduler provides an implementation for that is applicable for most all scanning and tracking sensors.
  • WsfSensorTracker which controls the initiating, updating and deleting tracks based on the results of sensor detection attempts. WsfDefaultSensorTracker provides an implementation that is usable for most scanning and tracking sensors.

The use of a scheduler and tracker are not required. For instance, an imaging sensor looks at everything at once during the detection cycle and produces an image instead of a track.

The common detection mechanism is implemented by the abstract virtual method WsfSensorMode::AttemptToDetect. Every sensor mode implementation must provide this method and it should be implemented using the following pattern:

a) Ensure the target is marked as 'concealed'. b) Ensure the target is in range. c) Ensure the target is not masked by the horizon. d) Ensure the target is in the field of view. e) Compute the probability of detection (sensor specific). f) If detectable then ensure the target is not masked by the terrain.

Note that the above pattern performs the simplest (least computationally expensive) operations first. Subsequent steps should be bypassed if an operation fails. Note that terrain masking is performed last as it is the most computationally intensive.

See also
WsfSensorMode
WsfSensorScheduler
WsfSensorTracker
WsfDefaultSensorScheduler
WsfDefaultSensorTracker
WsfSebsirModeList

Member Typedef Documentation

◆ ComponentList

◆ Result

'Result' used to be a nested class but it needed to be pulled out to support components. A typedef is used here so existing code will continue to compile.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

An enumeration that defines the general classification of a sensor. Sensors are often classified by the spectrum in which they operate and if they are 'active' or 'passive'. It is the responsibility of the sensor constructor to define this field.

The 'classification' of a sensor may be tested using the 'IsClass' methods.

Enumerator
cACTIVE 

The sensor detects reflected signals that originate from this sensor.

cSEMI_ACTIVE 

The sensor detects reflected signals that originate from another transmitter.

cPASSIVE 

The sensor detects signals that are emitted directly by the target or reflected from a natural source (such as the Sun).

cRADIO 

The sensor operates in the radio frequency spectrum.

cINFRARED 

The sensor operates in the infrared frequency spectrum.

cVISUAL 

The sensor operates in the visual frequency spectrum.

cACOUSTIC 

The sensor operates in the acoustic frequency spectrum.

cIMAGING 

The sensor produces an image.

Constructor & Destructor Documentation

◆ WsfSensor() [1/2]

WsfSensor::WsfSensor ( const WsfScenario & aScenario)

References mIgnoredCategories, mIgnoredDomains, mIgnoredSides, mIgnoreSameSide, mMessageLength, mMessagePriority, mModeListPtr, mNextUpdateTime, mSchedulerPtr, mThreadSafe, mTrackerPtr, mZoneAttenuationModifier, WsfPlatformPart::SetInitiallyTurnedOn(), WsfArticulatedPart::WsfArticulatedPart(), and WsfSensor().

Referenced by WsfPassiveSensor::PassiveMode::AddInteractor(), WsfCompositeSensor::CompositeMode::AttemptToDetect(), WsfAcousticSensor::Clone(), WsfBeamDirector::Clone(), WsfCompositeSensor::Clone(), WsfEOIR_Sensor::Clone(), WsfESM_Sensor::Clone(), WsfGeometricSensor::Clone(), WsfIRST_Sensor::Clone(), WsfLADAR_Sensor::Clone(), WsfLaserDesignator::Clone(), WsfLaserTracker::Clone(), WsfNullSensor::Clone(), WsfOpticalSensor::Clone(), WsfOTH_RadarSensor::Clone(), WsfPassiveSensor::Clone(), WsfRadarSensor::Clone(), WsfSAR_Sensor::Clone(), Clone(), WsfSOSM_Sensor::Clone(), WsfSurfaceWaveRadarSensor::Clone(), WsfCompositeSensor::CompositeMode::Deselect(), GetRequiredPd(), WsfCompositeSensor::GetSensorIndex(), WsfCompositeSensor::Initialize(), WsfCompositeSensor::IsA_ConstituentSensor(), WsfSensor::ModeChangeEvent::ModeChangeEvent(), WsfCompositeSensor::operator=(), WsfEOIR_Sensor::operator=(), WsfIRST_Sensor::operator=(), WsfLADAR_Sensor::operator=(), WsfLaserDesignator::operator=(), WsfLaserTracker::operator=(), WsfOpticalSensor::operator=(), WsfOTH_RadarSensor::operator=(), WsfRadarSensor::operator=(), operator=(), WsfSOSM_Sensor::operator=(), WsfSurfaceWaveRadarSensor::operator=(), WsfCompositeSensor::ProcessMessage(), WsfCompositeSensor::CompositeMode::Select(), WsfCompositeSensor::SensorDetectionChanged(), WsfCompositeSensor::SensorTurnedOff(), WsfCompositeSensor::UpdateXmtrRcvrLists(), WsfAcousticSensor::WsfAcousticSensor(), WsfAcousticSensor::WsfAcousticSensor(), WsfBeamDirector::WsfBeamDirector(), WsfCompositeSensor::WsfCompositeSensor(), WsfCompositeSensor::WsfCompositeSensor(), WsfEOIR_Sensor::WsfEOIR_Sensor(), WsfEOIR_Sensor::WsfEOIR_Sensor(), WsfGeometricSensor::WsfGeometricSensor(), WsfGeometricSensor::WsfGeometricSensor(), WsfIRST_Sensor::WsfIRST_Sensor(), WsfIRST_Sensor::WsfIRST_Sensor(), WsfLADAR_Sensor::WsfLADAR_Sensor(), WsfLADAR_Sensor::WsfLADAR_Sensor(), WsfLaserDesignator::WsfLaserDesignator(), WsfLaserDesignator::WsfLaserDesignator(), WsfLaserTracker::WsfLaserTracker(), WsfLaserTracker::WsfLaserTracker(), WsfNullSensor::WsfNullSensor(), WsfNullSensor::WsfNullSensor(), WsfOpticalSensor::WsfOpticalSensor(), WsfOpticalSensor::WsfOpticalSensor(), WsfOTH_RadarSensor::WsfOTH_RadarSensor(), WsfOTH_RadarSensor::WsfOTH_RadarSensor(), WsfPassiveSensor::WsfPassiveSensor(), WsfPassiveSensor::WsfPassiveSensor(), WsfRadarSensor::WsfRadarSensor(), WsfRadarSensor::WsfRadarSensor(), WsfSAR_Sensor::WsfSAR_Sensor(), WsfSensor(), WsfSensor(), WsfSOSM_Sensor::WsfSOSM_Sensor(), WsfSOSM_Sensor::WsfSOSM_Sensor(), WsfSurfaceWaveRadarSensor::WsfSurfaceWaveRadarSensor(), WsfSurfaceWaveRadarSensor::WsfSurfaceWaveRadarSensor(), WsfBeamDirector::~WsfBeamDirector(), WsfESM_Sensor::~WsfESM_Sensor(), WsfGeometricSensor::~WsfGeometricSensor(), and WsfPassiveSensor::~WsfPassiveSensor().

◆ ~WsfSensor()

WsfSensor::~WsfSensor ( )
override

References NotifyDeleted().

◆ WsfSensor() [2/2]

Member Function Documentation

◆ AddIgnoredCategory()

void WsfSensor::AddIgnoredCategory ( const std::string & aCategory)

Add the given category to those ignored by this sensor.

Parameters
aCategoryThe category to add to the set of ignored categories.

References mIgnoredCategories.

◆ AdjustNextUpdateTime()

void WsfSensor::AdjustNextUpdateTime ( double aNextUpdateTime)

Adjust the 'Next Update Time' to account for time losses in the simulation.

This is called by fixed-frame rate simulations when they need to indicate the frame took too long.

References mNextUpdateTime.

◆ AllowDetectionChancesFor()

bool WsfSensor::AllowDetectionChancesFor ( WsfPlatform * aPlatformPtr)

Should detection chances against the specified target be allowed?

Determine if the specified platform is a member of any category which is to be ignored by this sensor. This is used to eliminate sensing chances that are not of interest. Judicious use of this capability can greatly improve the performance of the simulation.

Parameters
aPlatformPtrPointer to the target platform.
Returns
'true' if detection chances are allowed. 'false' if the target platform was a member of any category that is ignored by this sensor.

References WsfPlatform::GetCategories(), WsfPlatform::GetSideId(), WsfPlatform::GetSpatialDomain(), WsfPlatform::IsExternalShadow(), mIgnoredCategories, mIgnoredDomains, and mIgnoredSides.

Referenced by WsfEOIR_Sensor::PlatformAdded(), and PlatformAdded().

◆ AttachObserver()

void WsfSensor::AttachObserver ( WsfSingleSensorObserver * aObserverPtr)

◆ AttemptToDetect()

bool WsfSensor::AttemptToDetect ( double aSimTime,
WsfPlatform * aTargetPtr,
Settings & aSettings,
WsfSensorResult & aResult )
virtual

Attempt to detect another platform.

This provides the common interface used to determine if a sensor can detect another platform. The base class implementation simply invokes the mode-specific AttemptsToDetect method for the currently selected mode.

Parameters
aSimTime[input] The current simulation time.
aTargetPtr[input] The target to attempt to detect.
aSettings[input] A Settings object that indicates the operational settings to be used for the detection attempt.
aResult[output] A Result object that contains detailed information about the result detection attempt.
Returns
true if the target can be detected. This should be the same as testing ((aResult.mCheckedStatus != 0) && (aResult.mFailedStatus == 0)).

Reimplemented in WsfNullSensor, WsfPassiveSensor, and WsfSAR_Sensor.

References WsfSensorMode::AttemptToDetect(), WsfSensor::Settings::mModeIndex, and WsfSensorMode::UpdateSensorCueingLimits().

Referenced by WsfCompositeSensor::CompositeMode::AttemptToDetect(), WsfLADAR_Sensor::LADAR_Mode::AttemptToDetect(), WsfOTH_RadarSensor::OTH_Beam::AttemptToDetect(), WsfRadarSensor::RadarBeam::AttemptToDetect(), WsfSAR_Sensor::AttemptToDetect(), WsfSurfaceWaveRadarSensor::RadarMode::AttemptToDetect(), WsfOTH_RadarSensor::PerformScheduledDetections(), WsfRadarSensor::PerformScheduledDetections(), PerformScheduledDetections(), and WsfEOIR_Sensor::Update().

◆ Clone()

◆ CloneComponent()

WsfComponent * WsfSensor::CloneComponent ( ) const
inlineoverridevirtual

Clones a component. May return null if component does not support clone.

Implements WsfComponent.

References WsfObject::Clone().

◆ DeselectMode()

void WsfSensor::DeselectMode ( double aSimTime,
WsfStringId aModeNameId )
virtual

Deselect the sensor mode given the string ID of the name of the desired mode.

Parameters
aSimTimeThe current simulation time.
aModeNameIdThe string ID of the mode to be deselected.
Note
This method does nothing unless a the sensor is a multi-mode sensor. Deselecting a mode with a single-mode sensor is accomplished by selecting a new mode.

References GetModeCount(), WsfPlatformPart::GetSimulation(), mModeListPtr, mSchedulerPtr, and WsfObserver::SensorModeDeactivated().

Referenced by WsfDisEmission::UpdateSensor().

◆ DetachObserver()

void WsfSensor::DetachObserver ( WsfSingleSensorObserver * aObserverPtr)

◆ GetActiveRequestCount() [1/2]

int WsfSensor::GetActiveRequestCount ( ) const
virtual

Get the number of requests being maintained in all modes.

References mModeListPtr, and mSchedulerPtr.

Referenced by WsfAssetPerception::AssetSystem::AssetSystem(), and WsfTaskManager::ReleaseResource().

◆ GetActiveRequestCount() [2/2]

int WsfSensor::GetActiveRequestCount ( WsfStringId aModeNameId) const
virtual

Get the number of requests the sensor mode is currently maintaining.

Parameters
aModeNameIdThe name (string ID) of the mode.
Returns
The number of track requests that are currently being maintained for the specified mode.

References mSchedulerPtr.

◆ GetActiveTrackCount()

int WsfSensor::GetActiveTrackCount ( ) const
virtual

Return the number of active tracks the sensor is maintaining.

References mTrackerPtr.

Referenced by WsfBMRWRSensorInfoRecord::GetRWRActiveTrackCount().

◆ GetActiveTrackList()

void WsfSensor::GetActiveTrackList ( WsfTrackList & aActiveTrackList) const
virtual

Return the active tracks the sensor is maintaining.

References mTrackerPtr.

Referenced by WsfBMRWRSensorInfoRecord::GetRWRActiveTrackList().

◆ GetClass()

◆ GetComponentInitializationOrder()

int WsfSensor::GetComponentInitializationOrder ( ) const
inlineoverridevirtual

Forces a specific initialization order. Components are initialized in increasing initialization order value.

Reimplemented from WsfComponent.

References cWSF_INITIALIZE_ORDER_SENSOR.

◆ GetComponentRoles()

const int * WsfSensor::GetComponentRoles ( ) const
overridevirtual

Returns a zero-terminated array of component roles. Note that the array should be in decreasing order of specificity and should generally the inheritance hierarchy. The first entry should be the components 'primary' role. For example a sensor would do the following:

return roles;
@ cWSF_COMPONENT_SENSOR
A 'sensor' component (WsfSensor).
Definition WsfComponentRoles.hpp:105
@ cWSF_COMPONENT_PLATFORM_PART
The component derives from WsfPlatformPart.
Definition WsfComponentRoles.hpp:98
@ cWSF_COMPONENT_ARTICULATED_PART
The component derives from WsfArticulatedPart.
Definition WsfComponentRoles.hpp:99

Reimplemented from WsfArticulatedPart.

References cWSF_COMPONENT_ARTICULATED_PART, cWSF_COMPONENT_NULL, cWSF_COMPONENT_PLATFORM_PART, and cWSF_COMPONENT_SENSOR.

◆ GetComponents() [1/2]

◆ GetComponents() [2/2]

const ComponentList & WsfSensor::GetComponents ( ) const
inline

◆ GetCurrentMode()

◆ GetCurrentModeName()

WsfStringId WsfSensor::GetCurrentModeName ( ) const
virtual

◆ GetEM_Rcvr() [1/2]

◆ GetEM_Rcvr() [2/2]

WsfEM_Rcvr & WsfSensor::GetEM_Rcvr ( size_t aModeIndex,
size_t aIndex ) const
virtual

Get the attributes for the receiver with a specified index.

Parameters
aModeIndexThe index of the mode containing the receiver.
aIndexThe index of the receiver whose attributes are being requested. This must be in the range [0, GetEM_RcvrCount() - 1].
Note
It is an error to call this method if the sensor does not have any transmitters (i.e.: GetEM_RcvrCount() == 0).

Reimplemented in WsfOTH_RadarSensor, and WsfRadarSensor.

References WsfEM_Rcvr::cRF_SENSOR.

◆ GetEM_RcvrCount() [1/2]

◆ GetEM_RcvrCount() [2/2]

size_t WsfSensor::GetEM_RcvrCount ( size_t aModeIndex) const
virtual

Return the number of receivers associated with the sensor.

Parameters
aModeIndexThe index of the mode containing the receiver.
Returns
The number of receivers associated with the sensor. This can be zero.

Reimplemented in WsfOTH_RadarSensor, and WsfRadarSensor.

◆ GetEM_Xmtr() [1/2]

◆ GetEM_Xmtr() [2/2]

WsfEM_Xmtr & WsfSensor::GetEM_Xmtr ( size_t aModeIndex,
size_t aIndex ) const
virtual

Get the attributes for the transmitter with a specified index.

Parameters
aModeIndexThe index of the mode containing the transmitter.
aIndexThe index of the transmitter whose attributes are being requested. This must be in the range [0, GetEM_XmtrCount() - 1].
Note
It is an error to call this method if the sensor does not have any transmitters (i.e.: GetEM_XmtrCount() == 0).

Reimplemented in WsfOTH_RadarSensor, and WsfRadarSensor.

References WsfEM_Xmtr::cXF_SENSOR.

◆ GetEM_XmtrCount() [1/2]

size_t WsfSensor::GetEM_XmtrCount ( ) const
virtual

◆ GetEM_XmtrCount() [2/2]

size_t WsfSensor::GetEM_XmtrCount ( size_t aModeIndex) const
virtual

Return the number of transmitters associated with the sensor.

Parameters
aModeIndexThe index of the mode containing the transmitter.
Returns
The number of transmitters associated with the sensor. This can be zero.

Reimplemented in WsfOTH_RadarSensor, and WsfRadarSensor.

◆ GetFilteredDoppler()

virtual bool WsfSensor::GetFilteredDoppler ( ) const
inlinevirtual

◆ GetMaximumRequestCount() [1/2]

int WsfSensor::GetMaximumRequestCount ( ) const
virtual

Get the maximum number of requests that can be maintained in all modes.

Note
This does not consider possible interactions between modes that may limit the number of requests.

References mModeListPtr, and mSchedulerPtr.

Referenced by WsfTaskManager::AcquireResource(), WsfAssetPerception::AssetSystem::AssetSystem(), WsfDisArticulatedPart::UpdateArticulationRecords(), and WsfDisEmission::UpdateSensor().

◆ GetMaximumRequestCount() [2/2]

int WsfSensor::GetMaximumRequestCount ( WsfStringId aModeNameId) const
virtual

Get the maximum number of requests the sensor mode can maintain.

Parameters
aModeNameIdThe name (string ID) of the mode.
Returns
The maximum number of track requests that can be maintained by the specified mode.

References mSchedulerPtr.

◆ GetMaximumTrackCount()

int WsfSensor::GetMaximumTrackCount ( ) const
virtual

Return the maximum number of tracks the sensor can maintain.

References mTrackerPtr.

◆ GetMessageParameters()

void WsfSensor::GetMessageParameters ( int & aMessageLength,
int & aMessagePriority ) const
inline

Get the base level message parameters (may get overridden by the mode).

References mMessageLength, and mMessagePriority.

◆ GetModeCount()

◆ GetModeEntry()

◆ GetModeIndex()

size_t WsfSensor::GetModeIndex ( WsfStringId aModeNameId) const
virtual

Return the index of the mode with the specified name (ID).

Parameters
aModeNameIdThe string ID of the name whose index is requested. If this value is zero then 0 will be returned.
Returns
If 0 was specified for aModeNameId then 0 will be returned. If the mode exists the value will be the index of the mode in the range 0 <= index < GetModeCount(). If the mode does not exist then the value of GetModeCount() will be returned.

References mModeListPtr.

Referenced by WsfTaskManager::AcquireResource(), WsfBeamDirector::WsfBeamDirectorMode::AttemptToDetect(), WsfCompositeSensor::CompositeMode::AttemptToDetect(), WsfPassiveSensor::PassiveMode::CanDetect(), WsfCompositeSensor::CompositeMode::Deselect(), WsfPassiveSensor::PassiveMode::EmitterActiveCallback(), FlightPathAnalysisFunction::Execute(), HorizontalMapFunction::Execute(), WsfCompositeSensor::CompositeMode::Select(), and SetMessageParameters().

◆ GetModeList()

WsfSensorModeList * WsfSensor::GetModeList ( ) const
inline

Return a pointer to the mode list.

Returns
A pointer to the mode list. This may be zero if the sensor does not support mode lists
Note
This is not valid until Initialize has been called.
This return value is non-const, but the list should only be modified with GREAT care.

References mModeListPtr.

Referenced by WsfCompositeSensor::Initialize(), WsfDefaultSensorScheduler::Initialize(), WsfDefaultSensorTracker::Initialize(), WsfPhysicalScanSensorScheduler::Initialize(), WsfSectorScanSensorScheduler::Initialize(), WsfSpinSensorScheduler::Initialize(), WsfMoonLOS_SensorComponent::ProcessModeInput(), and WsfDisEmission::UpdateSensor().

◆ GetModeName()

WsfStringId WsfSensor::GetModeName ( size_t aModeIndex) const
virtual

Return the string ID of the string associated with the name of the mode with the specified index.

Parameters
aModeIndexThe index of the desired mode such that 0 <= aModeIndex < GetModeCount().

References WsfModeList::GetDefaultModeNameId(), GetModeCount(), and mModeListPtr.

Referenced by WsfEW_SensorComponent::AttemptToDetectFalseTarget(), wsf::event::utils::PrintSensorResult(), wsf::event::utilsCSV::PrintSensorResult(), and UT_DEFINE_SCRIPT_METHOD().

◆ GetModeSelectDelay()

double WsfSensor::GetModeSelectDelay ( ) const
virtual

◆ GetNextUpdateTime()

double WsfSensor::GetNextUpdateTime ( ) const
inline

Get the next update time.

Returns
The next update time for the sensor.

References mNextUpdateTime.

◆ GetRandom()

ut::Random & WsfSensor::GetRandom ( )
inline

◆ GetRequiredPd()

double WsfSensor::GetRequiredPd ( const WsfSensorMode * aModePtr)
static

Get the 'required Pd for detection' to be used for a detection event.

The value returned by this method will be one of the following:

  • If UseConstantPdRequired() is 'true' then it will return the value stored in the sensor mode.
  • If UseConstantPdRequired() is 'false' then it will return a random value for each call. (Computed as 1.0 - GetSimulation()->GetRandom().Uniform());
Note
The 'required_pd' is meaningless for sensors that are binary detectors (i.e.: the Pd from a detection attempt is either 0 or 1).
This only applies to detection attempts made via Update()/PerformScheduledDetections() (i.e.: during a standard simulation run). It does not apply for direct calls to AttemptToDetect().

Return the Pd required for the following detection event to be considered successful.

This method is typically called during a Monte-Carlo simulation to select the Pd required for a successful detection on an upcoming detection event. By default the returned value is 1.0 - GetSimulation()->GetRandom().Uniform(), however the fixed Pd (stored within the sensor mode) may be selected via simulation input ('use_constant_required_pd true') (thus eliminating any randomness)

Note
The 'required_pd' is meaningless for sensors that are binary detectors (i.e.: the Pd from a detection attempt is either 0 or 1).
This only applies to detection attempts made via Update()/PerformScheduledDetections() (i.e.: during a standard simulation run). It does not apply for direct calls to AttemptToDetect().

References GetRandom(), WsfSensorMode::GetRequiredPd(), WsfSensorMode::GetSensor(), WsfPlatformPart::GetSimulation(), WsfSimulation::GetSimulationInput(), WsfSimulationInput::UseConstantRequiredPd(), and WsfSensor().

Referenced by WsfCompositeSensor::CompositeMode::AttemptToDetect(), WsfTRIMSIM_Processor::AttemptToDetect(), WsfPassiveSensor::PassiveMode::CanDetect(), WsfPassiveSensor::PassiveMode::EmitterActiveCallback(), WsfOTH_RadarSensor::PerformScheduledDetections(), WsfRadarSensor::PerformScheduledDetections(), PerformScheduledDetections(), and WsfEOIR_Sensor::Update().

◆ GetScheduler()

WsfSensorScheduler * WsfSensor::GetScheduler ( ) const
inline

Return a pointer to the sensor scheduler.

Returns
The pointer to the sensor scheduler, which can be zero if there is no scheduler.

References mSchedulerPtr.

Referenced by WsfXIO_SensorService::HandleRequest().

◆ GetScriptAccessibleContext()

UtScriptContext * WsfSensor::GetScriptAccessibleContext ( ) const
overrideprotected

Return the context from the script.

Referenced by operator=().

◆ GetScriptClassName()

const char * WsfSensor::GetScriptClassName ( ) const
override

◆ GetTracker()

WsfSensorTracker * WsfSensor::GetTracker ( ) const
inline

Return a pointer to the sensor tracker.

Returns
The pointer to the sensor tracker, which can be zero if there is no tracker.

References mTrackerPtr.

◆ GetUpdateEventEpoch()

unsigned int WsfSensor::GetUpdateEventEpoch ( ) const
inline

Get the current update event 'epoch'. The event 'epoch' is used to recognize and ignore obsolete events.

◆ GetUpdateInterval()

double WsfSensor::GetUpdateInterval ( ) const
inlineoverridevirtual

◆ GetZoneAttenuationModifier()

◆ HaveRequestFor()

bool WsfSensor::HaveRequestFor ( const WsfTrackId & aTrackId) const
virtual

Has a tracking request for the specified track ID been submitted.

References mSchedulerPtr.

Referenced by WsfTaskManager::ReleaseResource().

◆ IncrementUpdateEventEpoch()

void WsfSensor::IncrementUpdateEventEpoch ( )
inline

Increment the 'epoch' for the update event. This should be called whenever the update interval is changed or if the sensor is turned off or on.

◆ Initialize()

bool WsfSensor::Initialize ( double aSimTime)
overridevirtual

Perform phase 1 initialization. This is called by WsfPlatform::Initialize() during phase 1 initialization of the platform. The component should complete validation of input data that could not be done by ProcessInput, as well as any other functions to prepare for simulation use (subject to the next paragraph).

The order in which components are initialized is defined by GetComponentInitializationOrder. In general a component implementation of this method should not be dependent on the state of another component, i.e.: it should not assume that the other components Initialize() method has been called. If such a dependency exists one should use Initialize2() if possible, or specify a value GetComponentInitializationOrder to force things to initialize in a particular order.

Parameters
aSimTimeThe current simulation time.
Returns
true if successful or false if unsuccessful (bad input data, etc.)
Note
This method should NOT add any other components to the platform. This MUST be done in PreInitialize().

Reimplemented from WsfArticulatedPart.

Reimplemented in WsfSOSM_Sensor, and WsfSurfaceWaveRadarSensor.

References WsfPlatformPart::DebugEnabled(), WsfPlatformPart::GetPlatform(), WsfSimulation::GetRandom(), WsfPlatformPart::GetSimulation(), WsfArticulatedPart::Initialize(), mIgnoredSides, mIgnoreSameSide, mModeListPtr, mSchedulerPtr, mTrackerPtr, and ok.

Referenced by WsfExtEmission::AddSensor(), WsfAcousticSensor::Initialize(), WsfBeamDirector::Initialize(), WsfCompositeSensor::Initialize(), WsfEOIR_Sensor::Initialize(), WsfGeometricSensor::Initialize(), WsfIRST_Sensor::Initialize(), WsfLADAR_Sensor::Initialize(), WsfLaserDesignator::Initialize(), WsfLaserTracker::Initialize(), WsfOpticalSensor::Initialize(), WsfOTH_RadarSensor::Initialize(), WsfPassiveSensor::Initialize(), WsfRadarSensor::Initialize(), WsfSAR_Sensor::Initialize(), WsfSOSM_Sensor::Initialize(), and WsfSurfaceWaveRadarSensor::Initialize().

◆ Initialize2()

bool WsfSensor::Initialize2 ( double aSimTime)
overridevirtual

Perform phase 2 initialization of the part. This is invoked by WsfPlatform::Initialize() during phase 2 initialization of the platform. During phase 2, platform components may assume that the platform location has been defined, initial tracks have been loaded and that all components have completed phase 1 initialization.

Parameters
aSimTimeThe current simulation time.
Returns
'true' if successful or 'false' if some sort of error occurred.

Reimplemented from WsfPlatformPart.

References WsfComponent::Initialize2(), and ok.

Referenced by WsfCompositeSensor::Initialize2().

◆ IsClassAcoustic()

bool WsfSensor::IsClassAcoustic ( ) const
inline

Is this an 'acoustic' sensor?

References cACOUSTIC.

◆ IsClassActive()

bool WsfSensor::IsClassActive ( ) const
inline

Is the sensor an 'active' sensor?

References cACTIVE.

Referenced by WsfExtData::WriteEmitterTypes().

◆ IsClassImaging()

bool WsfSensor::IsClassImaging ( ) const
inline

Does this sensor produce an image?

References cIMAGING.

◆ IsClassInfrared()

bool WsfSensor::IsClassInfrared ( ) const
inline

Is this an 'infrared' sensor?

References cINFRARED.

◆ IsClassPassive()

bool WsfSensor::IsClassPassive ( ) const
inline

Is the sensor a 'passive' sensor?

References cPASSIVE.

◆ IsClassRadio()

bool WsfSensor::IsClassRadio ( ) const
inline

Is this a 'radio frequency' sensor?

References cRADIO.

Referenced by WsfExtData::WriteEmitterTypes().

◆ IsClassSemiActive()

bool WsfSensor::IsClassSemiActive ( ) const
inline

Is the sensor a 'semi-active' sensor.

References cSEMI_ACTIVE.

◆ IsClassVisual()

bool WsfSensor::IsClassVisual ( ) const
inline

Is this a 'visual' sensor?

References cVISUAL.

◆ IsModeChangeScheduled()

bool WsfSensor::IsModeChangeScheduled ( ) const
virtual

◆ IsSlave()

bool WsfSensor::IsSlave ( ) const
inline

◆ NotifyDeleted()

void WsfSensor::NotifyDeleted ( )

Referenced by ~WsfSensor().

◆ NotifySensorDetectionAttempted()

void WsfSensor::NotifySensorDetectionAttempted ( double aSimTime,
WsfPlatform * aTargetPtr,
WsfSensorResult & aResult )
virtual

Notify observers that a detection attempt has just occurred.

Parameters
aSimTime[input] The current simulation time.
aTargetPtr[input] The target that is trying to be detected.
aResult[input] On input this contains the current relative geometry information.

References WsfPlatformPart::GetSimulation(), and WsfObserver::SensorDetectionAttempt().

Referenced by WsfEOIR_IRST_SensorMode::EndDetectionAttempt().

◆ NotifyTargetUpdated()

void WsfSensor::NotifyTargetUpdated ( double aSimTime,
WsfPlatform * aTargetPtr,
WsfSensorResult & aResult )

Notify observers that a target update has just occurred.

Parameters
aSimTime[input] The current simulation time.
aTargetPtr[input] The target that is trying to be detected.
aResult[input] On input this contains the current relative geometry information.

Referenced by WsfOTH_RadarSensor::PerformScheduledDetections(), WsfRadarSensor::PerformScheduledDetections(), and PerformScheduledDetections().

◆ NotifyTrackDropped()

void WsfSensor::NotifyTrackDropped ( double aSimTime,
const WsfTrack & aTrack )

Referenced by SendTrackDropMessage().

◆ NotifyTrackInitiated()

void WsfSensor::NotifyTrackInitiated ( double aSimTime,
const WsfTrack & aTrack )

Referenced by SendTrackUpdateMessage().

◆ NotifyTrackUpdated()

void WsfSensor::NotifyTrackUpdated ( double aSimTime,
const WsfTrack & aTrack )

Referenced by SendTrackUpdateMessage().

◆ NotifyTurnedOff()

void WsfSensor::NotifyTurnedOff ( double aSimTime)

◆ NotifyTurnedOn()

void WsfSensor::NotifyTurnedOn ( double aSimTime)

◆ operator=()

WsfSensor & WsfSensor::operator= ( const WsfSensor & aSrc)
protecteddelete

◆ PartBroken()

void WsfSensor::PartBroken ( double aSimTime)
overridevirtual

Inform the internal systems that this part is broken.

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfPlatformPart.

References WsfPlatformPart::GetSimulation(), WsfPlatformPart::PartBroken(), and WsfObserver::SensorBroken().

◆ PerformScheduledDetections()

◆ PlatformAdded()

void WsfSensor::PlatformAdded ( double aSimTime,
WsfPlatform * aPlatformPtr )
overridevirtual

Some other platform has been added to the simulation.

This is invoked (via WsfPlatform::PlatformAdded) whenever another platform has been added to the simulation.

Parameters
aSimTimeThe current simulation time.
aPlatformPtrPointer to the platform being added.

Reimplemented from WsfPlatformPart.

Reimplemented in WsfSurfaceWaveRadarSensor.

References AllowDetectionChancesFor(), mSchedulerPtr, and WsfPlatformPart::PlatformAdded().

Referenced by WsfEOIR_Sensor::PlatformAdded(), WsfOTH_RadarSensor::PlatformAdded(), WsfRadarSensor::PlatformAdded(), WsfSAR_Sensor::PlatformAdded(), WsfSurfaceWaveRadarSensor::PlatformAdded(), and WsfSensorsManagerFovSensorScheduler::TurnOn().

◆ PlatformDeleted()

void WsfSensor::PlatformDeleted ( WsfPlatform * aPlatformPtr)
overridevirtual

Some other platform has been deleted from the simulation.

This is invoked (via WsfPlatform::PlatformDeleted) whenever another platform has been deleted from the simulation.

Parameters
aPlatformPtrPointer to the platform being deleted.

Reimplemented from WsfPlatformPart.

Reimplemented in WsfSOSM_Sensor.

References mSchedulerPtr, and WsfPlatformPart::PlatformDeleted().

Referenced by WsfEOIR_Sensor::PlatformDeleted(), WsfLaserDesignator::PlatformDeleted(), WsfOpticalSensor::PlatformDeleted(), WsfSAR_Sensor::PlatformDeleted(), and WsfSOSM_Sensor::PlatformDeleted().

◆ PreInitialize()

bool WsfSensor::PreInitialize ( double aSimTime)
overridevirtual

Perform pre-initializion function. This is called by WsfPlatform::Initialize prior to actually initializing the components on a platform (i.e.: calling Initialize and Initialize2 for each component). The primary reason for this method is to allow components to add other components that will then be subsequently initialized. The component may examine the component list and add components, but it must not assume ANYTHING about the actual state of the component.

Parameters
aSimTimeThe current simulation time.
Returns
true if successful or false if unsuccessful (bad input data, etc.)

Reimplemented from WsfComponent.

References WsfPlatformPart::GetScenario(), ok, WsfComponent::PreInitialize(), and WsfComponentFactoryList< PARENT_TYPE >::PreInitialize().

◆ PreInput()

void WsfSensor::PreInput ( )
overridevirtual

Perform pre-input processing. This is called in certain contexts just before input processing is FIRST done for a component (See WsfObjectTypeListBase::LoadComponentP.) The primary motivation is to allow the newly created component to invoke the type/role-specific PreInput method in the component factories, which may in turn add any sub-components that MAY be required for input processing or for run-time.

This is currently implemented only for platform level components such as WsfComm, WsfProcessor, WsfSensor and some components implemented in optional projects. You can look at the PreInput methods in each of these and see they are very simple.

The reason for this is that WsfObjectTypeListBase::LoadComponentP cannot simply invoke the PreInput methods in the component factories. PreInput is only defined in the template WsfComponentFactoryT<>, and the PreInput method in the template defines a method whose argument is a reference to the object being created. There is no way for LoadComponentP to do this in general. Delegating it to to component solves the problem.

Note
This method may get called more than once as input objects derive from other input type-objects.

Reimplemented from WsfComponent.

References WsfPlatformPart::GetScenario(), and WsfComponentFactoryList< PARENT_TYPE >::PreInput().

◆ ProcessInput()

bool WsfSensor::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 WsfArticulatedPart.

Reimplemented in WsfSOSM_Sensor, and WsfSurfaceWaveRadarSensor.

References WsfPlatformPart::GetScenario(), WsfSensorSchedulerTypes::LoadInstance(), mIgnoredCategories, mIgnoredDomains, mIgnoredSides, mIgnoreSameSide, mMessageLength, mMessagePriority, mModeListPtr, mSchedulerPtr, mTrackerPtr, mZoneAttenuationModifier, WsfArticulatedPart::ProcessInput(), WsfAuxDataEnabled::ProcessInput(), WsfComponentFactoryList< PARENT_TYPE >::ProcessInput(), and WsfTypes::StringToEnum().

Referenced by WsfBeamDirector::ProcessInput(), WsfCompositeSensor::ProcessInput(), WsfEOIR_Sensor::ProcessInput(), WsfGeometricSensor::ProcessInput(), WsfLADAR_Sensor::ProcessInput(), WsfLaserDesignator::ProcessInput(), WsfLaserTracker::ProcessInput(), WsfNullSensor::ProcessInput(), WsfOTH_RadarSensor::ProcessInput(), WsfPassiveSensor::ProcessInput(), WsfRadarSensor::ProcessInput(), WsfSAR_Sensor::ProcessInput(), WsfSOSM_Sensor::ProcessInput(), and WsfSurfaceWaveRadarSensor::ProcessInput().

◆ QueryInterface()

void * WsfSensor::QueryInterface ( int aRole)
overridevirtual

Requests a component's role interface. A component can support one or more roles.

Parameters
aRoleThe role whose interface is to be returned.
Returns
A pointer to the object if it supports the indicated role, or 'null' if it does not. Usage: WsfProcessor* procPtrOrNull = (WsfProcessor*)componentPtr->QueryComponentInterface(cWSF_COMPONENT_PROCESSOR);

Reimplemented from WsfArticulatedPart.

References cWSF_COMPONENT_ARTICULATED_PART, cWSF_COMPONENT_PLATFORM_PART, cWSF_COMPONENT_SENSOR, WsfArticulatedPart::WsfArticulatedPart(), and WsfPlatformPart::WsfPlatformPart().

◆ ScheduleModeChange()

void WsfSensor::ScheduleModeChange ( double aSimTime,
bool aSelectModeFlag,
WsfStringId aModeNameId )
virtual

Schedule a mode change using the simulation event process.

Parameters
aSimTimeThe current simulation time.
aSelectModeFlagThe current mode selection flag, 'true' = select mode, 'false' = deselect mode
aModeNameIdThe mode name ID to change to.

References WsfSimulation::AddEvent(), WsfSensor::ModeChangeEvent::cDESELECT, WsfSensor::ModeChangeEvent::cSELECT, WsfPlatformPart::GetSimulation(), and mModeListPtr.

Referenced by WsfEW_AgilityEffect::UpdateEffects().

◆ ScriptAllowDetection()

bool WsfSensor::ScriptAllowDetection ( double aSimTime,
WsfPlatform * aTargetPtr,
WsfSensorResult & aResult )

If a script exists, allows it to impose further constraints on a sensor detection.

Check whether a pre-detection script should allow or deny an attempted detection.

References WsfSensorResult::cSCRIPT_CONSTRAINT, WsfSensorResult::Detected(), and WsfEM_Interaction::mCheckedStatus.

Referenced by WsfEOIR_IRST_SensorMode::EndDetectionAttempt().

◆ SelectMode()

void WsfSensor::SelectMode ( double aSimTime,
WsfStringId aModeNameId )
virtual

Select the sensor mode given the string ID of the name of the desired mode.

Parameters
aSimTimeThe current simulation time.
aModeNameIdThe string ID of the mode to be selected.

References WsfSensorMode::GetMaximumRequestCount(), GetModeCount(), GetModeEntry(), WsfPlatformPart::GetSimulation(), mModeListPtr, mSchedulerPtr, WsfObserver::SensorModeActivated(), WsfObserver::SensorModeDeactivated(), and WsfSensorMode::UpdateSensorCueingLimits().

Referenced by WsfBeamDirector::TurnOn(), and WsfLaserTracker::Update().

◆ SendDis()

bool WsfSensor::SendDis ( )
inline

Return mSendDis flag.

◆ SendTrackCoastMessage()

void WsfSensor::SendTrackCoastMessage ( double aSimTime,
const WsfTrack * aTrackPtr )
virtual

A common method to inform interested parties that the track has been coasted. This will inform simulation observers and attached processors that a track has been dropped.

Parameters
aSimTime[input] The current simulation time.
aTrackPtr[input] A pointer to the track being dropped.

References WsfPlatformPart::GetSimulation(), and WsfObserver::SensorTrackCoasted().

Referenced by TrackCoasted().

◆ SendTrackDropMessage()

void WsfSensor::SendTrackDropMessage ( double aSimTime,
const WsfTrack * aTrackPtr )
virtual

A common method to inform interested parties that the track has been dropped. This will inform simulation observers and attached processors that a track has been dropped.

Parameters
aSimTime[input] The current simulation time.
aTrackPtr[input] A pointer to the track being dropped.

References WsfPlatformPart::GetPlatform(), WsfPlatformPart::GetSimulation(), WsfTrack::GetTargetIndex(), WsfTrack::GetTrackId(), NotifyTrackDropped(), WsfPlatformPart::SendMessage(), and WsfObserver::SensorTrackDropped().

Referenced by TrackDropped().

◆ SendTrackUpdateMessage()

void WsfSensor::SendTrackUpdateMessage ( double aSimTime,
const WsfTrack * aTrackPtr )
virtual

A common method to inform interested parties that the track has been updated. This will inform simulation observers and attached processors that a track has been updated.

Parameters
aSimTime[input] The current simulation time.
aTrackPtr[input] A pointer to the track being updated.

References WsfPlatformPart::GetPlatform(), WsfTrack::GetSensorModeId(), WsfPlatformPart::GetSimulation(), WsfTrack::GetUpdateCount(), NotifyTrackInitiated(), NotifyTrackUpdated(), WsfPlatformPart::SendMessage(), WsfObserver::SensorTrackInitiated(), WsfObserver::SensorTrackUpdated(), and SetMessageParameters().

Referenced by TrackUpdated().

◆ SetClass()

◆ SetIsSlave()

void WsfSensor::SetIsSlave ( double aSimTime,
bool aIsSlave )

Indicate if the sensor is a slave sensor.

Parameters
aSimTimeThe current simulation time.
aIsSlavetrue if the sensor is to be declared a slave sensor.

References WsfObject::GetName(), WsfPlatformPart::GetPlatform(), and WsfPlatformPart::IsTurnedOn().

Referenced by WsfCompositeSensor::Initialize().

◆ SetMessageParameters()

void WsfSensor::SetMessageParameters ( WsfStringId aModeNameId,
WsfMessage & aMessage )
virtual

Set the message parameters. This method will set the length and priority for the report message. The data will come from either the mode or the base sensor.

Parameters
aModeNameIdThe name (ID) of the mode producing the report message.
aMessageThe message whose length and priority are to be established.

References WsfSensorMode::GetMessageLength(), WsfSensorMode::GetMessagePriority(), GetModeEntry(), GetModeIndex(), mMessageLength, mMessagePriority, mModeListPtr, WsfMessage::SetPriority(), and WsfMessage::SetSizeBits().

Referenced by SendTrackUpdateMessage(), and WsfEOIR_Sensor::Update().

◆ SetModeList()

◆ SetNextUpdateTime()

void WsfSensor::SetNextUpdateTime ( double aSimTime,
double aNextUpdateTime )

Set the 'Next Update Time'.

This is called by sensor schedulers to perform an out-of-band update to the 'next update time' (an out-of-band update is one that occurs outside Update()/PerformScheduledDetection()). This typically occurs when the user makes a 'StartTracking' request. In such a case the scheduler may need to want to force an Update to occur before the currently scheduled update (as defined by 'next update time'.

References WsfPlatformPart::GetSimulation(), mNextUpdateTime, and WsfSimulation::SetPartUpdateInterval().

◆ SetNonOperational()

void WsfSensor::SetNonOperational ( double aSimTime)
overridevirtual

Set the system status as Non-Operational.

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfPlatformPart.

References WsfPlatformPart::GetSimulation(), WsfObserver::SensorNonOperational(), and WsfPlatformPart::SetNonOperational().

◆ SetNotThreadSafe()

void WsfSensor::SetNotThreadSafe ( )
inline

References mThreadSafe.

◆ SetOperational()

void WsfSensor::SetOperational ( double aSimTime)
overridevirtual

Set the system status as Operational.

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfPlatformPart.

References WsfPlatformPart::GetSimulation(), WsfObserver::SensorOperational(), and WsfPlatformPart::SetOperational().

◆ SetPlatform()

void WsfSensor::SetPlatform ( WsfPlatform * aPlatformPtr)
overrideprotectedvirtual

Set the context's parent as soon as possible. This allows scripts compiled later to use the parent's variables.

Reimplemented from WsfArticulatedPart.

References WsfPlatform::GetScriptContext(), and WsfArticulatedPart::SetPlatform().

Referenced by WsfBeamDirector::Initialize().

◆ SetScheduler()

◆ SetShowCalibrationData()

void WsfSensor::SetShowCalibrationData ( bool aShowCalibrationData)
inline

◆ SetThreadSafe()

void WsfSensor::SetThreadSafe ( )
inline

References mThreadSafe.

◆ SetTracker()

◆ SetUpdateEventActive()

void WsfSensor::SetUpdateEventActive ( bool aUpdateEventActive)
inline

Indicate if the 'Update' event is active.

◆ SetUpdateInterval()

void WsfSensor::SetUpdateInterval ( double aUpdateInterval)
inlineoverridevirtual

Set the time interval between the periodic calls to Update(). A value of less than or equal to zero indicates periodic updates are not to be performed.

Parameters
aUpdateIntervalThe new update interval.
Note
Users should call WsfSimulation::GetInstance().SetSensorUpdateInterval() to set the interval.

Implements WsfPlatformPart.

Referenced by WsfLaserDesignator::PerformScheduledDetections(), WsfOTH_RadarSensor::PerformScheduledDetections(), WsfRadarSensor::PerformScheduledDetections(), PerformScheduledDetections(), and WsfNullSensor::WsfNullSensor().

◆ ShowCalibrationData()

bool WsfSensor::ShowCalibrationData ( ) const
inline

Returns true if the sensor calibration should be output.

◆ StartTracking()

bool WsfSensor::StartTracking ( double aSimTime,
const WsfTrack & aTrack,
WsfStringId aModeNameId )
virtual

Request that the sensor start tracking the specified track.

Parameters
aSimTimeThe current simulation time.
aTrackThe track from which the sensor is initially supposed to start looking.
aModeNameIdThe mode to be used tracking.
Returns
'true' if the tracking request was honored or 'false' if not.

References mSchedulerPtr.

Referenced by WsfTaskManager::AcquireResource(), WsfBeamDirector::WsfBeamDirectorMode::Select(), and WsfWeaponTrackProcessor::Update().

◆ StopTracking()

bool WsfSensor::StopTracking ( double aSimTime,
const WsfTrackId & aRequestId )
virtual

Indicate the sensor should no longer track the specified track.

References mSchedulerPtr, and mTrackerPtr.

Referenced by WsfTaskManager::ReleaseResource().

◆ SwapScheduler()

std::unique_ptr< WsfSensorScheduler > WsfSensor::SwapScheduler ( std::unique_ptr< WsfSensorScheduler > aSchedulerPtr)

Define the object that is to assign sensing chances.

Parameters
aSchedulerPtrPointer to the new scheduler object. The sensor assumes ownership of the object.
Returns
The pointer to the previous scheduler object. The caller assumes ownership of the object.

References mSchedulerPtr, and std::swap().

◆ SwapTracker()

std::unique_ptr< WsfSensorTracker > WsfSensor::SwapTracker ( std::unique_ptr< WsfSensorTracker > aTrackerPtr)

Define the object that is to process detections and generate tracks.

Parameters
aTrackerPtrPointer to the new tracker object. The sensor assumes ownership of the object.
Returns
The pointer to the previous tracker object. The caller assumes ownership of the object.

References mTrackerPtr, and std::swap().

◆ ThreadSafe()

bool WsfSensor::ThreadSafe ( ) const
inline

Returns true if the sensor update is thread safe.

References mThreadSafe.

Referenced by WsfMultiThreadManager::TurnSensorOn().

◆ TrackCoasted()

void WsfSensor::TrackCoasted ( double aSimTime,
WsfTrack * aTrackPtr )
virtual

The sensor tracker has coasted a track. This method is a hook that is called when a derived sensor (or one of it's constituents such as the tracker) is coasting a track. The default method simply calls SendTrackCoastMessage inform simulation observers and send a message to attached processors.

This method is often provided by derived classes that want to use an existing sensor and simply want to change how information is reported.

Parameters
aSimTime[input] The current simulation time.
aTrackPtr[input] A pointer to the track being coasted.

References WsfPlatformPart::IsExternallyControlled(), and SendTrackCoastMessage().

◆ TrackDropped()

void WsfSensor::TrackDropped ( double aSimTime,
WsfTrack * aTrackPtr )
virtual

The sensor tracker has dropped a track. This method is a hook that is called when a derived sensor (or one of it's constituents such as the tracker) is dropping a track. The default method simply calls SendTrackDropMessage inform simulation observers and send a message to attached processors.

This method is often provided by derived classes that want to use an existing sensor and simply want to change how information is reported.

Parameters
aSimTime[input] The current simulation time.
aTrackPtr[input] A pointer to the track being dropped.

References WsfPlatformPart::IsExternallyControlled(), and SendTrackDropMessage().

Referenced by WsfCompositeSensor::DropContributorTrack().

◆ TrackUpdated()

void WsfSensor::TrackUpdated ( double aSimTime,
WsfTrack * aTrackPtr )
virtual

The sensor tracker has updated a track. This method is a hook that is called when a derived sensor (or one of it's constituents such as the tracker) has updated a track. The default method simply calls SendTrackUpdateMessage inform simulation observers and send a message to attached processors.

This method is often provided by derived classes that want to use an existing sensor and simply want to change how information is reported.

Parameters
aSimTime[input] The current simulation time.
aTrackPtr[input] A pointer to the track being updated.

References WsfPlatformPart::IsExternallyControlled(), and SendTrackUpdateMessage().

Referenced by WsfCompositeSensor::UpdateCompositeTrack().

◆ TurnOff()

void WsfSensor::TurnOff ( double aSimTime)
overridevirtual

Turn the sensor off.

Sensing chances will no longer be performed.

Parameters
aSimTimeThe current simulation time.
Note
This method should not be invoked directly by application code. Use the WsfSimulation::TurnSensorOff method.

Reimplemented from WsfPlatformPart.

References WsfPlatformPart::IsTurnedOn(), mModeListPtr, mSchedulerPtr, mTrackerPtr, NotifyTurnedOff(), and WsfPlatformPart::TurnOff().

Referenced by WsfBeamDirector::TurnOff(), WsfCompositeSensor::TurnOff(), WsfEOIR_Sensor::TurnOff(), WsfLaserDesignator::TurnOff(), WsfLaserTracker::TurnOff(), WsfPassiveSensor::TurnOff(), and WsfSAR_Sensor::TurnOff().

◆ TurnOn()

◆ Update()

◆ UpdateEventActive()

bool WsfSensor::UpdateEventActive ( ) const
inline

Is an 'Update' event active?

◆ UpdatePosition()

void WsfSensor::UpdatePosition ( double aSimTime)
overridevirtual

Update the position and orientation of the part.

This should always be called by the host platform before calling any of the geometry computation methods.

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfArticulatedPart.

References GetCurrentMode(), and WsfArticulatedPart::UpdatePosition().

Referenced by WsfSAR_Sensor::AttemptToDetect(), WsfEW_SensorComponent::AttemptToDetectFalseTarget(), WsfEOIR_IRST_SensorMode::BeginDetectionAttempt(), WsfSAR_Sensor::CanImageNow(), WsfSAR_Sensor::SAR_Mode::ComputeGeometry(), WsfOTH_RadarSensor::PerformScheduledDetections(), and WsfRadarSensor::PerformScheduledDetections().

◆ WithinFieldOfView() [1/2]

◆ WithinFieldOfView() [2/2]

bool WsfSensor::WithinFieldOfView ( double aSimTime,
WsfTrack * aTrackPtr )
virtual

Member Data Documentation

◆ mIgnoredCategories

WsfCategoryList WsfSensor::mIgnoredCategories
protected

Categories which this sensor should ignore.

Referenced by AddIgnoredCategory(), AllowDetectionChancesFor(), ProcessInput(), WsfSensor(), and WsfSensor().

◆ mIgnoredDomains

unsigned int WsfSensor::mIgnoredDomains
protected

A bit mask of ignored domains.

Referenced by AllowDetectionChancesFor(), ProcessInput(), WsfSensor(), and WsfSensor().

◆ mIgnoredSides

std::vector<WsfStringId> WsfSensor::mIgnoredSides
protected

The sides (teams) which this sensor should ignore.

Referenced by AllowDetectionChancesFor(), Initialize(), ProcessInput(), WsfSensor(), and WsfSensor().

◆ mIgnoreSameSide

bool WsfSensor::mIgnoreSameSide
protected

'true' if the sensor should not detect platforms on the same side.

Referenced by Initialize(), ProcessInput(), WsfSensor(), and WsfSensor().

◆ mMessageLength

int WsfSensor::mMessageLength
protected

The logical length (in bits) of report messages that originate from this sensor.

Referenced by GetMessageParameters(), WsfCompositeSensor::Initialize(), ProcessInput(), SetMessageParameters(), WsfEOIR_Sensor::Update(), WsfSensor(), and WsfSensor().

◆ mMessagePriority

int WsfSensor::mMessagePriority
protected

The priority of report messages that originate from this sensor.

Referenced by GetMessageParameters(), WsfCompositeSensor::Initialize(), ProcessInput(), SetMessageParameters(), WsfSensor(), and WsfSensor().

◆ mModeListPtr

std::unique_ptr<WsfSensorModeList> WsfSensor::mModeListPtr
protected

Referenced by WsfSAR_Sensor::AttemptToDetect(), WsfSAR_Sensor::CanImageNow(), DeselectMode(), GetActiveRequestCount(), GetCurrentMode(), GetCurrentModeName(), WsfSAR_Sensor::GetDwellTime(), WsfAcousticSensor::GetEM_Rcvr(), WsfEOIR_Sensor::GetEM_Rcvr(), WsfGeometricSensor::GetEM_Rcvr(), WsfIRST_Sensor::GetEM_Rcvr(), WsfLADAR_Sensor::GetEM_Rcvr(), WsfLaserTracker::GetEM_Rcvr(), WsfOpticalSensor::GetEM_Rcvr(), WsfOTH_RadarSensor::GetEM_Rcvr(), WsfPassiveSensor::GetEM_Rcvr(), WsfRadarSensor::GetEM_Rcvr(), WsfSAR_Sensor::GetEM_Rcvr(), WsfSOSM_Sensor::GetEM_Rcvr(), WsfSurfaceWaveRadarSensor::GetEM_Rcvr(), WsfOTH_RadarSensor::GetEM_RcvrCount(), WsfPassiveSensor::GetEM_RcvrCount(), WsfRadarSensor::GetEM_RcvrCount(), WsfLADAR_Sensor::GetEM_Xmtr(), WsfLaserDesignator::GetEM_Xmtr(), WsfOTH_RadarSensor::GetEM_Xmtr(), WsfRadarSensor::GetEM_Xmtr(), WsfSAR_Sensor::GetEM_Xmtr(), WsfSurfaceWaveRadarSensor::GetEM_Xmtr(), WsfOTH_RadarSensor::GetEM_XmtrCount(), WsfRadarSensor::GetEM_XmtrCount(), GetMaximumRequestCount(), GetModeCount(), GetModeIndex(), GetModeList(), GetModeName(), GetModeSelectDelay(), WsfPassiveSensor::GetNumberofFrequencyBands(), WsfSAR_Sensor::GetResolution(), WsfAcousticSensor::Initialize(), WsfBeamDirector::Initialize(), WsfCompositeSensor::Initialize(), WsfEOIR_Sensor::Initialize(), WsfGeometricSensor::Initialize(), WsfIRST_Sensor::Initialize(), WsfLADAR_Sensor::Initialize(), WsfLaserDesignator::Initialize(), WsfLaserTracker::Initialize(), WsfOpticalSensor::Initialize(), WsfOTH_RadarSensor::Initialize(), WsfPassiveSensor::Initialize(), WsfRadarSensor::Initialize(), WsfSAR_Sensor::Initialize(), Initialize(), WsfSOSM_Sensor::Initialize(), WsfSurfaceWaveRadarSensor::Initialize(), IsModeChangeScheduled(), WsfLaserDesignator::PerformScheduledDetections(), WsfOTH_RadarSensor::PerformScheduledDetections(), WsfRadarSensor::PerformScheduledDetections(), PerformScheduledDetections(), WsfSAR_Sensor::PlatformAdded(), ProcessInput(), ScheduleModeChange(), SelectMode(), WsfSAR_Sensor::SetDwellTime(), SetMessageParameters(), SetModeList(), WsfSAR_Sensor::SetResolution(), WsfPassiveSensor::TuneFrequencyBand(), TurnOff(), WsfSAR_Sensor::TurnOn(), TurnOn(), WsfEOIR_Sensor::Update(), WsfSAR_Sensor::Update(), WsfSensor(), and WsfSensor().

◆ mNextUpdateTime

◆ mSchedulerPtr

◆ mThreadSafe

bool WsfSensor::mThreadSafe
protected

Identifies the sensor as thread safe; sensor updates can be multi-threaded Certain types of derived sensors may have dependencies that may not make them thread-safe.

Referenced by SetNotThreadSafe(), SetThreadSafe(), ThreadSafe(), WsfPassiveSensor::WsfPassiveSensor(), WsfSensor(), and WsfSensor().

◆ mTrackerPtr

◆ mZoneAttenuationModifier

WsfStringId WsfSensor::mZoneAttenuationModifier
protected

If non-zero, the name of ID of the category to be used for zone-based attenuation.

Referenced by GetZoneAttenuationModifier(), ProcessInput(), WsfSensor(), and WsfSensor().


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