WSF
WsfEW_SensorComponent.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// Updated by Infoscitex, a DCS Company
13//****************************************************************************
14
15#ifndef WSFEW_SENSORCOMPONENT_HPP
16#define WSFEW_SENSORCOMPONENT_HPP
17
18#include <vector>
19
20#include "WsfEW_Result.hpp"
21#include "WsfFalseTarget.hpp"
24#include "wsf_mil_export.h"
25
28class WsfScenario;
29#include "WsfSensor.hpp"
31
33class WSF_MIL_EXPORT WsfEW_SensorComponent : public WsfSensorComponent
34{
35public:
36 static void RegisterComponentFactory(WsfScenario& aScenario);
37 static WsfEW_SensorComponent* Find(const WsfSensor& aSensor);
39
43 ~WsfEW_SensorComponent() override = default;
44
46
47 WsfComponent* CloneComponent() const override;
48 WsfStringId GetComponentName() const override;
49 const int* GetComponentRoles() const override;
50 void* QueryInterface(int aRole) override;
52
54
55 bool Initialize(double aSimTime) override;
56
57 bool ProcessModeInput(UtInput& aInput, WsfSensorMode& aSensorMode) override;
58 bool ProcessBeamInput(UtInput& aInput, WsfSensorBeam& aSensorBeam) override;
59
60 void SelectMode(double aSimTime, WsfStringId aModeNameId) override;
61 void DeselectMode(double aSimTime, WsfStringId aModeNameId) override;
62
63 void AttemptToDetect(double aSimTime, WsfSensorResult& aResult) override;
64
66 wsf::SphericalMeasurementErrors& aErrors) const override;
67
68 void PrePerformScheduledDetections(double aSimTime) override;
69
70 void PostPerformScheduledDetections(double aSimTime) override;
71
72 void UpdateTrack(double aSimTime, WsfTrack* aTrackPtr, WsfPlatform* aTargetPtr, WsfSensorResult& aResult) override;
73
74 bool TrackerAllowTracking(double aSimTime,
75 const TrackerSettings& aSettings,
76 const WsfTrackId& aRequestId,
77 size_t aObjectId,
78 WsfTrack* aTrackPtr,
79 WsfSensorResult& aResult) override;
80
81 // Callback from WsfSensorTracker implementation to initialize a track.
82 // Return a track of the desired type, or 0 to let the default be created.
83 void TrackerInitializeTrack(double aSimTime,
84 const TrackerSettings& aSettings,
85 const WsfTrackId& aRequestId,
86 size_t aObjectId,
87 WsfSensorMode* aModePtr,
88 WsfTrack*& aTrackPtr) override;
89
90 // Callback by WsfSensorTrack implementation when updating a track.
91 void TrackerUpdateTrack(double aSimTime,
92 const TrackerSettings& aSettings,
93 const WsfTrackId& aRequestId,
94 size_t aObjectId,
95 WsfSensorMode* aModePtr,
96 WsfTrack* aTrackPtr,
97 WsfPlatform* aTargetPtr,
98 WsfSensorResult& aResult) override;
99
100 // Callback from WsfSensorTracker implementation when dropping a track.
101 void TrackerDropTrack(double aSimTime,
102 const TrackerSettings& aSettings,
103 const WsfTrackId& aRequestId,
104 size_t aObjectId,
105 WsfSensorMode* aModePtr,
106 WsfTrack* aTrackPtr) override;
108
112
113
114 bool AttemptToDetectFalseTarget(double aSimTime,
115 WsfFalseTargetBlip* aBlipPtr,
116 WsfSensor::Settings& aSettings,
117 WsfSensorResult& aResult);
118
119 WsfFalseTargetScreener* GetScreener(const WsfSensorMode& aSensorMode) const;
120
121 bool IsEP_TechniqueActive(double aSimTime, WsfStringId aTechniqueId, WsfStringId aModeNameId = WsfStringId());
122 bool SelectEP_Technique(double aSimTime, WsfStringId aTechniqueId, WsfStringId aModeNameId = WsfStringId());
123 bool DeselectEP_Technique(double aSimTime, WsfStringId aTechniqueId, WsfStringId aModeNameId = WsfStringId());
124
125 bool JammingPerceived(const WsfSensorMode& aSensorMode);
126 bool JammingPerceived(WsfStringId aModeNameId);
127
128 bool ContinuousJammingPerceived(const WsfSensorMode& aSensorMode);
129 bool ContinuousJammingPerceived(WsfStringId aModeNameId);
130
131 bool PulseJammingPerceived(const WsfSensorMode& aSensorMode);
132 bool PulseJammingPerceived(WsfStringId aModeNameId);
133
134 double GetJammingFirstPerceived(const WsfSensorMode& aSensorMode);
135 double GetJammingLastPerceived(const WsfSensorMode& aSensorMode);
137
138 typedef std::map<WsfEM_Xmtr*, WsfSensorResult> JamStrobeResultsMap;
139
142 {
143 public:
144 EW_Beam();
145
149 bool CanPerceiveJamming() const;
150
151 bool DetectJamStrobes(WsfEW_SensorComponent& aEW_Sensor,
152 double aSimTime,
153 WsfSensor::Settings& aSettings,
154 JamStrobeResultsMap& aResults);
155
157
160
163
166 };
167
170 {
171 public:
172 EW_Mode();
173 EW_Mode(const EW_Mode& aSrc);
174 EW_Mode& operator=(const EW_Mode&) = delete;
175 ~EW_Mode();
176
177 bool JammingPerceived();
180 double GetJammingFirstPerceived() const;
184 double GetJammingLastPerceived() const;
188
189 bool DetectJamStrobes(WsfEW_SensorComponent& aEW_Sensor,
190 double aSimTime,
191 WsfSensor::Settings& aSettings,
192 JamStrobeResultsMap& aResults);
193
194 bool UpdateFalseTargetInteractors(double aSimTime, WsfEW_SensorComponent& aEW_Sensor, WsfSensor::Settings& aSettings);
195
196 std::vector<EW_Beam> mBeamList;
197
199
207
210
213
217
219 };
220
221private:
222 WsfSensorMode* GetMode(WsfStringId aModeNameId) const;
223 EW_Mode& GetOrCreateEW_Mode(const WsfSensorMode& aSensorMode);
224 EW_Beam& GetOrCreateEW_Beam(const WsfSensorBeam& aSensorBeam);
225
226 void PerformFalseTargetDetections(double aSimTime, WsfSensor::Settings& aSettings, WsfTrackId& aRequestId);
227
228 void PerformJamStrobeDetections(double aSimTime);
229
230 bool DetectJamStrobes(double aSimTime, WsfSensor::Settings& aSettings, JamStrobeResultsMap& aResults);
231
232 void AttemptToDetectFalseTarget(double aSimTime,
233 WsfFalseTarget::Blip* aBlipPtr,
234 WsfPlatform* aTempPlatformPtr,
235 WsfSensor::Settings& aSettings,
236 WsfEM_Interaction& aJammerInteraction,
237 WsfSensorResult& aResult);
238
239 void UpdateFalseTargetTrack(double aSimTime, WsfTrack* aTrackPtr, WsfFalseTargetBlip* aBlipPtr, WsfSensorResult& aResult);
240
241 static bool PerceivesJamming(const WsfSensorResult& aResult,
242 double aContJNR_Threshold,
243 double aPulsedJNR_Threshold,
244 double aCoherentJNR_Threshold,
245 bool& aPerceivesContJamming,
246 bool& aPerceivesPulseJamming,
247 bool& aPerceivesCoherentJamming);
248 static bool PerceivesContinuousJamming(const WsfSensorResult& aResult, double aContJNR_Threshold);
249 static bool PerceivesPulseJamming(const WsfSensorResult& aResult, double aPulsedJNR_Threshold);
250 static bool PerceivesCoherentJamming(const WsfSensorResult& aResult, double aCoherentJNR_Threshold);
251
252 std::vector<EW_Mode> mModeList;
253 EW_Mode mTemplate;
254
258
259 double mLastSimTime;
260 WsfEM_Rcvr* mLastRcvrPtr;
261 WsfEW_Result mLastEW_Result;
263
264 // See TrackerAllowTracking and TrackerDropTrack for this
265 double mSuppressedTrackingSimTime;
266 size_t mSuppressedTrackingObjectId;
267
268 bool mIsWsfRadarSensor;
269
272
273
274 bool mHasFalseTargetScreeners;
276 bool mHasJamStrobeDetectors;
278};
279
281
282#endif
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_EW_SENSOR
EW extension for WsfSensor.
Definition WsfMilComponentRoles.hpp:29
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfComponent.hpp:39
virtual const int * GetComponentRoles() const =0
virtual WsfStringId GetComponentName() const =0
virtual WsfComponent * CloneComponent() const =0
virtual void * QueryInterface(int aRole)=0
Definition WsfEM_Interaction.hpp:68
Definition WsfEM_Rcvr.hpp:68
Definition WsfEW_Result.hpp:28
The EW component extensions to a sensor beam.
Definition WsfEW_SensorComponent.hpp:142
double GetCoherentJNR_PerceptionThreshold() const
Definition WsfEW_SensorComponent.hpp:148
double GetContJNR_PerceptionThreshold() const
Definition WsfEW_SensorComponent.hpp:146
double GetPulsedJNR_PerceptionThreshold() const
Definition WsfEW_SensorComponent.hpp:147
double mCoherentJNR_PerceptionThreshold
The required JNR for coherent (FT) jamming perception by the operator.
Definition WsfEW_SensorComponent.hpp:165
double mPulsedJNR_PerceptionThreshold
The required JNR for pulse type jamming perception by the operator.
Definition WsfEW_SensorComponent.hpp:162
size_t mBeamIndex
Definition WsfEW_SensorComponent.hpp:156
EW_Beam()
Definition WsfEW_SensorComponent.cpp:1601
double mContJNR_PerceptionThreshold
The required JNR for continuous type jamming perception by the operator.
Definition WsfEW_SensorComponent.hpp:159
The EW component extensions to a sensor mode.
Definition WsfEW_SensorComponent.hpp:170
WsfJamStrobeDetector mJamStrobeDetector
Jam strobe detector data which is associated with this mode.
Definition WsfEW_SensorComponent.hpp:209
double mCoherentJammingFirstPerceived
Definition WsfEW_SensorComponent.hpp:205
double GetPulseJammingLastPerceived() const
Definition WsfEW_SensorComponent.hpp:186
bool JammingPerceived()
Definition WsfEW_SensorComponent.cpp:1736
double GetContJammingLastPerceived() const
Definition WsfEW_SensorComponent.hpp:185
bool mAccumPerceivesPulseJamming
Definition WsfEW_SensorComponent.hpp:215
WsfFalseTargetScreener * mScreenerPtr
Definition WsfEW_SensorComponent.hpp:198
double GetCoherentJammingFirstPerceived() const
Definition WsfEW_SensorComponent.hpp:183
double mPulseJammingLastPerceived
Definition WsfEW_SensorComponent.hpp:204
EW_Mode & operator=(const EW_Mode &)=delete
bool mMaintainTrackMeasurementHistory
Definition WsfEW_SensorComponent.hpp:218
double mContJammingLastPerceived
Definition WsfEW_SensorComponent.hpp:202
bool PulseJammingPerceived()
Definition WsfEW_SensorComponent.cpp:1775
std::vector< EW_Beam > mBeamList
Definition WsfEW_SensorComponent.hpp:196
EW_Mode()
Definition WsfEW_SensorComponent.cpp:1683
bool mUseJamStrobeDetector
If 'true' then used the jam strobe detector.
Definition WsfEW_SensorComponent.hpp:212
double mContJammingFirstPerceived
Definition WsfEW_SensorComponent.hpp:201
double mCoherentJammingLastPerceived
Definition WsfEW_SensorComponent.hpp:206
double mPulseJammingFirstPerceived
Definition WsfEW_SensorComponent.hpp:203
double GetPulseJammingFirstPerceived() const
Definition WsfEW_SensorComponent.hpp:182
bool ContinuousJammingPerceived()
Definition WsfEW_SensorComponent.cpp:1767
bool mAccumPerceivesContJamming
Definition WsfEW_SensorComponent.hpp:214
double GetCoherentJammingLastPerceived() const
Definition WsfEW_SensorComponent.hpp:187
bool mAccumPerceivesCoherentJamming
Definition WsfEW_SensorComponent.hpp:216
double mJammingPerceptionResetTime
Definition WsfEW_SensorComponent.hpp:200
double GetJammingFirstPerceived() const
Definition WsfEW_SensorComponent.cpp:1745
double GetContJammingFirstPerceived() const
Definition WsfEW_SensorComponent.hpp:181
The EW component that will be attached to all sensor systems.
Definition WsfEW_SensorComponent.hpp:34
static WsfEW_SensorComponent * FindOrCreate(WsfSensor &aSensor)
Definition WsfEW_SensorComponent.cpp:113
bool SelectEP_Technique(double aSimTime, WsfStringId aTechniqueId, WsfStringId aModeNameId=WsfStringId())
Definition WsfEW_SensorComponent.cpp:799
static WsfEW_SensorComponent * Find(const WsfSensor &aSensor)
Find the instance of this component attached to the specified sensor.
Definition WsfEW_SensorComponent.cpp:103
bool PulseJammingPerceived(const WsfSensorMode &aSensorMode)
Definition WsfEW_SensorComponent.cpp:883
bool AttemptToDetectFalseTarget(double aSimTime, WsfFalseTargetBlip *aBlipPtr, WsfSensor::Settings &aSettings, WsfSensorResult &aResult)
Definition WsfEW_SensorComponent.cpp:977
double GetJammingFirstPerceived(const WsfSensorMode &aSensorMode)
Definition WsfEW_SensorComponent.cpp:896
WsfEW_SensorComponent()
Definition WsfEW_SensorComponent.cpp:130
bool DeselectEP_Technique(double aSimTime, WsfStringId aTechniqueId, WsfStringId aModeNameId=WsfStringId())
Definition WsfEW_SensorComponent.cpp:828
std::map< WsfEM_Xmtr *, WsfSensorResult > JamStrobeResultsMap
Definition WsfEW_SensorComponent.hpp:138
~WsfEW_SensorComponent() override=default
bool IsEP_TechniqueActive(double aSimTime, WsfStringId aTechniqueId, WsfStringId aModeNameId=WsfStringId())
Returns true if the specified technique is active for the specified mode.
Definition WsfEW_SensorComponent.cpp:770
double GetJammingLastPerceived(const WsfSensorMode &aSensorMode)
Definition WsfEW_SensorComponent.cpp:902
static void RegisterComponentFactory(WsfScenario &aScenario)
Register the component factory that handles input for this component.
Definition WsfEW_SensorComponent.cpp:96
WsfEW_SensorComponent & operator=(const WsfEW_SensorComponent &)=delete
bool ContinuousJammingPerceived(const WsfSensorMode &aSensorMode)
Definition WsfEW_SensorComponent.cpp:870
WsfFalseTargetScreener * GetScreener(const WsfSensorMode &aSensorMode) const
Definition WsfEW_SensorComponent.cpp:763
bool JammingPerceived(const WsfSensorMode &aSensorMode)
Definition WsfEW_SensorComponent.cpp:857
Definition WsfFalseTarget.hpp:332
Definition WsfFalseTargetScreener.hpp:41
WsfFalseTargetBlip Blip
Definition WsfFalseTarget.hpp:58
Definition WsfJamStrobeDetector.hpp:25
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfSensorBeam.hpp:58
Definition WsfSensorComponent.hpp:36
virtual void PrePerformScheduledDetections(double aSimTime)
Definition WsfSensorComponent.hpp:99
virtual void TrackerUpdateTrack(double aSimTime, const TrackerSettings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *aTrackPtr, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
Definition WsfSensorComponent.hpp:158
virtual void AttemptToDetect(double aSimTime, WsfSensorResult &aResult)
Extends the sensor-model implementation of AttemptToDetect.
Definition WsfSensorComponent.hpp:80
virtual bool Initialize(double aSimTime)
Definition WsfComponent.cpp:45
WsfSensorTrackerSettings TrackerSettings
Definition WsfSensorComponent.hpp:39
virtual void DeselectMode(double aSimTime, WsfStringId aModeNameId)
Definition WsfSensorComponent.hpp:68
virtual void PostPerformScheduledDetections(double aSimTime)
Definition WsfSensorComponent.hpp:103
virtual void UpdateTrack(double aSimTime, WsfTrack *aTrackPtr, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
Definition WsfSensorComponent.hpp:106
virtual bool ProcessBeamInput(UtInput &aInput, WsfSensorBeam &aSensorBeam)
Definition WsfSensorComponent.hpp:62
virtual void ComputeSphericalMeasurementErrors(const WsfSensorResult &aResult, wsf::SphericalMeasurementErrors &aErrors) const
Definition WsfSensorComponent.hpp:89
virtual void TrackerInitializeTrack(double aSimTime, const TrackerSettings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *&aTrackPtr)
Definition WsfSensorComponent.hpp:140
virtual bool TrackerAllowTracking(double aSimTime, const TrackerSettings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfTrack *aTrackPtr, WsfSensorResult &aResult)
Definition WsfSensorComponent.hpp:123
virtual void TrackerDropTrack(double aSimTime, const TrackerSettings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *aTrackPtr)
Definition WsfSensorComponent.hpp:176
virtual bool ProcessModeInput(UtInput &aInput, WsfSensorMode &aSensorMode)
Definition WsfSensorComponent.hpp:61
virtual void SelectMode(double aSimTime, WsfStringId aModeNameId)
Definition WsfSensorComponent.hpp:67
Definition WsfSensorMode.hpp:36
Definition WsfSensorResult.hpp:27
Definition WsfSensor.hpp:133
Definition WsfSensor.hpp:92
Definition WsfTrackId.hpp:33
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
A standard set of errors associated with single sensor mono-static detections.
Definition WsfStandardSensorErrorModel.hpp:26
Copyrights Multiple, All Rights Reserved