12#ifndef WSFTRACKMANAGER_HPP
13#define WSFTRACKMANAGER_HPP
15#include "wsf_export.h"
21#include "UtCallback.hpp"
64 static std::unique_ptr<UtScriptClass>
CreateScriptClass(
const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
101 void SetCorrelationStrategy(
WsfStringId aTypeName);
127 virtual void PurgeInactiveTracks(
double aSimTime,
double aInactivityTimeLimit);
129 virtual void PurgeInactiveRawTracks(
double aSimTime,
double aInactivityTimeLimit,
double aStaticInactivityTimeLimit);
131 virtual void PurgeLocalTrackHistory(
double aSimTime,
double aKeepTimeInterval);
137 mWillPurgeInactiveTracks = aWillPurgeInactiveTracks;
149 virtual void LockTrack(
double aSimTime,
const WsfTrackId& aLocalTrackId);
151 virtual void LockTrack(
double aSimTime,
WsfLocalTrack* aLocalTrackPtr);
153 virtual void UnlockTrack(
double aSimTime,
const WsfTrackId& aLocalTrackId);
155 virtual void UnlockTrack(
double aSimTime,
WsfLocalTrack* aLocalTrackPtr);
160 virtual void StartFrame();
162 virtual void EndFrame();
166 virtual WsfTrack* AddRawTrackReport(
double aSimTime,
const WsfTrack& aRawTrack);
168 virtual void DropTrack(
double aSimTime,
const WsfTrackId& aRawTrackId);
170 std::unique_ptr<WsfLocalTrack> RemoveTrack(
const WsfTrackId& aTrackId);
181 void AddInitialTrack(
const WsfTrack& aTrack);
254 bool HasFilter() {
return (mPrototypeFilterPtr !=
nullptr); }
280 void NotifyOfCandidateTrackPromoted(
double aSimTime,
const WsfLocalTrack* aLocalTrackPtr);
282 void NotifyOfCurrentTargetChanged(
double aSimTime,
const WsfLocalTrack* aRawTrackPtr);
284 void NotifyOfLocalTrackCorrelation(
double aSimTime,
const WsfLocalTrack* aTrackPtr,
const WsfTrackId& aRawTrackId);
286 void NotifyOfLocalTrackDecorrelation(
double aSimTime,
const WsfLocalTrack* aLocalTrackPtr,
const WsfTrackId& aRawTrackId);
288 void NotifyOfLocalTrackDropped(
double aLocalSimTime,
const WsfLocalTrack* aTrackPtr);
290 void NotifyOfLocalTrackInitiated(
double aSimTime,
const WsfLocalTrack* aLocalTrackPtr,
const WsfTrack* aRawTrackPtr);
292 void NotifyOfLocalTrackUpdated(
double aSimTime,
const WsfLocalTrack* aLocalTrackPtr,
const WsfTrack* aRawTrackPtr);
294 void NotifyOfRawTrackDropped(
double aSimTime,
const WsfTrack* aTrack);
296 void NotifyOfRawTrackReceived(
double aSimTime,
const WsfTrack* aRawTrackPtr);
298 void NotifyOfTrackManagerChanged(
double aSimTime,
WsfTrackManager* aNewManagerPtr);
348 void AssessTrackQuality(
double aSimTime,
WsfTrack* aTrackPtr);
363 using AuxDataFusionRules = std::map<WsfStringId, AuxDataFusionRule>;
369 void DeleteCorrelatedRawTracks(
double aSimTime,
WsfLocalTrack& aLocalTrack);
371 bool RemoveRawTrack(
double aSimTime,
const WsfTrackId& aTrackId);
375 void ProcessAuxDataFusionInput(UtInput& aInput);
386 bool mWillPurgeInactiveTracks;
389 bool mDropUncorrelatedTracks;
392 bool mRetainRawTracks;
395 bool mMaintainTrackHistory;
403 bool mInitiateLocalTracks;
418 using InitialTrackList = std::vector<WsfTrack*>;
419 InitialTrackList mInitialTracks;
428 AuxDataFusionRules mAuxDataFusionRules;
@ cWSF_INITIALIZE_ORDER_TRACK_MANAGER
The track manager must be initialized prior to the mover.
Definition WsfComponentRoles.hpp:166
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_TRACK_MANAGER
A 'track manager' component (WsfTrackManager).
Definition WsfComponentRoles.hpp:107
WsfSimpleComponentT< WsfPlatformComponent > WsfSimplePlatformComponent
Definition WsfSimpleComponent.hpp:126
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
WsfTrackListT< WsfLocalTrack > WsfLocalTrackList
Definition WsfTrackList.hpp:89
WsfTrackListT< WsfTrack > WsfTrackList
Definition WsfTrackList.hpp:88
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfComponent.hpp:39
virtual bool Initialize(double aSimTime)
Definition WsfComponent.cpp:45
virtual bool Initialize2(double aSimTime)
Definition WsfComponent.cpp:63
virtual bool ProcessInput(UtInput &aInput)
Definition WsfComponent.cpp:100
Definition WsfCorrelationStrategy.hpp:51
Implement a filter as an adapter.
Definition WsfFilter.hpp:24
Definition WsfFusionStrategy.hpp:52
Definition WsfLocalTrack.hpp:32
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
WsfSimpleComponentT & operator=(const WsfSimpleComponentT &aRhs)
Definition WsfSimpleComponent.hpp:84
int mRoles[2]
Definition WsfSimpleComponent.hpp:116
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfTrackId.hpp:33
Definition WsfTrackManager.hpp:62
UtCallbackListN< void(double, const WsfLocalTrack *)> LocalTrackDropped
Definition WsfTrackManager.hpp:310
WsfLocalTrack * GetPrototypeTrack() const
Definition WsfTrackManager.hpp:356
UtCallbackListN< void(double, const WsfLocalTrack *, const WsfTrackId &)> LocalTrackCorrelation
Definition WsfTrackManager.hpp:307
UtCallbackListN< void(double, const WsfLocalTrack *, const WsfTrack *)> LocalTrackInitiated
Definition WsfTrackManager.hpp:309
UtCallbackListN< void(double, WsfTrackManager *)> TrackManagerChanged
Definition WsfTrackManager.hpp:314
void SetDropUncorrelatedTracks(bool aDropUncorrelatedTracks)
Definition WsfTrackManager.hpp:110
UtCallbackListN< void(double, const WsfLocalTrack *)> CurrentTargetChanged
Definition WsfTrackManager.hpp:306
UtCallbackListN< void(double, const WsfTrack *)> RawTrackReceived
Definition WsfTrackManager.hpp:313
virtual WsfTrackManager * Clone() const
Definition WsfTrackManager.hpp:81
bool DebugEnabled() const
Return whether debug is enabled for this instance.
Definition WsfTrackManager.hpp:116
WsfTrack * GetRawTrackEntry(unsigned int aEntryIndex)
Definition WsfTrackManager.hpp:219
const WsfScenario & GetScenario() const
Definition WsfTrackManager.hpp:358
WsfLocalTrack * InitiateTrackSilent(double aSimTime, const WsfTrack &aRawTrack)
Definition WsfTrackManager.cpp:929
bool WillPurgeInactiveTracks() const
Will some external process perform period purging of inactive tracks.
Definition WsfTrackManager.hpp:141
const WsfTrackId GetCurrentTargetTrackId() const
Get the track ID for the current target of interest.
Definition WsfTrackManager.hpp:263
UtCallbackListN< void(double, const WsfLocalTrack *, const WsfTrack *)> LocalTrackUpdated
Definition WsfTrackManager.hpp:311
UtCallbackListN< void(double, const WsfTrack *)> RawTrackDropped
Definition WsfTrackManager.hpp:312
WsfCorrelationStrategy & GetCorrelationStrategy()
Return the correlation strategy used by this track manager.
Definition WsfTrackManager.hpp:93
int GetComponentInitializationOrder() const override
Definition WsfTrackManager.hpp:75
WsfLocalTrack * GetTrackEntry(unsigned int aEntryIndex)
Definition WsfTrackManager.hpp:206
WsfLocalTrackList & GetFilteredRawTrackList()
Definition WsfTrackManager.hpp:247
bool HasFilter()
Definition WsfTrackManager.hpp:254
const WsfFusionStrategy & GetFusionStrategy() const
Definition WsfTrackManager.hpp:98
WsfLocalTrackList & GetTrackList()
Definition WsfTrackManager.hpp:235
void SetWillPurgeInactiveTracks(bool aWillPurgeInactiveTracks)
Definition WsfTrackManager.hpp:135
WsfComponent * CloneComponent() const override
Definition WsfTrackManager.hpp:73
WsfFusionStrategy & GetFusionStrategy()
Return the fusion strategy used by this track manager.
Definition WsfTrackManager.hpp:97
WsfTrackList & GetRawTrackList()
Definition WsfTrackManager.hpp:239
WsfTrack * FindRawTrack(const WsfTrackId &aRawTrackId)
Definition WsfTrackManager.hpp:231
const WsfCorrelationStrategy & GetCorrelationStrategy() const
Definition WsfTrackManager.hpp:94
unsigned int GetTrackCount() const
Definition WsfTrackManager.hpp:200
UtCallbackListN< void(double, const WsfLocalTrack *)> CandidateTrackPromoted
Definition WsfTrackManager.hpp:305
unsigned int GetRawTrackCount()
Definition WsfTrackManager.hpp:212
void ComponentParentChanged(WsfPlatform *aPlatformPtr) override
Definition WsfTrackManager.hpp:76
void SetInitiateLocalTracks(bool aInitiateLocalTracks)
Definition WsfTrackManager.hpp:120
void * QueryInterface(int aRole) override
Definition WsfTrackManager.hpp:74
bool UpdateAuxData(double aSimTime, WsfLocalTrack &aLocalTrack, const WsfTrack &aNonLocalTrack)
Definition WsfTrackManager.cpp:1105
WsfPlatform * GetPlatform() const
Return the platform with which this track manager is associated.
Definition WsfTrackManager.hpp:90
AuxDataFusionRule
Definition WsfTrackManager.hpp:337
@ cADF_PRIVATE
Definition WsfTrackManager.hpp:338
@ cADF_PREFER_LOCAL
Definition WsfTrackManager.hpp:340
@ cADF_ONLY_LOCAL
Definition WsfTrackManager.hpp:339
WsfLocalTrack * FindTrack(const WsfTrackId &aLocalTrackId)
Definition WsfTrackManager.hpp:225
void SetDebug(bool aDebug)
Set whether this instance will print diagnostic message to standard output.
Definition WsfTrackManager.hpp:113
WsfTrackManager()=default
void ClearCurrentTarget()
Definition WsfTrackManager.hpp:270
UtCallbackListN< void(double, const WsfLocalTrack *, const WsfTrackId &)> LocalTrackDecorrelation
Definition WsfTrackManager.hpp:308
static std::unique_ptr< UtScriptClass > CreateScriptClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfTrackManager.cpp:1728
const WsfLocalTrackList & GetFilteredRawTrackList() const
Return the filtered sensor track list (const version).
Definition WsfTrackManager.hpp:250
TrackStatusIndication
Definition WsfTrackManager.hpp:323
@ cCREATED
A local track has been created.
Definition WsfTrackManager.hpp:325
@ cNONE
There is no change, or the code is invalid.
Definition WsfTrackManager.hpp:324
@ cRAW_TRACK_RECEIVED
An unprocessed raw track was received.
Definition WsfTrackManager.hpp:330
@ cCURRENT_TARGET_CHANGED
The current target has changed.
Definition WsfTrackManager.hpp:331
@ cDECORRELATED
A local track has been decorrelated.
Definition WsfTrackManager.hpp:333
@ cDROPPED
A local track has been dropped.
Definition WsfTrackManager.hpp:327
@ cRAW_TRACK_DROPPED
A raw track has been dropped.
Definition WsfTrackManager.hpp:329
@ cCORRELATED
A local track has been correlated.
Definition WsfTrackManager.hpp:332
@ cUPDATED
A local track has been updated.
Definition WsfTrackManager.hpp:326
@ cCANDIDATE_TRACK_PROMOTED
A "candidate" local track has been promoted to a full local track.
Definition WsfTrackManager.hpp:328
WsfLocalTrackList & GetLocalTrackList()
Definition WsfTrackManager.hpp:243
WsfLocalTrack * InitiateAndCorrelateTrack(double aSimTime, const WsfTrack &aRawTrack)
Deprecated; use InitiateTrackSilent instead.
Definition WsfTrackManager.hpp:188
bool LocalTracksInitiated() const
Accessor to determine if local tracks are initiated (true by default).
Definition WsfTrackManager.hpp:123
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120