12#ifndef WSFLASERWEAPON_HPP
13#define WSFLASERWEAPON_HPP
15#include "wsf_mil_export.h"
59 void Update(
double aSimTime)
override;
61 void TurnOff(
double aSimTime)
override;
75 FireResult
Fire(
double aSimTime,
const FireTarget& aTarget,
const FireOptions& aSettings)
override;
83 bool CanLase(
double aSimTime);
105 void SetFiringTime(
double aFiringTime);
106 double GetCoolingTime()
const;
107 double GetCoolingTimeRemaining()
const;
109 double GetFiringTime()
const;
111 double GetTotalFiringTimeRemaining(
double aSimTime)
const;
113 double GetFiringTimeRemaining()
const;
119 virtual bool BeginShot(
double aSimTime);
121 virtual bool UpdateShot(
double aSimTime);
123 virtual bool EndShot(
double aSimTime);
126 virtual void EvaluateCooling(
double aSimTime);
136 friend class LaserEvent;
150 LaserEvent(
double aSimTime,
size_t aParentPlatformIndex,
WsfLaserWeapon* aWsfLaserWeaponPtr,
int aShotId)
152 , mWsfLaserWeaponPtr(aWsfLaserWeaponPtr)
153 , mParentPlatformIndex(aParentPlatformIndex)
155 , mShotId(aWsfLaserWeaponPtr->mShotId)
156 , mLastEvaluationTime(0.0)
159 ~LaserEvent()
override =
default;
161 EventDisposition Execute()
override;
164 WsfLaserWeapon* mWsfLaserWeaponPtr;
165 size_t mParentPlatformIndex;
168 double mLastEvaluationTime;
173 WsfThermalSystem* mThermalSystemPtr;
176 double mTotalFiringTime;
177 double mLastFiringStartTime;
178 double mLastFiringEndTime;
179 double mFiringUpdateInterval;
182 double mCoolingUpdateInterval;
183 double mPostCoolingCapacity;
185 double mLowTempLimit;
186 double mHighTempLimit;
187 double mPowerDissipation;
190 int mCurrentShotNumber;
193 double mLastCoolingStartTime;
194 double mLastUpdateTime;
197 bool mAtThermalLimit;
198 bool mCommentsEnabled;
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
WsfDirectedEnergyWeapon(const WsfScenario &aScenario)
Definition WsfDirectedEnergyWeapon.cpp:26
void CeaseFire(double aSimTime) override
Definition WsfDirectedEnergyWeapon.cpp:319
WsfWeapon * Clone() const override
Definition WsfDirectedEnergyWeapon.hpp:33
virtual bool IsFiring() const
Return whether the weapon is firing for the last updated time.
Definition WsfDirectedEnergyWeapon.cpp:285
FireResult Fire(double aSimTime, const FireTarget &aTarget, const FireOptions &aSettings) override
Definition WsfDirectedEnergyWeapon.cpp:263
Definition WsfEvent.hpp:29
This implementation is decoupled from the weapon class to handle only laser-related effects,...
Definition WsfHighEnergyLaser.hpp:33
const char * GetScriptClassName() const override
Definition WsfImplicitWeapon.cpp:515
void Update(double aSimTime) override
Definition WsfImplicitWeapon.cpp:420
bool Initialize(double aSimTime) override
Definition WsfImplicitWeapon.cpp:62
Definition WsfLaserWeapon.hpp:34
double GetEnergy() const
Return the total energy (i.e., the average irradiance on target integrated over time and area).
Definition WsfLaserWeapon.hpp:96
WsfHighEnergyLaser * GetHEL() const
Return the HEL object associated with energy propagation.
Definition WsfLaserWeapon.hpp:68
State
Definition WsfLaserWeapon.hpp:37
@ cREADY_TO_FIRE
Definition WsfLaserWeapon.hpp:39
@ cFIRING
Definition WsfLaserWeapon.hpp:40
@ cNOT_READY_TO_FIRE
Definition WsfLaserWeapon.hpp:41
@ cSTATE_INVALID
Definition WsfLaserWeapon.hpp:38
@ cPAUSED
The weapon is out of constraints and can't fire.
Definition WsfLaserWeapon.hpp:42
WsfLaserWeapon(WsfScenario &aScenario)
Definition WsfLaserWeapon.cpp:42
double GetEnergyDensity() const
Return the average integrated energy density for the current engagement.
Definition WsfLaserWeapon.hpp:103
WsfHighEnergyLaser * mHEL_Ptr
Definition WsfLaserWeapon.hpp:130
WsfLaserWeapon & operator=(const WsfLaserWeapon &)=delete
int GetState() const
Return the current state of the laser.
Definition WsfLaserWeapon.hpp:86
int mState
Definition WsfLaserWeapon.hpp:133
double GetTotalFiringTime() const
Definition WsfLaserWeapon.hpp:100
double GetPeakFluence() const
Return the peak fluence (i.e., the peak irradiance on target integrated over time).
Definition WsfLaserWeapon.hpp:89
double GetEdgeFluence() const
Definition WsfLaserWeapon.hpp:93
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfWeaponEngagement.hpp:43
bool PreInitialize(double aSimTime) override
Definition WsfWeapon.cpp:171
bool ProcessInput(UtInput &aInput) override
Definition WsfWeapon.cpp:276
WsfWeapon(const WsfScenario &aScenario)
Definition WsfWeapon.cpp:48
bool Initialize2(double aSimTime) override
Definition WsfWeapon.cpp:256
virtual size_t GetTargetIndex(int aId) const
Definition WsfWeapon.hpp:464
virtual double GetQuantityRemaining() const
Definition WsfWeapon.cpp:1014
void TurnOff(double aSimTime) override
Definition WsfWeapon.cpp:446