WSF
WsfFusionCenter.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFFUSIONCENTER_HPP
13#define WSFFUSIONCENTER_HPP
14
15#include "wsf_mil_export.h"
16
17#include <map>
18#include <vector>
19
20#include "UtCallbackHolder.hpp"
21#include "UtInput.hpp"
22#include "UtLog.hpp"
23#include "WsfFalseTarget.hpp"
26#include "WsfLocalTrack.hpp"
28class WsfTrack;
29class WsfSensor;
30
34
35class WSF_MIL_EXPORT WsfFusionCenter : public WsfScriptProcessor
36{
37public:
45
46 using PlatformScreenerPair = std::pair<WsfStringId, WsfFalseTargetScreener*>;
47 using RejectionRatios = std::map<WsfFalseTarget::RadarBehavior, double>;
48 using RejectionRatiosIter = std::map<WsfFalseTarget::RadarBehavior, double>::iterator;
49 using IdVec = std::vector<size_t>;
50 using Screeners = std::vector<PlatformScreenerPair>;
51 using ScreenersIter = std::vector<PlatformScreenerPair>::iterator;
52 using SiteIds = std::vector<WsfStringId>;
53 using SiteIdsIter = SiteIds::iterator;
54 using RadarSensorIds = std::vector<WsfFalseTarget::RadarSnsrPair>;
55 using RadarSensorIdsIter = std::vector<WsfFalseTarget::RadarSnsrPair>::iterator;
56 using InterScreenerConsistency = std::map<size_t, unsigned int>;
57 using IdToTrackIdMultiMap = std::map<size_t, WsfTrackId>;
58 using IdTrackIdPair = std::pair<size_t, WsfTrackId>;
59 using IdTrackIdList = std::vector<IdTrackIdPair>;
60
61 WsfFusionCenter(WsfScenario& aScenario);
64 ~WsfFusionCenter() override;
65
66 WsfProcessor* Clone() const override;
67 bool Initialize(double aSimTime) override;
68 bool ProcessInput(UtInput& aInput) override;
69
70 // void GeneratePlot();
71 Output GetOutputType() const { return mOutput; }
72 void PlatformDeleted(WsfPlatform* aPlatformPtr) override;
73 void PrintFuserState(ut::log::MessageStream& aMsgStream, double aSimTime);
74 bool ReceiveMessage(double aSimTime, const WsfMessage& aMessage) override;
75 void Update(double aSimTime) override;
76 virtual void UpdateState(double aSimTime);
77
78 void SetConsistencyConstraint(bool aConsistencyConstrained) { mConsistencyConstrained = aConsistencyConstrained; }
79 bool GetConsistenctConstraint() { return mConsistencyConstrained; }
80
81protected:
82 // void AddFalseTargetTracks(double aSimTime,
83 // size_t aBlipsToAdd);
84 void AdjustTrackQuantities(double aSimTime);
85 void CheckForScreenerAdd(double aSimTime, WsfSensor* aSensorPtr, WsfSensorMode* aModePtr);
86 void CheckForScreenerReset(double aSimTime, WsfSensor* aSensorPtr, WsfSensorMode* aModePtr);
87 // void CreateFalseTargetPlatforms(double aSimTime);
88 bool FT_Fusible(size_t aBlipId);
89 bool RT_Fusible(size_t aTargetId);
90 size_t GetValidBlipCount();
91 // void UpdateTrackableBlips(double aSimTime);
92 // void UpdateActiveTracks(double aSimTime);
93 void UpdateFalseTargetTracks(double aSimTime);
94 void UpdateRealTargetTracks(double aSimTime);
95 // void UpdateScreenerTracks();
96
97private:
98 bool AddScreener(WsfStringId aPlatformId, WsfFalseTargetScreener* aScreenerPtr);
99 bool DeleteScreener(WsfStringId aPlatformId, WsfFalseTargetScreener* aScreenerPtr);
100 bool DeleteAllScreenersOn(WsfStringId aPlatformId);
101 void DeleteAllTracks(double aSimTime);
102 void DetermineOutputType();
103 bool FindScreener(WsfStringId aPlatformId, WsfFalseTargetScreener* aScreenerPtr) const;
104 /*
105 bool UpdateLocalTrackFromNonLocalTrack(double aSimTime,
106 WsfLocalTrack& aLocalTrack,
107 const WsfTrack& aNonLocalTrack);
108 bool UpdateNonKinematicData(double aSimTime,
109 WsfTrackManager& aTrackManager,
110 WsfLocalTrack& aLocalTrack,
111 const WsfTrack& aNonLocalTrack);
112
113 bool UpdateLocalTrackFromNonLocalTrack(double aSimTime,
114 WsfLocalTrack& aLocalTrack,
115 const WsfTrack& aNonLocalTrack);
116 bool UpdateNonKinematicData(double aSimTime,
117 WsfTrackManager& aTrackManager,
118 WsfLocalTrack& aLocalTrack,
119 const WsfTrack& aNonLocalTrack);
120 */
121 RejectionRatios GetRejectionRatioMap() { return mRejectionRatios; }
122 // void ResetBlipPlatformPtrs();
123
124 IdTrackIdList mActiveRT_Tracks; // active target tracks that have been presented to the track manager
125 IdTrackIdList mBlockedRT_Tracks;
126 IdToTrackIdMultiMap mScreenersRT_Tracks; // multi-map of aggregate target name Ids to tracks from the screeners
127 IdVec mScreenersRT_IdList; // list of target name Ids from the screeners.
128
129 IdTrackIdList mActiveFT_Tracks; // active false-target tracks that have been presented to the track manager
130 IdToTrackIdMultiMap mScreenersFT_Tracks; // multi-map of aggregate of blip name Ids to false-target tracks from the screeners
131 IdVec mScreenersFT_IdList; // list of false-target blip name Ids from the screeners.
132
133 UtCallbackHolder mCallbacks; // Construct to find out when a sensor turns on or off...
134
135 bool mConsistencyChanged;
136 bool mConsistencyConstrained; // tracks ar0e only reported if consistent across all screeners
137 bool mDebugEnabled;
138 InterScreenerConsistency mFalseTargetConsistency; // container for denoting screener consistency for FTs
139 InterScreenerConsistency mLastFalseTargetConsistency; // container for denoting screener consistency for FTs
140
141 double mFrameTime; // fusion center frame time in seconds
142
143 size_t mFusedFT_Number; // dynamic number of false targets remaining following screener "algorithmics"
144 size_t mFusedRT_Number; // dynamic number of real targets remaining following screener "algorithmics"
145 size_t mLastAggFT_Number; // aggregate false target number, used to determine if a state change has occurred
146 size_t mLastAggRT_Number; // aggregate real target number, used to determine if a state change has occurred
147
148 double mLastUpdateTime; // last time a fusion center update occurred
149 Output mOutput; // output type for the fusion center display
150 unsigned int mPlotCapacity; // number of targets which can be plotted on the radar scope
151 bool mProduceFusedObjects; // determines whether actual simulation platforms will be created for the false targets
152 InterScreenerConsistency mRealTargetConsistency; // container for denoting screener consistency for RTs
153 InterScreenerConsistency mLastRealTargetConsistency; // container for denoting screener consistency for RTs
154 RadarSensorIds mRegisteredSites; // site/sensor key for radars that have successfully registered (i.e. are valid)
155 RejectionRatios mRejectionRatios; // FT rejection ratio based upon Appearance
156 Screeners mScreeners; // vector of screeners reporting to the fusion center
157 bool mStateChange; // boolean for denoting whether a state change has occurred
158 unsigned int mTrackCapacity; // number of tracks which can be maintained by the radar
159 SiteIds mValidSites; // vector of valid sites (i.e. radars)
160 WsfFusionStrategy* mFusionStrategyPtr;
161};
162
163#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfFalseTargetScreener.hpp:41
std::vector< WsfFalseTarget::RadarSnsrPair > RadarSensorIds
Definition WsfFusionCenter.hpp:54
std::vector< WsfFalseTarget::RadarSnsrPair >::iterator RadarSensorIdsIter
Definition WsfFusionCenter.hpp:55
std::pair< WsfStringId, WsfFalseTargetScreener * > PlatformScreenerPair
Definition WsfFusionCenter.hpp:46
std::map< size_t, WsfTrackId > IdToTrackIdMultiMap
Definition WsfFusionCenter.hpp:57
SiteIds::iterator SiteIdsIter
Definition WsfFusionCenter.hpp:53
std::vector< size_t > IdVec
Definition WsfFusionCenter.hpp:49
std::vector< PlatformScreenerPair >::iterator ScreenersIter
Definition WsfFusionCenter.hpp:51
std::map< size_t, unsigned int > InterScreenerConsistency
Definition WsfFusionCenter.hpp:56
WsfFusionCenter & operator=(const WsfFusionCenter &)=delete
std::map< WsfFalseTarget::RadarBehavior, double > RejectionRatios
Definition WsfFusionCenter.hpp:47
WsfFusionCenter(WsfScenario &aScenario)
Definition WsfFusionCenter.cpp:42
std::vector< IdTrackIdPair > IdTrackIdList
Definition WsfFusionCenter.hpp:59
std::map< WsfFalseTarget::RadarBehavior, double >::iterator RejectionRatiosIter
Definition WsfFusionCenter.hpp:48
void SetConsistencyConstraint(bool aConsistencyConstrained)
Definition WsfFusionCenter.hpp:78
bool GetConsistenctConstraint()
Definition WsfFusionCenter.hpp:79
std::vector< WsfStringId > SiteIds
Definition WsfFusionCenter.hpp:52
Output
Definition WsfFusionCenter.hpp:39
@ cOVERLOAD
Definition WsfFusionCenter.hpp:43
@ cPLOT
Definition WsfFusionCenter.hpp:40
@ cCORRELATED_PLOT
Definition WsfFusionCenter.hpp:41
@ cTRACKS
Definition WsfFusionCenter.hpp:42
std::pair< size_t, WsfTrackId > IdTrackIdPair
Definition WsfFusionCenter.hpp:58
std::vector< PlatformScreenerPair > Screeners
Definition WsfFusionCenter.hpp:50
Output GetOutputType() const
Definition WsfFusionCenter.hpp:71
Definition WsfFusionStrategy.hpp:52
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
virtual bool ReceiveMessage(double aSimTime, const WsfMessage &aMessage)
Definition WsfPlatformPart.cpp:465
virtual void PlatformDeleted(WsfPlatform *aPlatformPtr)
Definition WsfPlatformPart.cpp:343
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
WsfProcessor(const WsfScenario &aScenario)
Definition WsfProcessor.cpp:25
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
void Update(double aSimTime) override
Definition WsfScriptProcessor.cpp:281
WsfProcessor * Clone() const override
Definition WsfScriptProcessor.cpp:97
WsfScriptProcessor(const WsfScenario &aScenario)
Definition WsfScriptProcessor.cpp:30
bool Initialize(double aSimTime) override
Definition WsfScriptProcessor.cpp:104
bool ProcessInput(UtInput &aInput) override
Definition WsfScriptProcessor.cpp:186
Definition WsfSensorMode.hpp:36
Definition WsfSensor.hpp:92
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Copyrights Multiple, All Rights Reserved