WSF
WsfSensorTracker Class Reference

#include <WsfSensorTracker.hpp>

Inheritance diagram for WsfSensorTracker:
Collaboration diagram for WsfSensorTracker:

Classes

class  TargetState
 A nested class that defines the data returned by GetTargetState. More...

Public Types

using Settings = WsfSensorTrackerSettings

Public Member Functions

 WsfSensorTracker ()
virtual ~WsfSensorTracker ()=default
virtual WsfSensorTrackerClone () const
 Clone this tracker.
bool DebugEnabled () const
 Returns 'true' if debugging is enabled for the tracker.
virtual unsigned int GetActiveTrackCount () const
 Return the number of tracks being maintained by the sensor.
virtual void GetActiveTrackList (WsfTrackList &aActiveTrackList)
 Return the active tracks the sensor is maintaining.
virtual unsigned int GetMaximumTrackCount () const
 Return the maximum number of tracks that can be maintained by the sensor.
virtual bool GetTargetState (double aSimTime, const WsfTrackId &aRequestId, TargetState &aTargetState)
virtual void GetRequestDataForTarget (size_t aObjectId, WsfTrackId &aRequestId, size_t &aModeIndex, WsfTrackId &aTrackId) const
virtual bool Initialize (double aSimTime, WsfSensor *aSensorPtr, WsfSensorScheduler *aSchedulerPtr)
virtual bool ProcessInput (UtInput &aInput)
virtual void SchedulerModeChange (double aSimTime, const WsfTrackId &aRequestId, size_t aObjectId, WsfPlatform *aTargetPtr, WsfStringId aNewModeName)
virtual void StopTracking (double aSimTime, const WsfTrackId &aRequestId)
virtual void TargetBlocked (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId)
virtual bool TargetDeleted (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId)
virtual void TargetDetected (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
virtual bool TargetSkipped (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId)
virtual void TargetUndetected (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
virtual void TurnOff (double aSimTime)
virtual void TurnOn (double aSimTime)
WsfSensorGetSensor () const
WsfSimulationGetSimulation () const

Protected Member Functions

 WsfSensorTracker (const WsfSensorTracker &aSrc)
 Copy constructor (for Clone()).
WsfSensorTrackeroperator= (const WsfSensorTracker &aSrc)=delete
ut::Random & GetRandom () const
bool AllowTrackingP (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfTrack *aTrackPtr, WsfSensorResult &aResult)
 A convenience method for tracker implementations to ask components if an object should be allowed to tracked.
void DropTrackP (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *&aTrackPtr)
void InitializeTrackP (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *&aTrackPtr)
void UpdateTrackP (double aSimTime, const Settings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *aTrackPtr, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)

Protected Attributes

WsfSensormSensorPtr
 The sensor to which the tracker is attached.
WsfSensorSchedulermSchedulerPtr

Detailed Description

A class that takes sensor detections and maintains tracks.

The sensor tracker is called by the sensor detection logic to report the results of detection attempts. The tracker will take the result and initiate, update and drop tracks.

Member Typedef Documentation

◆ Settings

Constructor & Destructor Documentation

◆ WsfSensorTracker() [1/2]

◆ ~WsfSensorTracker()

virtual WsfSensorTracker::~WsfSensorTracker ( )
virtualdefault

References Clone(), and WsfSensorTracker().

◆ WsfSensorTracker() [2/2]

WsfSensorTracker::WsfSensorTracker ( const WsfSensorTracker & aSrc)
protected

Copy constructor (for Clone()).

References mSchedulerPtr, mSensorPtr, and WsfSensorTracker().

Member Function Documentation

◆ AllowTrackingP()

bool WsfSensorTracker::AllowTrackingP ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId,
WsfTrack * aTrackPtr,
WsfSensorResult & aResult )
protected

A convenience method for tracker implementations to ask components if an object should be allowed to tracked.

References WsfSensorTrackerSettings::cSUPPRESS_ALLOW_TRACKING_CHECK, WsfSensorTrackerSettings::mOptions, and mSensorPtr.

Referenced by operator=(), and WsfDefaultSensorTracker::TargetDetected().

◆ Clone()

WsfSensorTracker * WsfSensorTracker::Clone ( ) const
virtual

Clone this tracker.

Reimplemented in WsfDefaultSensorTracker.

References WsfSensorTracker().

Referenced by ~WsfSensorTracker().

◆ DebugEnabled()

bool WsfSensorTracker::DebugEnabled ( ) const
inline

Returns 'true' if debugging is enabled for the tracker.

Referenced by WsfDefaultSensorTracker::SwitchMode().

◆ DropTrackP()

void WsfSensorTracker::DropTrackP ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId,
WsfSensorMode * aModePtr,
WsfTrack *& aTrackPtr )
protected

