WSF
WsfOTH_RadarSensor.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 WSFOTHRADARSENSOR_HPP
13#define WSFOTHRADARSENSOR_HPP
14
15#include "wsf_mil_export.h"
16
17#include <memory>
18#include <vector>
19
20#include "TblLookup.hpp"
22#include "WsfEM_Antenna.hpp"
23class WsfEM_Clutter;
24#include "WsfEM_Noise.hpp"
25#include "WsfEM_Rcvr.hpp"
26#include "WsfEM_Xmtr.hpp"
28#include "WsfMarcumSwerling.hpp"
29#include "WsfSensor.hpp"
30#include "WsfSensorBeam.hpp"
31#include "WsfSensorMode.hpp"
33
35class WSF_MIL_EXPORT WsfOTH_RadarSensor : public WsfSensor
36{
37public:
41
42 WsfSensor* Clone() const override;
43 bool Initialize(double aSimTime) override;
44 void PlatformAdded(double aSimTime, WsfPlatform* aPlatformPtr) override;
45 bool ProcessInput(UtInput& aInput) override;
46 void Update(double aSimTime) override;
47 void PerformScheduledDetections(double aSimTime) override;
48
49 size_t GetEM_RcvrCount() const override;
50 WsfEM_Rcvr& GetEM_Rcvr(size_t aIndex) const override;
51 size_t GetEM_RcvrCount(size_t aModeIndex) const override;
52 WsfEM_Rcvr& GetEM_Rcvr(size_t aModeIndex, size_t aIndex) const override;
53 size_t GetEM_XmtrCount() const override;
54 WsfEM_Xmtr& GetEM_Xmtr(size_t aIndex) const override;
55 size_t GetEM_XmtrCount(size_t aModeIndex) const override;
56 WsfEM_Xmtr& GetEM_Xmtr(size_t aModeIndex, size_t aIndex) const override;
57
59
60 // Some compilers require inner classes to be declared friends if they want to access outer class members
61 class OTH_Beam;
62 class OTH_Mode;
63 friend class OTH_Beam;
64 friend class OTH_Mode;
65
69 class OTH_Beam : public WsfSensorBeam
70 {
71 public:
72 OTH_Beam();
73 OTH_Beam(const OTH_Beam& aSrc);
74 OTH_Beam& operator=(const OTH_Beam&) = delete;
75 ~OTH_Beam() override;
76
77 // WsfSensorBeam methods.
78 WsfEM_Rcvr* GetEM_Rcvr() override { return mRcvrPtr.get(); }
79 WsfEM_Xmtr* GetEM_Xmtr() override { return mXmtrPtr.get(); }
80
81 bool ProcessInput(UtInput& aInput) override;
82
83 void AttemptToDetect(double aSimTime, WsfPlatform* aTargetPtr, Settings& aSettings, WsfSensorResult& aResult);
84
85 double GetAdjustmentFactor() const { return mAdjustmentFactor; }
86 double GetIntegrationGain() const override { return mIntegrationGain; }
87 void SetIntegrationGain(double aIntegrationGain) override { mIntegrationGain = aIntegrationGain; }
88 int GetNumberOfPulsesIntegrated() const override { return mNumberOfPulsesIntegrated; }
89 bool UsingDetector() const { return mUseDetector; }
90
91 double GetDopplerResolution() const { return mDopplerResolution; }
92
94 WsfMTI_TableManager::MTI_AdjustmentTable* GetMTI_AdjustmentTable() { return mMTI_AdjustmentTablePtr.get(); }
95
96 bool AreIonosphericParametersValid();
97
98 void ComputeIonosphericCharacteristics();
99
100 void UpdateIonosphericCharacteristics();
101
102 void GetReflectionLocationWCS(double aReflectionLocationWCS[]);
103
104 bool GetIonosphericRangeConstrained() const { return mIonosphericCharacteristics.mRangeConstrained; }
105
106 double GetMinUsableFrequency() const { return mIonosphericCharacteristics.mMinUsableFrequency; }
107
108 void GetIonosphericRangeLimits(double& aMin, double& aMax);
109
110 bool GetIonosphereChanged() const { return mIonosphereChanged; }
111
112 void SetIonosphereChanged(bool aIonosphereChanged) { mIonosphereChanged = aIonosphereChanged; }
113
114 void SetLoopGain(double aLoopGain) { mLoopGain = aLoopGain; }
115
116 void SetClutterAttenuationFactor(double aFactor) { mClutterAttenuationFactor = aFactor; }
117
118 // double ComputeClutterAttenuation();
119
120 bool Initialize(double aSimTime,
121 unsigned int aBeamIndex,
122 WsfSensor* aSensorPtr,
123 OTH_Mode* aModePtr,
124 bool aCanTransmit,
125 bool aCanReceive,
126 bool aShowCalibrationData,
127 bool aIsMultiBeam);
128
129 void ReadTable(UtInput& aInput, WsfMTI_TableManager::MTI_AdjustmentTable& aMTI_AdjustmentTable);
130
131 void ComputeMTI_Effects(WsfSensorResult& aResult, double& aClutterAttenuationFactor);
132
133 WsfStringId GetClutterType() const { return mClutterType; }
134 WsfEM_Clutter* GetClutter() const override { return mClutterPtr; }
135
136 std::unique_ptr<WsfEM_Antenna> mAntennaPtr;
137
139 std::unique_ptr<WsfEM_Xmtr> mXmtrPtr;
140
142 std::unique_ptr<WsfEM_Rcvr> mRcvrPtr;
143
147
150
152 double mErrorModelAzBeamwidth; // radians
153 double mErrorModelElBeamwidth; // radians
154 double mErrorModelPulseWidth; // seconds
156
157 private:
158 WsfPlatform* GetPlatform();
159
160 void AttemptToDetect(double aSimTime,
161 WsfPlatform* aTargetPtr,
162 Settings& aSettings,
163 WsfEM_Xmtr* aXmtrPtr,
164 WsfSensorResult& aResult);
165
166 void Calibrate(bool aPrint);
167
168 void ComputeClutterAttenuationFactor(OTH_Mode& aMode);
169
170 double ComputeIntegratedPulseCount(OTH_Mode& aMode);
171
172 bool InitializeDetector(OTH_Mode& aMode);
173 bool InitializeMTI(OTH_Mode& aMode);
174
175 void ComputeBouncePathRanges(WsfSensorResult& aResult, double& aXmtrToTgt, double& aRcvrToTgt);
176
177 bool CanBounceToTarget(WsfPlatform* aTargetPtr, WsfSensorResult& aResult);
178
180 bool mCanTransmit;
181
183 bool mUseDetector;
184
186 double mDopplerResolution;
187
189 double mOneM2DetectRange;
190
192 double mLookDownFactor;
193
195 double mPRF_Factor;
196
198 double mPostLockonDetectionThresholdAdjustment;
199
201 double mPostLockonAdjustmentDelayTime;
202
204 double mLoopGain;
205
207 double mAdjustmentFactor;
208
210 double mIntegrationGain;
211
214 int mNumberOfPulsesIntegrated;
215
221 wsf::MarcumSwerling mDetector;
222
225 std::shared_ptr<wsf::DetectionProbabilityTable> mProbabilityTablePtr;
226
229 std::shared_ptr<WsfMTI_TableManager::MTI_AdjustmentTable> mMTI_AdjustmentTablePtr;
230
232 // ! Not to be confused with the MTI processing specific variable
233 double mMTI_TableMaxRange;
234
239 double mClutterAttenuationFactor;
240
242 WsfStringId mClutterType;
243
245
246 double mMTI_MaxRange;
247 double mMTI_InterpulsePeriod_1;
248 double mMTI_InterpulsePeriod_2;
249 double mMTI_StabilityConstant;
250 double mMTI_Weights[3];
251 int mMTI_NumberOfStages;
252 bool mPerformMTI_Processing;
253 bool mMTI_ClutterLock;
254 bool mMTI_UpWind;
256
258 struct OTH_Geometry
259 {
260 double mAngularExtent;
261 double mReflectionLocWCS[3];
262 double mReflectionHeight;
263 double mGreatCircleDistance;
264 };
265
266 struct SolarCharacteristics
267 {
268 int mDayOfYear = 1;
269 int mHourOfDay = 12;
270 double mSolarAngRads;
271 double mSolarDeclinationAngRads;
272 double mSolarZenithAngRads;
273 };
274
275 struct IonosphereCharacteristics
276 {
277 double mElectronDensityAtMax = 4.0e11;
278 double mElectronHeightAtMax = 250000.0;
279 double mReflectionHeight = 300000.0;
280 double mTemperatureAtMax = 1540.0;
281 bool mRangeConstrained = false;
282
283 double mComputedElectronicDensity;
284 double mMaxIncidenceAngleDegrees;
285 double mMinRange;
286 double mMaxRange;
287 double mCriticalFrequency;
288 double mMaxUsableFrequency;
289 double mMinUsableFrequency;
290 };
291
292 // ionospheric variables
293 SolarCharacteristics mSolarCharacteristics;
294 IonosphereCharacteristics mIonosphericCharacteristics;
295 OTH_Geometry mOTH_Geometry;
296 bool mIonosphereChanged;
297 bool mComputeAtmosphericNoise;
298 bool mDebug;
299 };
300
302 class OTH_Mode : public WsfSensorMode
303 {
304 public:
305 OTH_Mode();
306 OTH_Mode(const OTH_Mode& aSrc);
307 OTH_Mode& operator=(const OTH_Mode&) = delete;
308 ~OTH_Mode() override;
309
310 // WsfSensorMode methods.
311 size_t GetBeamCount() const override { return mBeamList.size(); }
312 WsfSensorBeam* GetBeamEntry(size_t aBeamIndex) override { return mBeamList[aBeamIndex]; }
313
314 WsfMode* Clone() const override;
315 bool Initialize(double aSimTime) override;
316 bool ProcessInput(UtInput& aInput) override;
317
318 bool AttemptToDetect(double aSimTime, WsfPlatform* aTargetPtr, Settings& aSettings, WsfSensorResult& aResult) override;
319
320 void UpdateTrack(double aSimTime, WsfTrack* aTrackPtr, WsfPlatform* aTargetPtr, WsfSensorResult& aResult) override;
321
322 double GetAltFreqSelectDelay() const override { return mAltFreqSelectDelay; }
323 void ScheduleAltFreqChange(double aSimTime, int aAltFreqId = -1) override;
324 bool IsAltFreqChangeScheduled() const override { return mAltFreqChangeScheduled; }
325 double GetLastAltFreqSelectTime() const override { return mLastAltFreqSelectTime; }
326 bool IsFrequencyAgile() const override { return mIsFrequencyAgile; }
327
328 void Deselect(double aSimTime) override;
329 void Select(double aSimTime) override;
330
336 std::vector<OTH_Beam*> mBeamList;
337
338 protected:
339 void SelectAlternateFrequency(double aSimTime, int aAltFreqId = -1) override;
340
345 };
346
347private:
349 std::vector<OTH_Mode*> mOTH_ModeList;
350
352 std::vector<WsfEM_Xmtr*> mXmtrList;
353
355 std::vector<WsfEM_Rcvr*> mRcvrList;
356
358 bool mAnyModeCanTransmit;
359
361 bool mAnyModeCanReceive;
362
364 WsfPlatform* mTempGeometryPtr;
365};
366
367#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
An abstract class for computing clutter power.
Definition WsfEM_Clutter.hpp:25
Definition WsfEM_Noise.hpp:21
Definition WsfEM_Rcvr.hpp:68
Definition WsfEM_Xmtr.hpp:55
A nested class for the MTI adjustment table. This was extracted from WsfRadarSensor.
Definition WsfMTI_TableManager.hpp:44
Definition WsfMode.hpp:32
Definition WsfOTH_RadarSensor.hpp:70
WsfEM_Clutter * GetClutter() const override
Definition WsfOTH_RadarSensor.hpp:134
OTH_Beam & operator=(const OTH_Beam &)=delete
void SetClutterAttenuationFactor(double aFactor)
Definition WsfOTH_RadarSensor.hpp:116
WsfStringId GetClutterType() const
Definition WsfOTH_RadarSensor.hpp:133
std::unique_ptr< WsfEM_Antenna > mAntennaPtr
Definition WsfOTH_RadarSensor.hpp:136
double GetMinUsableFrequency() const
Definition WsfOTH_RadarSensor.hpp:106
std::unique_ptr< WsfEM_Rcvr > mRcvrPtr
The receiver for a radar beam.
Definition WsfOTH_RadarSensor.hpp:142
double mErrorModelElBeamwidth
Definition WsfOTH_RadarSensor.hpp:153
double mErrorModelAzBeamwidth
Additional parameters associated with measurement errors.
Definition WsfOTH_RadarSensor.hpp:152
double GetAdjustmentFactor() const
Definition WsfOTH_RadarSensor.hpp:85
WsfEM_Xmtr * GetEM_Xmtr() override
Definition WsfOTH_RadarSensor.hpp:79
int GetNumberOfPulsesIntegrated() const override
Definition WsfOTH_RadarSensor.hpp:88
OTH_Beam()
Definition WsfOTH_RadarSensor.cpp:432
void SetIntegrationGain(double aIntegrationGain) override
Definition WsfOTH_RadarSensor.hpp:87
WsfEM_Rcvr * GetEM_Rcvr() override
Definition WsfOTH_RadarSensor.hpp:78
WsfMTI_TableManager::MTI_AdjustmentTable * GetMTI_AdjustmentTable()
For External Services.
Definition WsfOTH_RadarSensor.hpp:94
void AttemptToDetect(double aSimTime, WsfPlatform *aTargetPtr, Settings &aSettings, WsfSensorResult &aResult)
Definition WsfOTH_RadarSensor.cpp:554
bool GetIonosphereChanged() const
Definition WsfOTH_RadarSensor.hpp:110
double GetDopplerResolution() const
Definition WsfOTH_RadarSensor.hpp:91
double GetIntegrationGain() const override
Definition WsfOTH_RadarSensor.hpp:86
bool UsingDetector() const
Definition WsfOTH_RadarSensor.hpp:89
bool GetIonosphericRangeConstrained() const
Definition WsfOTH_RadarSensor.hpp:104
std::unique_ptr< WsfEM_Xmtr > mXmtrPtr
The transmitter for a radar beam.
Definition WsfOTH_RadarSensor.hpp:139
void SetIonosphereChanged(bool aIonosphereChanged)
Definition WsfOTH_RadarSensor.hpp:112
WsfEM_Clutter * mClutterPtr
Definition WsfOTH_RadarSensor.hpp:146
double mErrorModelPulseWidth
Definition WsfOTH_RadarSensor.hpp:154
void SetLoopGain(double aLoopGain)
Definition WsfOTH_RadarSensor.hpp:114
WsfEM_Noise mNoise
The galactic noise.
Definition WsfOTH_RadarSensor.hpp:149
double mErrorModelDopplerResolution
Definition WsfOTH_RadarSensor.hpp:155
A 'mode' of the sensor.
Definition WsfOTH_RadarSensor.hpp:303
OTH_Mode()
Definition WsfOTH_RadarSensor.cpp:2172
bool mCanReceive
Definition WsfOTH_RadarSensor.hpp:333
double mAltFreqSelectDelay
Definition WsfOTH_RadarSensor.hpp:341
OTH_Mode & operator=(const OTH_Mode &)=delete
bool mOverrideMeasurementWithTruth
Definition WsfOTH_RadarSensor.hpp:331
WsfSensorBeam * GetBeamEntry(size_t aBeamIndex) override
Definition WsfOTH_RadarSensor.hpp:312
bool IsAltFreqChangeScheduled() const override
Definition WsfOTH_RadarSensor.hpp:324
void SelectAlternateFrequency(double aSimTime, int aAltFreqId=-1) override
Definition WsfOTH_RadarSensor.cpp:2480
double mLastAltFreqSelectTime
Definition WsfOTH_RadarSensor.hpp:343
double GetLastAltFreqSelectTime() const override
Definition WsfOTH_RadarSensor.hpp:325
size_t GetBeamCount() const override
Definition WsfOTH_RadarSensor.hpp:311
bool IsFrequencyAgile() const override
Definition WsfOTH_RadarSensor.hpp:326
bool mCanTransmit
Definition WsfOTH_RadarSensor.hpp:332
bool mExplicitBeamUsed
Definition WsfOTH_RadarSensor.hpp:335
bool mIsFrequencyAgile
Definition WsfOTH_RadarSensor.hpp:344
bool mImplicitBeamUsed
Definition WsfOTH_RadarSensor.hpp:334
std::vector< OTH_Beam * > mBeamList
Definition WsfOTH_RadarSensor.hpp:336
double GetAltFreqSelectDelay() const override
Definition WsfOTH_RadarSensor.hpp:322
bool mAltFreqChangeScheduled
Definition WsfOTH_RadarSensor.hpp:342
WsfSensor * Clone() const override
Definition WsfOTH_RadarSensor.cpp:91
bool Initialize(double aSimTime) override
Definition WsfOTH_RadarSensor.cpp:256
WsfOTH_RadarSensor & operator=(const WsfOTH_RadarSensor &)=delete
bool ProcessInput(UtInput &aInput) override
Definition WsfOTH_RadarSensor.cpp:297
WsfOTH_RadarSensor(WsfScenario &aScenario)
Definition WsfOTH_RadarSensor.cpp:59
void UpdateXmtrRcvrLists()
Definition WsfOTH_RadarSensor.cpp:230
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
WsfSensorBeam()
Definition WsfSensorBeam.cpp:20
WsfSensorMode()
Definition WsfSensorMode.cpp:47
Definition WsfSensorResult.hpp:27
Definition WsfSensor.hpp:133
bool ProcessInput(UtInput &aInput) override
Definition WsfSensor.cpp:380
void Update(double aSimTime) override
Definition WsfSensor.cpp:497
virtual WsfEM_Rcvr & GetEM_Rcvr(size_t aIndex) const
Definition WsfSensor.cpp:660
WsfSensor(const WsfScenario &aScenario)
Definition WsfSensor.cpp:52
virtual size_t GetEM_RcvrCount() const
Definition WsfSensor.cpp:646
WsfSensor * Clone() const override=0
virtual WsfEM_Xmtr & GetEM_Xmtr(size_t aIndex) const
Definition WsfSensor.cpp:714
bool Initialize(double aSimTime) override
Definition WsfSensor.cpp:255
virtual size_t GetEM_XmtrCount() const
Definition WsfSensor.cpp:700
virtual void PerformScheduledDetections(double aSimTime)
Definition WsfSensor.cpp:1415
virtual bool AttemptToDetect(double aSimTime, WsfPlatform *aTargetPtr, Settings &aSettings, WsfSensorResult &aResult)
Definition WsfSensor.cpp:224
void PlatformAdded(double aSimTime, WsfPlatform *aPlatformPtr) override
Definition WsfSensor.cpp:334
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Computation of probability of detection using the Marcum-Swerling algorithm.
Definition WsfMarcumSwerling.hpp:29
Copyrights Multiple, All Rights Reserved