WSF
WsfCorrelationStrategy Class Referenceabstract

#include <WsfCorrelationStrategy.hpp>

Inheritance diagram for WsfCorrelationStrategy:
Collaboration diagram for WsfCorrelationStrategy:

Public Types

typedef WsfObjectTypeList< WsfCorrelationStrategyCorrelationStrategyTypes
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Public Member Functions

 ~WsfCorrelationStrategy () override=default
WsfCorrelationStrategyClone () const override=0
 Create a clone of "this" object.
bool ProcessInput (UtInput &aInput) override
 Process input from a common source.
virtual bool Initialize (WsfTrackManager *aTrackManagerPtr)
 Perform any necessary initialization.
void NewTrackCorrelation (const WsfTrack &aRawTrack, const WsfLocalTrack &aLocalTrack)
WsfLocalTrackCorrelate (double aSimTime, const WsfTrack &aNonLocalTrack, WsfLocalTrackList &aTrackList)
const WsfTrackIdGetCorrelatedTrackId (const WsfTrackId &aRawTrackId) const
virtual void Decorrelate (const WsfTrackId &aRawTrackId)
 Allow the user to break an existing correlation.
void NotifyOfLocalTrackCorrelation (double aSimTime, const WsfLocalTrack &aLocalTrack, const WsfTrackId &aRawTrackId)
WsfTrackManagerGetTrackManager ()
 Return a reference to the track manager being accessed internally by this object.
void SetTrackManager (WsfTrackManager *aTrackManagerPtr)
WsfSimulationGetSimulation () const
bool TestCorrelation (const WsfTrack &aTrack1, const WsfTrack &aTrack2)
 Method to facilitate unit testing.
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)

Protected Member Functions

 WsfCorrelationStrategy ()
 WsfCorrelationStrategy (const WsfCorrelationStrategy &aSrc)
WsfCorrelationStrategyoperator= (const WsfCorrelationStrategy &aRhs)
virtual WsfLocalTrackCorrelateImpl (double aSimTime, const WsfTrack &aNonLocalTrack, WsfLocalTrackList &aTrackList)=0
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Protected Attributes

std::map< WsfTrackId, WsfTrackIdmCorrelationMap

Detailed Description

This class defines the interface for a correlation strategy. It is to be used and configured by the WsfTrackManager. A factory method called WsfCorrelationStrategy::Create is provided to return new instances of existing correlation object prototypes.

In order to create new correlation objects, the implementor should do the following:

  • Re-implement WsfCorrelationStrategy::CorrelateImpl, the method that implements the correlation algorithm.
  • Re-implement WsfCorrelationStrategy::Clone.
  • Add a prototype in "WsfCorrelationStrategy::GetTypes", in the static initialization section; or, add a call to "WsfCorrelationStrategy::GetTypes::Add" (see "WsfObjectTypeList::Add" ) elsewhere in the code.
Note
It is suggested that the developer prefer the use of WsfCorrelationStrategy::Create over Clone() as the former (factory) method ties in the desired instance of WsfTrackManager.

Member Typedef Documentation

◆ CorrelationStrategyTypes

Constructor & Destructor Documentation

◆ ~WsfCorrelationStrategy()

WsfCorrelationStrategy::~WsfCorrelationStrategy ( )
overridedefault

◆ WsfCorrelationStrategy() [1/2]

◆ WsfCorrelationStrategy() [2/2]

WsfCorrelationStrategy::WsfCorrelationStrategy ( const WsfCorrelationStrategy & aSrc)
protected

Member Function Documentation

◆ Clone()

WsfCorrelationStrategy * WsfCorrelationStrategy::Clone ( ) const
overridepure virtual

◆ Correlate()

WsfLocalTrack * WsfCorrelationStrategy::Correlate ( double aSimTime,
const WsfTrack & aNonLocalTrack,
WsfLocalTrackList & aTrackList )

Given a non-local track update (or measurement), find the track in the track list that correlates with the given track or measurement.

Given a non-local track update (or measurement), find the track in the track list that correlates with the given track or measurement.

Note
This is a template method that defers execution to CorrelateImpl

References CorrelateImpl(), WsfTrack::GetTrackId(), and mCorrelationMap.

Referenced by TestCorrelation().

◆ CorrelateImpl()

virtual WsfLocalTrack * WsfCorrelationStrategy::CorrelateImpl ( double aSimTime,
const WsfTrack & aNonLocalTrack,
WsfLocalTrackList & aTrackList )
protectedpure virtual

Given a non-local track update (or measurement), find the track in the track list that correlates with the given track or measurement (pure virtual method).

Implemented in WsfClusterCorrelation, WsfLink16Correlation, WsfMTT_Correlation, WsfNearestNeighborCorrelation, WsfPerfectCorrelation, and WsfTruthCorrelation.

Referenced by Correlate().

◆ Decorrelate()

void WsfCorrelationStrategy::Decorrelate ( const WsfTrackId & aRawTrackId)
virtual

Allow the user to break an existing correlation.

Reimplemented in WsfNearestNeighborCorrelation.

References mCorrelationMap.

Referenced by WsfNearestNeighborCorrelation::Decorrelate(), and WsfClusterCorrelation::MakeDecorrelated().

◆ GetCorrelatedTrackId()

const WsfTrackId & WsfCorrelationStrategy::GetCorrelatedTrackId ( const WsfTrackId & aRawTrackId) const

Given a raw track id, return the (local) track id previously correlated with this track id. If there is no correlation, the track id will be "null", (i.e., the function WsfTrackId::IsNull will return true for the returned value of this method.

References mCorrelationMap.

Referenced by WsfPerfectCorrelation::CorrelateImpl().

◆ GetSimulation()

WsfSimulation * WsfCorrelationStrategy::GetSimulation ( ) const

◆ GetTrackManager()

◆ Initialize()

virtual bool WsfCorrelationStrategy::Initialize ( WsfTrackManager * aTrackManagerPtr)
inlinevirtual

◆ NewTrackCorrelation()

void WsfCorrelationStrategy::NewTrackCorrelation ( const WsfTrack & aRawTrack,
const WsfLocalTrack & aLocalTrack )

Notifies the correlation strategy that a new track correlation has been made This is called by the track manager for new tracks.

References WsfTrack::GetTrackId(), and mCorrelationMap.

Referenced by WsfMTT_Correlation::CorrelateImpl().

◆ NotifyOfLocalTrackCorrelation()

void WsfCorrelationStrategy::NotifyOfLocalTrackCorrelation ( double aSimTime,
const WsfLocalTrack & aLocalTrack,
const WsfTrackId & aRawTrackId )

Notifies the track manager and observers that a track has been correlated by the correlation strategy

Referenced by WsfPerfectCorrelation::CorrelateImpl(), and WsfTruthCorrelation::CorrelateImpl().

◆ operator=()

WsfCorrelationStrategy & WsfCorrelationStrategy::operator= ( const WsfCorrelationStrategy & aRhs)
protected

◆ ProcessInput()

bool WsfCorrelationStrategy::ProcessInput ( UtInput & aInput)
inlineoverridevirtual

◆ SetTrackManager()

void WsfCorrelationStrategy::SetTrackManager ( WsfTrackManager * aTrackManagerPtr)
inline

◆ TestCorrelation()

bool WsfCorrelationStrategy::TestCorrelation ( const WsfTrack & aTrack1,
const WsfTrack & aTrack2 )

Method to facilitate unit testing.

References WsfTrackListT< T >::AddTrack(), Correlate(), and WsfTrack::GetUpdateTime().

Member Data Documentation

◆ mCorrelationMap


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