A convenience method for tracker implementations for dropping a track. This will invoke either WsfSensor::DropTrack or the component represented by the settings. Note that this is purely a notification. The track must be dropped by the caller.

References WsfComponentListT< COMPONENT_TYPE >::FindComponentByRole(), WsfSensorTrackerSettings::mComponentRole, mSensorPtr, and WsfSensorComponent::TrackerDropTrack().

Referenced by operator=(), WsfDefaultSensorTracker::TargetBlocked(), WsfDefaultSensorTracker::TargetDeleted(), WsfDefaultSensorTracker::TargetDetected(), WsfDefaultSensorTracker::TargetSkipped(), and WsfDefaultSensorTracker::TargetUndetected().

◆ GetActiveTrackCount()

unsigned int WsfSensorTracker::GetActiveTrackCount ( ) const
virtual

Return the number of tracks being maintained by the sensor.

Reimplemented in WsfDefaultSensorTracker.

◆ GetActiveTrackList()

void WsfSensorTracker::GetActiveTrackList ( WsfTrackList & aActiveTrackList)
virtual

Return the active tracks the sensor is maintaining.

Reimplemented in WsfDefaultSensorTracker.

◆ GetMaximumTrackCount()

unsigned int WsfSensorTracker::GetMaximumTrackCount ( ) const
virtual

Return the maximum number of tracks that can be maintained by the sensor.

Reimplemented in WsfDefaultSensorTracker.

◆ GetRandom()

ut::Random & WsfSensorTracker::GetRandom ( ) const
protected

◆ GetRequestDataForTarget()

void WsfSensorTracker::GetRequestDataForTarget ( size_t aObjectId,
WsfTrackId & aRequestId,
size_t & aModeIndex,
WsfTrackId & aTrackId ) const
virtual

Get the request ID particular target.

Parameters
aObjectIdThe index of the target of interest.
aRequestIdThe scheduler request ID for the target of interest.
aModeIndexThe mode index of the target request.
aTrackIdThe track Id of the request, 'null' if not found.

Reimplemented in WsfDefaultSensorTracker.

References WsfTrackId::Null().

◆ GetSensor()

WsfSensor * WsfSensorTracker::GetSensor ( ) const
inline

◆ GetSimulation()

◆ GetTargetState()

bool WsfSensorTracker::GetTargetState ( double aSimTime,
const WsfTrackId & aRequestId,
TargetState & aTargetState )
virtual

Get the current perceived state of a particular target.

Parameters
aSimTimeThe current simulation time.
aRequestIdThe scheduler request ID.
aTargetStateThe returned target state data (valid only if the function return value is 'true').
Returns
'true' if the tracker was able to provide target state data or 'false' if no data is available.

Reimplemented in WsfDefaultSensorTracker.

◆ Initialize()

bool WsfSensorTracker::Initialize ( double aSimTime,
WsfSensor * aSensorPtr,
WsfSensorScheduler * aSchedulerPtr )
virtual

Initialize the tracker.

