15#ifndef WSFSAR_SENSOR_HPP
16#define WSFSAR_SENSOR_HPP
18#include "wsf_mil_export.h"
23#include "UtCloneablePtr.hpp"
24#include "UtMatrix.hpp"
60 void TurnOff(
double aSimTime)
override;
61 void TurnOn(
double aSimTime)
override;
62 void Update(
double aSimTime)
override;
71 static std::unique_ptr<UtScriptClass> CreateScriptClass(
const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
84 bool CanImageNow(
double aSimTime,
88 double& aDopplerMargin,
89 int& aFailureReasons);
91 double GetDwellTime()
const;
92 void SetDwellTime(
double aDwellTime);
94 double GetResolution()
const;
95 void SetResolution(
double aResolution);
192 void Deselect(
double aSimTime)
override;
193 void Select(
double aSimTime)
override;
220 void ComputeRangeDopplerErrors(
double aSimTime,
223 double& aDopplerError)
const;
226 bool mComputeRangeDopplerErrors{
false};
228 double mSAR_Errors[15];
231 bool mSAR_ErrorsSet[15];
233 mutable UtMatrixd mErrorsSqrd;
234 mutable UtMatrixd mCovarianceMatrix;
235 mutable ut::CloneablePtr<WsfPlatform> mTempPlatformPtr{
nullptr};
241 double ComputeCNR(
const Geometry& aGeometry,
double aPRF,
double aDwellTime,
double aResolution);
243 double ComputeDwellTime(
const Geometry& aGeometry,
double aResolution);
248 double ComputePRF(
const Geometry& aGeometry);
250 double ComputeAzimuthResolution(
const Geometry& aGeometry,
double aDwellTime);
252 double ComputeGroundRangeResolution(
const Geometry& aGeometry);
254 bool ComputeImageCenter(
double aLocationWCS_1[3],
double aLocationWCS_2[3],
bool aFirstPass =
false);
256 void ComputeFOV(
const Geometry& aGeometry);
258 double ComputeSlantRange(
double aAltitude,
double aDepressionAngle,
double& aGrazingAngle);
260 double ComputeSquintAngle(WsfPlatform* aTargetPtr,
double& aSlantRange);
262 void ComputeUpdateInterval(
double aSimTime);
264 void PredictPerformance(
const Geometry& aGeometry,
267 double& aAzimuthResolution,
269 double& aMinimumPRF);
271 bool WithinUnambiguousRange(WsfSensorResult& aResult);
365 void BuildAndSendImage(
double aSimTime,
SAR_Mode& aMode);
367 void ClearSensingChances();
371 void ProcessModeChange(
double aSimTime,
size_t aOldModeIndex,
size_t aNewModeIndex);
375 void SpotModeEnd(
double aSimTime,
SAR_Mode& aMode);
377 void SpotModeUpdate(
double aSimTime,
Settings& aSettings);
381 void StripModeEnd(
double aSimTime,
SAR_Mode& aMode);
383 void StripModeUpdate(
double aSimTime,
Settings& aSettings);
388 std::vector<SAR_Mode*> mSAR_ModeList;
391 using Chances = std::vector<std::unique_ptr<SAR_Chance>>;
396 unsigned int mStreamNumber;
401 unsigned int mFrameNumber;
404 double mBackscatterCoefficient;
407 double mIntensityMin;
410 double mIntensityMax;
413 double mIntensityRange;
416 double mLastUpdateTime;
419 double mModeStartTime;
422 size_t mLastModeIndex;
425 unsigned int mTurnOffEventNumber;
429 bool mRescaleSubstandardImage;
433 bool mAutomaticTurnOff;
436 bool mSAR_ConstraintPlotting;
442 bool mCallSensorTrackObservers;
451 double mAchievedAzimuthResolution;
454 double mAchievedGroundRangeResolution;
Definition WsfEM_Antenna.hpp:49
Definition WsfEM_Rcvr.hpp:68
Definition WsfEM_Xmtr.hpp:55
Definition WsfMode.hpp:32
A detection opportunity for a specific platform.
Definition WsfSAR_Sensor.hpp:151
double mSignalSum
Definition WsfSAR_Sensor.hpp:157
size_t mTargetIndex
Definition WsfSAR_Sensor.hpp:162
SAR_Chance(WsfPlatform *aTargetPtr)
Definition WsfSAR_Sensor.cpp:1339
double mComputedDopplerError
Definition WsfSAR_Sensor.hpp:161
WsfTrack * mTrackPtr
Definition WsfSAR_Sensor.hpp:156
double mComputedRangeError
Definition WsfSAR_Sensor.hpp:160
bool mNowDetecting
Definition WsfSAR_Sensor.hpp:164
unsigned int mNumberOfDetections
Definition WsfSAR_Sensor.hpp:163
double mAreaSum
Definition WsfSAR_Sensor.hpp:158
double mLocationWCS[3]
Definition WsfSAR_Sensor.hpp:159
Definition WsfSAR_Sensor.hpp:202
~SAR_ErrorModel() override=default
bool ProcessInput(UtInput &aInput) override
Definition WsfSAR_Sensor.cpp:3032
SAR_ErrorModel()
Definition WsfSAR_Sensor.cpp:3010
const UtMatrixd * GetErrorCovarianceMatrix() const
Definition WsfSAR_Sensor.hpp:215
SAR_ErrorModel * Clone() const override
Create a clone of "this" object.
Definition WsfSAR_Sensor.hpp:210
bool Initialize(WsfSensorMode *aSensorModePtr) override
Definition WsfSAR_Sensor.cpp:3175
The 'mode' of the sensor.
Definition WsfSAR_Sensor.hpp:169
std::unique_ptr< WsfEM_Antenna > mAntennaPtr
The Antenna for the Mode.
Definition WsfSAR_Sensor.hpp:285
OperatingMode mOperatingMode
The operating mode (spot, strip, etc.).
Definition WsfSAR_Sensor.hpp:282
double mResolution
Desired azimuth resolution.
Definition WsfSAR_Sensor.hpp:300
~SAR_Mode() override=default
std::unique_ptr< WsfEM_Xmtr > mXmtrPtr
The transmitter for a Mode.
Definition WsfSAR_Sensor.hpp:288
double mDwellTime
Desired or computed dwell/integration time.
Definition WsfSAR_Sensor.hpp:303
WsfSAR_Sensor * mSAR_SensorPtr
The pointer to the derived sensor class.
Definition WsfSAR_Sensor.hpp:276
double mKd
Doppler fold-over margin factor (also called the over-collect ratio).
Definition WsfSAR_Sensor.hpp:297
bool mComputePRF
Compute the pulse repetition frequency.
Definition WsfSAR_Sensor.hpp:341
bool mComputeDwellTime
For spot requests, compute dwell time necessary to achieve the required image resolution.
Definition WsfSAR_Sensor.hpp:338
OperatingMode
Definition WsfSAR_Sensor.hpp:172
@ cOM_SPOT
Definition WsfSAR_Sensor.hpp:173
@ cOM_STRIP
Definition WsfSAR_Sensor.hpp:174
std::unique_ptr< WsfEM_Rcvr > mRcvrPtr
The receiver for a Mode.
Definition WsfSAR_Sensor.hpp:291
SAR_Mode()
Definition WsfSAR_Sensor.cpp:1363
double mMinimumCNR
Minimum allowable clutter-to-noise limit.
Definition WsfSAR_Sensor.hpp:309
double mIntegrationGain
Integration gain for non-Swerling detector.
Definition WsfSAR_Sensor.hpp:328
WsfEM_Rcvr * GetEM_Rcvr() override
Definition WsfSAR_Sensor.hpp:187
double mAdjustmentFactor
A term to represent a general adjustment (multiplier) to the radar range equation.
Definition WsfSAR_Sensor.hpp:331
double mCurrentAzimuthResolution
The current azimuth resolution.
Definition WsfSAR_Sensor.hpp:315
SAR_ErrorModel * mSAR_ErrorModelPtr
The pointer to the derived error model class.
Definition WsfSAR_Sensor.hpp:279
double mKa
Doppler filter broadening factor.
Definition WsfSAR_Sensor.hpp:294
bool mAutomaticTurnOff
Definition WsfSAR_Sensor.hpp:348
double mCurrentGroundRangeResolution
The current ground range resolution.
Definition WsfSAR_Sensor.hpp:318
double mMaximumDwellTime
Maximum dwell/integration.
Definition WsfSAR_Sensor.hpp:306
double mImageWidth
Definition WsfSAR_Sensor.hpp:355
double mMaxDetectableSpeed
The speed above which an object cannot be seen.
Definition WsfSAR_Sensor.hpp:312
double mAngularResolution
The angular resolution of a pixel (radians).
Definition WsfSAR_Sensor.hpp:325
double mOneM2DetectRange
If non-zero, this represents the 1 m^2 detection range.
Definition WsfSAR_Sensor.hpp:334
SAR_Mode & operator=(const SAR_Mode &)=delete
double mImageCenterWCS[3]
The approximate image center.
Definition WsfSAR_Sensor.hpp:358
WsfEM_Xmtr * GetEM_Xmtr() override
Definition WsfSAR_Sensor.hpp:188
size_t GetBeamCount() const override
Definition WsfSAR_Sensor.hpp:183
double mImageHeight
Image height and width in meters; used for spot SAR.
Definition WsfSAR_Sensor.hpp:354
bool mInhibitSubstandardCollection
Inhibit collection if the computed dwell time is greater than the maximum allowable.
Definition WsfSAR_Sensor.hpp:351
void SetIntegrationGain(double aIntegrationGain) override
Definition WsfSAR_Sensor.hpp:273
WsfSensorBeam * GetBeamEntry(size_t) override
Definition WsfSAR_Sensor.hpp:184
bool Initialize(double aSimTime) override
Definition WsfSAR_Sensor.cpp:317
double GetAchievedResolution() const
Definition WsfSAR_Sensor.hpp:104
WsfSAR_Sensor(WsfScenario &aScenario)
Definition WsfSAR_Sensor.cpp:114
const char * GetScriptClassName() const override
Definition WsfSAR_Sensor.hpp:69
WsfSensor * Clone() const override
Definition WsfSAR_Sensor.cpp:211
unsigned int GetTurnOffEventNumber() const
Definition WsfSAR_Sensor.hpp:108
bool AttemptToDetect(double aSimTime, WsfPlatform *aTargetPtr, Settings &aSettings, WsfSensorResult &aResult) override
Definition WsfSAR_Sensor.cpp:184
FailureReasons
Definition WsfSAR_Sensor.hpp:74
@ cFR_DOPPLER_FOLDOVER
The Doppler frequency returns would be ambiguous.
Definition WsfSAR_Sensor.hpp:79
@ cFR_INSUFFICIENT_CLUTTER_TO_NOISE
Clutter-to-Noise ratio is too low.
Definition WsfSAR_Sensor.hpp:80
@ cFR_INSUFFICIENT_RESOLUTION
The desired resolution cannot be achieved.
Definition WsfSAR_Sensor.hpp:81
@ cFR_BEYOND_HORIZON
The area is beyond the radar horizon.
Definition WsfSAR_Sensor.hpp:76
@ cFR_DWELL_TIME_LIMIT_EXCEEDED
The dwell time limit was exceeded.
Definition WsfSAR_Sensor.hpp:77
@ cFR_AMBIGUOUS_RANGE
The range would be ambiguous.
Definition WsfSAR_Sensor.hpp:78
@ cFR_FIELD_OF_VIEW_EXCEEDED
The area is outside the field of view.
Definition WsfSAR_Sensor.hpp:75
double GetBackscatterCoefficient() const
Definition WsfSAR_Sensor.hpp:110
double GetAchievedCNR() const
Definition WsfSAR_Sensor.hpp:99
bool ProcessInput(UtInput &aInput) override
Definition WsfSAR_Sensor.cpp:366
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
UT_DECLARE_SCRIPT_METHOD(GetDwellTime_2)
UT_DECLARE_SCRIPT_METHOD(SetResolution_2)
WsfScriptSAR_SensorClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfSAR_Sensor.cpp:2845
UT_DECLARE_SCRIPT_METHOD(SetDwellTime_2)
UT_DECLARE_SCRIPT_METHOD(GetResolution_1)
UT_DECLARE_SCRIPT_METHOD(GetDwellTime_1)
UT_DECLARE_SCRIPT_METHOD(GetResolution_2)
UT_DECLARE_SCRIPT_METHOD(SetDwellTime_1)
UT_DECLARE_SCRIPT_METHOD(SetResolution_1)
WsfScriptSensorClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfScriptSensorClass.cpp:133
WsfSensorBeam()
Definition WsfSensorBeam.cpp:20
friend class WsfSensorMode
Definition WsfSensorBeam.hpp:60
virtual void ApplyMeasurementErrors(WsfSensorResult &aResult)
Definition WsfSensorMode.cpp:590
virtual WSF_DEPRECATED void ComputeMeasurementErrors(WsfSensorResult &aResult, double &aAzError, double &aElError, double &aRangeError, double &aRangeRateError) final
Definition WsfSensorMode.cpp:608
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
void PlatformDeleted(WsfPlatform *aPlatformPtr) override
Definition WsfSensor.cpp:355
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
WsfSensor & operator=(const WsfSensor &aSrc)=delete
void TurnOff(double aSimTime) override
Definition WsfSensor.cpp:523
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
void TurnOn(double aSimTime) override
Definition WsfSensor.cpp:563
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfStandardSensorErrorModel.hpp:47
void ComputeGeometry(WsfEM_XmtrRcvr *aXmtrRcvrPtr, WsfPlatform *aTargetPtr, WsfEM_Xmtr *aXmtrPtr, double &rdr_height_msl, double &rdr_lat, double &rdr_lon, double &rkfact, double &tgt_height_msl, double &tgt_lat, double &tgt_lon, double &ground_range, double &tanept, double &slant_range, double &tgt_az, double &tgt_el, double &tgt_x, double &tgt_z)
Definition WsfEM_ALARM_Geometry.cpp:31
Data container to contain geometry data.
Definition WsfSAR_Sensor.hpp:120
double mSlantRange
The range from the sensing platform to the center-of-interest.
Definition WsfSAR_Sensor.hpp:128
double mGroundSpeed
The ground speed of the sensing platform.
Definition WsfSAR_Sensor.hpp:122
double mDepressionAngle
The depression angle.
Definition WsfSAR_Sensor.hpp:131
double mScanAngle
Definition WsfSAR_Sensor.hpp:146
double mAltitude
The altitude of the sensor.
Definition WsfSAR_Sensor.hpp:125
double mSquintAngle
Definition WsfSAR_Sensor.hpp:135
double mGrazingAngle
The angle between the line of sight vector and the tangent plane at the center-of-interest.
Definition WsfSAR_Sensor.hpp:142
double mTotalAngle
Definition WsfSAR_Sensor.hpp:139
A standard set of errors associated with single sensor mono-static detections.
Definition WsfStandardSensorErrorModel.hpp:26