12#ifndef WSFWEAPONFUSE_HPP
13#define WSFWEAPONFUSE_HPP
15#include "wsf_mil_export.h"
20#include "UtAtmosphere.hpp"
97 static std::unique_ptr<UtScriptClass>
CreateScriptClass(
const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
105 void Update(
double aSimTime)
override;
107 void Detonate(
double aSimTime);
108 void Arm(
double aSimTime);
125 void SetAirToGroundMode(
bool aValue);
126 void SetAGL_Criteria(AltCriteria aCriteria,
double aAltAGL);
127 void SetMSL_Criteria(AltCriteria aCriteria,
double aAltMSL);
129 void SetUseCurrentTarget(
bool aValue);
133 void SetFineUpdateInterval(
double aInterval);
148 void CheckForDetonation(
double aSimTime);
149 virtual void PrivateDetonate(
double aSimTime);
150 void PrintDetonationReason(
double aSimTime);
151 bool ProcessAltAGL(
double aSimTime);
152 bool ProcessAltMSL(
double aSimTime);
153 void ProcessMinSpeed(
double aSimTime);
154 bool ProcessProximity(
double aSimTime);
156 bool CheckAllTargets(
double aSimTime);
158 double ComputeGrossProximityRange(
const double aTgtVelWCS[3])
const;
160 double ComputeTimeToPCAorFuse(
const double aTgtLocWCS[3],
const double aTgtVelWCS[3])
const;
162 void SelectPCA_ForDetonation(
double aSimTime,
164 const double aTgtLocWCS[3],
165 const double aTgtVelWCS[3],
167 double aMissDistanceLimit);
169 void ShowPCA_Results(
double aSimTime,
171 const double aTgtLocWCS[3],
172 const double aTgtVelWCS[3],
173 double aTimeToPCA)
const;
175 bool UpdateTargetState(
double aSimTime);
176 void UpdateWeaponState(
double aSimTime);
178 void PermanentlyArrestMotion(
double aSimTime);
184 TargetLossOption mTargetLossOption;
185 AltCriteria mMSL_Criteria;
186 AltCriteria mAGL_Criteria;
187 SpeedCriteria mMinSpeedCriteria;
192 OnIntercept mOnIntercept;
194 double mGrossUpdateInterval;
195 double mFineUpdateInterval;
196 double mGrossProximityRange;
197 double mHitProximityRange;
198 double mFuseFunctionRange;
202 double mMinSpeedLimit;
220 double mPCA_HitMinTime;
221 double mPCA_HitMaxTime;
222 size_t mLauncherIndex;
224 double mLastUpdateTime;
225 double mTimeStartedMoving;
236 UtAtmosphere mAtmosphere;
237 double mThisWpnAltMSL;
238 double mLastWpnAltMSL;
239 double mThisWpnAltAGL;
240 double mThisWpnSpeed;
241 double mLastWpnSpeed;
242 double mThisWpnLocWCS[3];
243 double mLastWpnLocWCS[3];
244 double mThisWpnVelWCS[3];
245 double mLastAGL_Delta;
246 double mThisAGL_Delta;
247 double mLastMSL_Delta;
248 double mThisMSL_Delta;
249 double mCapturedMaxSpeed;
250 unsigned int mAGL_UpdateCount;
251 unsigned int mMSL_UpdateCount;
257 size_t mLastTgtIndex;
258 double mTgtLocWCS[3];
259 double mTgtVelWCS[3];
261 double mLastGoodTgtUpdateTime;
265 double mLastPCA_Time;
266 double mLastPCA_WpnLocWCS[3];
267 double mLastPCA_TgtLocWCS[3];
271 double mDetWpnLocWCS[3];
272 double mDetTgtLocWCS[3];
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Contains the 'categories' to which an object belongs.
Definition WsfCategoryList.hpp:34
Definition WsfProcessor.hpp:39
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
bool Initialize2(double aSimTime) override
Definition WsfScriptProcessor.cpp:142
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 WsfTrackId.hpp:33
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfWeaponFuse.hpp:54
AltCriteria GetMSL_Criteria() const
Definition WsfWeaponFuse.hpp:117
const char * GetScriptClassName() const override
Definition WsfWeaponFuse.hpp:99
double GetTimeOfFlightToArm() const
Definition WsfWeaponFuse.hpp:121
WsfWeaponFuse(WsfScenario &aScenario)
Constructor.
Definition WsfWeaponFuse.cpp:69
OnIntercept
Definition WsfWeaponFuse.hpp:87
@ cACTION_DETONATE
Default normal behavior, upon Intercept, detonate.
Definition WsfWeaponFuse.hpp:88
@ cACTION_HALT
Upon Intercept, halt/freeze motion.
Definition WsfWeaponFuse.hpp:89
static std::unique_ptr< UtScriptClass > CreateScriptClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfWeaponFuse.cpp:1680
double GetMaximumTimeOfFlight() const
Access the values used to determine detonation based on Time, Altitude, and Speed.
Definition WsfWeaponFuse.hpp:114
void SetGrossUpdateInterval(double aInterval)
Definition WsfWeaponFuse.hpp:132
AltCriteria
The AGL/MSL detonation criteria.
Definition WsfWeaponFuse.hpp:58
@ cNO_LIMIT
Definition WsfWeaponFuse.hpp:59
@ cDETONATE_BELOW
Definition WsfWeaponFuse.hpp:61
@ cDETONATE_ABOVE
Definition WsfWeaponFuse.hpp:60
WsfWeaponFuse & operator=(const WsfWeaponFuse &)=delete
TargetLossOption
Definition WsfWeaponFuse.hpp:141
@ cCANCEL_PROXIMITY_CHECKS
Quit considering proximity.
Definition WsfWeaponFuse.hpp:144
@ cCONSIDER_ALL_PROXIMITY
Revert to checking all existing platforms (CPU Intensive).
Definition WsfWeaponFuse.hpp:145
@ cCOAST
Coast for a specified period of time while waiting for the target to reappear.
Definition WsfWeaponFuse.hpp:143
@ cDETONATE
Detonate.
Definition WsfWeaponFuse.hpp:142
double GetMSL_Limit() const
Definition WsfWeaponFuse.hpp:120
SpeedCriteria
The Minimum Speed detonation criteria.
Definition WsfWeaponFuse.hpp:66
@ cSC_SPEED
Definition WsfWeaponFuse.hpp:68
@ cSC_MACH
Definition WsfWeaponFuse.hpp:69
@ cSC_NONE
Definition WsfWeaponFuse.hpp:67
@ cSC_MACH_DECAY
Definition WsfWeaponFuse.hpp:70
Reason GetReason() const
Access the reason why the fuse arrived at its current State.
Definition WsfWeaponFuse.hpp:111
void SetGrossProximityRange(double aRange)
Definition WsfWeaponFuse.hpp:130
double GetAGL_Limit() const
Definition WsfWeaponFuse.hpp:119
AltCriteria GetAGL_Criteria() const
Definition WsfWeaponFuse.hpp:118
double GetMinSpeedLimit() const
Definition WsfWeaponFuse.hpp:116
void SetTOFToArm(double aTOF)
Definition WsfWeaponFuse.hpp:134
SpeedCriteria GetSpeedCriteria() const
Definition WsfWeaponFuse.hpp:115
Reason
Reason for the final state of the fuse object.
Definition WsfWeaponFuse.hpp:75
@ cMIN_SPEED
Weapon speed fell below its minimum 'effective' value, initiating detonation.
Definition WsfWeaponFuse.hpp:80
@ cNO_REASON
Fuse has not attempted detonation yet.
Definition WsfWeaponFuse.hpp:76
@ cCOMMAND
Detonated by command.
Definition WsfWeaponFuse.hpp:83
@ cTOF_LIMIT
Maximum Time Of Flight (TOF) was exceeded, initiating detonation.
Definition WsfWeaponFuse.hpp:81
@ cCOAST_TIME_LIMIT
Coast time limit exceeded, initiating detonation.
Definition WsfWeaponFuse.hpp:82
@ cAGL_LIMIT
Crossing an Above Ground Level (AGL) limit initiated detonation.
Definition WsfWeaponFuse.hpp:78
@ cPROXIMITY
Proximity to a target initiated the detonation.
Definition WsfWeaponFuse.hpp:77
@ cMSL_LIMIT
Crossing a Mean Sea Level (MSL) limit initiated detonation.
Definition WsfWeaponFuse.hpp:79
void SetHitProximityRange(double aRange)
Definition WsfWeaponFuse.hpp:131
Definition WsfTerrain.hpp:336
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32