Parameters
aSimTimeThe current simulation time.
aSensorPtrThe pointer to the sensor that owns this tracker.
aSchedulerPtrThe pointer to the sensor scheduler that is associated with the sensor.
Note
A tracker may be associated with only one sensor.

Reimplemented in WsfDefaultSensorTracker.

References mSchedulerPtr, and mSensorPtr.

Referenced by WsfDefaultSensorTracker::Initialize().

◆ InitializeTrackP()

void WsfSensorTracker::InitializeTrackP ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId,
WsfSensorMode * aModePtr,
WsfTrack *& aTrackPtr )
protected

A convenience method for tracker implementations for initializing a track. This will invoke either WsfSensorMode::InitializeTrack or the component represented by the settings.

References WsfComponentListT< COMPONENT_TYPE >::FindComponentByRole(), WsfSensorMode::InitializeTrack(), WsfSensorTrackerSettings::mComponentRole, mSensorPtr, and WsfSensorComponent::TrackerInitializeTrack().

Referenced by operator=(), and WsfDefaultSensorTracker::TargetDetected().

◆ operator=()

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

◆ ProcessInput()

bool WsfSensorTracker::ProcessInput ( UtInput & aInput)
virtual

Process tracker input.

See also
WsfObject::ProcessInput() for a description of this method.

Reimplemented in WsfDefaultSensorTracker.

Referenced by WsfDefaultSensorTracker::ProcessInput().

◆ SchedulerModeChange()

void WsfSensorTracker::SchedulerModeChange ( double aSimTime,
const WsfTrackId & aRequestId,
size_t aObjectId,
WsfPlatform * aTargetPtr,
WsfStringId aNewModeName )
virtual

The scheduler is changing the mode for the indicated object.

This method is called by the scheduler to indicate it is changing the mode.

Parameters
aSimTimeThe current simulation time.
aRequestIdIf non-zero, the associated sensor scheduler request ID.
aObjectIdA unique identifier of the object that is trying to be detected. For a platform this should be its platform ID and for other objects it should be their unique ID.
aTargetPtrThe platform that owns the object that is trying to be detected.
aNewModeNameThe name (ID) of the new mode.

Reimplemented in WsfDefaultSensorTracker.

◆ StopTracking()

void WsfSensorTracker::StopTracking ( double aSimTime,
const WsfTrackId & aRequestId )
virtual

A request has been made to stop a tracking request.

Parameters
aSimTimeThe current simulation time.
aRequestIdThe request Id.

Reimplemented in WsfDefaultSensorTracker.

◆ TargetBlocked()

void WsfSensorTracker::TargetBlocked ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId )
virtual

Request that a target be 'blocked'.

An external component may call this to indicate that a target is 'block'. Its function is to immediately drop any track associated with the target.

Parameters
aSimTimeThe current simulation time.
aSettingsThe settings/options for the tracker update.
aRequestIdIf non-zero, the associated sensor scheduler request ID.
aObjectIdA unique identifier of the object that is trying to be blocked. For a platform this should be its platform ID. For other objects it should be their unique ID.
Note
This routine may call WsfSensor::DropTrack() (or its derived class implementation) to drop a track.

◆ TargetDeleted()

bool WsfSensorTracker::TargetDeleted ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId )
virtual

Process a target object that has been deleted (or turned off)

Parameters
aSimTimeThe current simulation time.
aSettingsThe settings/options for the tracker update.
aRequestIdIf non-zero, the associated sensor scheduler request ID.
aObjectIdA unique identifier of the object that is trying to be blocked. For a platform this should be its platform ID. For other objects it should be their unique ID.
Returns
'true' if the target is no longer being tracked or 'false' if it is still being tracked. The caller should continue to call this method until the track is dropped.
Note
This routine may call WsfSensor::DropTrack() (or its derived class implementation) to drop a track.

Reimplemented in WsfDefaultSensorTracker.

◆ TargetDetected()

void WsfSensorTracker::TargetDetected ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId,
WsfPlatform * aTargetPtr,
WsfSensorResult & aResult )
virtual

Process a successful detection attempt.

This routine should be called whenever a detection attempt is successful. The tracker can do things like correlation and track maintenance.

Parameters
aSimTimeThe current simulation time.
aSettingsThe settings/options for the tracker update.
aRequestIdIf non-zero, the associated sensor scheduler request ID.
aObjectIdA unique identifier of the object that is trying to be blocked. For a platform this should be its platform ID. For other objects it should be their unique ID.
aTargetPtrThe platform that owns the object that is trying to be detected.
aResultThe detection result structure that contains the data about the detection attempt.
Note
This routine may call WsfSensor::InitializeTrack() and WsfSensor::UpdateTrack() (or their derived class implementations) to initialize or update a track.

Reimplemented in WsfDefaultSensorTracker.

◆ TargetSkipped()

bool WsfSensorTracker::TargetSkipped ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId )
virtual

Process a skipped detection chance.

This is called when a detection chance is bypassed. This is most likely caused when a tracking mode is activated that precludes searching.

Parameters
aSimTimeThe current simulation time.
aSettingsThe settings/options for the tracker update.
aRequestIdIf non-zero, the associated sensor scheduler request ID.
aObjectIdA unique identifier of the object that is trying to be blocked. For a platform this should be its platform ID. For other objects it should be their unique ID.
Returns
'true' if the target is no longer being tracked and 'false' if the target is still being tracked. The caller should continue to call this method until the track is dropped.
Note
This routine may call WsfSensor::DropTrack() (or its derived class implementation) to drop a track.

Reimplemented in WsfDefaultSensorTracker.

◆ TargetUndetected()

void WsfSensorTracker::TargetUndetected ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId,
WsfPlatform * aTargetPtr,
WsfSensorResult & aResult )
virtual

Process an unsuccessful detection attempt.

This routine should be called whenever a detection attempt is unsuccessful. The tracker can do things like update a detection history and drop tracks.

Parameters
aSimTimeThe current simulation time.
aSettingsThe settings/options for the tracker update.
aRequestIdIf non-zero, the associated sensor scheduler request ID.
aObjectIdA unique identifier of the object that is trying to be blocked. For a platform this should be its platform ID. For other objects it should be their unique ID.
aTargetPtrThe platform that owns the object that is trying to be detected.
aResultThe detection result structure that contains the data about the detection attempt.
Note
This routine may call WsfSensor::DropTrack() (or its derived class implementation) to drop a track.

Reimplemented in WsfDefaultSensorTracker.

◆ TurnOff()

void WsfSensorTracker::TurnOff ( double aSimTime)
virtual

The associated sensor is being turned off.

Parameters
aSimTimeThe current simulation time.

Reimplemented in WsfDefaultSensorTracker.

◆ TurnOn()

void WsfSensorTracker::TurnOn ( double aSimTime)
virtual

The associated sensor is being turned on.

Parameters
aSimTimeThe current simulation time.

◆ UpdateTrackP()

void WsfSensorTracker::UpdateTrackP ( double aSimTime,
const Settings & aSettings,
const WsfTrackId & aRequestId,
size_t aObjectId,
WsfSensorMode * aModePtr,
WsfTrack * aTrackPtr,
WsfPlatform * aTargetPtr,
WsfSensorResult & aResult )
protected

Member Data Documentation

◆ mSchedulerPtr

WsfSensorScheduler* WsfSensorTracker::mSchedulerPtr
protected

The scheduler that is attached to the sensor. This scheduler will be notified of any track updates that are associated with a particular request.

Referenced by WsfDefaultSensorTracker::CheckForAutoModeSwitch(), Initialize(), WsfSensorTracker(), and WsfSensorTracker().

◆ mSensorPtr


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