WSF
WsfHighEnergyLaser Class Referenceabstract

This implementation is decoupled from the weapon class to handle only laser-related effects, including propagation and engagement. More...

#include <WsfHighEnergyLaser.hpp>

Inheritance diagram for WsfHighEnergyLaser:
Collaboration diagram for WsfHighEnergyLaser:

Public Member Functions

 WsfHighEnergyLaser (WsfScenario &aScenario)
 WsfHighEnergyLaser (const WsfHighEnergyLaser &aSrc)
WsfHighEnergyLaseroperator= (const WsfHighEnergyLaser &)=delete
 ~WsfHighEnergyLaser () override=default
WsfDirectedEnergyWeapon::BeamClone () const override=0
 Clone this object.
bool ProcessInput (UtInput &aInput) override
virtual bool Initialize (WsfDirectedEnergyWeapon *aWeaponPtr)
virtual void OutputConfiguration () const
WsfDirectedEnergyWeaponGetWeapon () const
virtual void BeginLasing (double aSimTime, size_t aTargetIndex, const std::string &aTargetOffsetName="")
void UpdateLasing (double aSimTime)
virtual void EndLasing (double aSimTime)
bool IsLasing () const
 Return whether the weapon is currently lasing.
double GetIncidenceAngle () const override
 Return the incidence angle of the laser on the target.
virtual bool TargetOccluded () const
virtual bool TestLasing (double aDuration, size_t aTargetIndex, const std::string &aTargetOffset="")
virtual bool TestLasing (double aDuration, const WsfGeoPoint &aSourceLocation, const WsfGeoPoint &aTargetLocation)
virtual double RequiredDurationEnergy (double aEnergy, const WsfGeoPoint &aSourceLocation, const WsfGeoPoint &aTargetLocation)
virtual double RequiredDurationFluence (double aEnergyDensity, const WsfGeoPoint &aSourceLocation, const WsfGeoPoint &aTargetLocation)
virtual double RequiredDurationEnergy (double aEnergy, int aTargetIndex, const std::string &aTargetOffset="")
virtual double RequiredDurationFluence (double aEnergyDensity, size_t aTargetIndex, const std::string &aTargetOffset="")
virtual bool UpdateEngagementGeometry (double aSimTime, size_t aTargetIndex, const std::string &aTargetOffset="", bool aAddJitter=true)
double GetDamageRadius () const
double GetDefaultDamageRadius () const
virtual void SetDamageRadius (double aDamageRadius)
virtual void SetAtmosphericStructure (const std::string &aAtmosphericStructure)
double GetJitter () const
 Get the expected value for the jitter of the HEL on target.
void SetJitter (double aJitter)
 Set the expected value for the jitter of the HEL on target.
size_t GetTargetIndex () const
 Get the current target index (valid only while IsLasing is true).
double GetTargetRange () const
 Get the current range to target (only valid while IsLasing is true).
void SetBeamQuality (double aBeamQuality)
 Set the beam quality wrt a perfect Gaussian beam.
virtual double GetWindowStrehl () const
 Get the strehl due to window effects (default is 1.0 [no effect]).
virtual void SetWindowStrehl (double aWindowStrehl)
 Set the window strehl (should be between 0 and 1).
virtual double GetAeroStrehl () const
 Get the aero strehl (strehl from aerooptics; should be between 0 and 1).
virtual void SetAeroStrehl (double aAeroStrehl)
 Set the areo strehl (strehl from aerooptics; should be between 0 and 1).
virtual double GetSystemStrehl () const
 Get the total rms strehl from all sources.
virtual void SetSystemStrehl (double aSystemStrehl)
 Set the total rms system strehl.
virtual double GetSystemTransmission () const
 Get the system transmission, if available (default is 1.0).
WsfSimulationGetSimulation () const
Public Member Functions inherited from WsfDirectedEnergyWeapon::Beam
 Beam ()
 Beam (const Beam &aSrc)
Beamoperator= (const Beam &)=delete
 ~Beam () override=default
void Initialize ()
 Initialize the beam structure elements to initial values.
double GetPeakFluence () const
 Return the peak fluence (i.e., the peak irradiance on target integrated over time).
void SetPeakFluence (double aPeakFluence)
 Set the peak fluence, in W/m^2.
double GetEdgeFluence () const
void SetEdgeFluence (double aEdgeFluence)
 Set the edge fluence, in W/m^2.
double GetEdgeRadius () const
 Return the edge radius (i.e., the radius at which the edge fluence is calculated).
void SetEdgeRadius (double aEdgeRadius)
 Set the edge radius (i.e., the radius at which the edge fluence is calculated).
double GetSemiMinorAxis () const
 Same as GetEdgeRadius, above.
void SetSpotRadius (double aRadius)
 Set the spot radius, which for an elliptical spot is the same as the semi-minor axis.
double GetSpotRadius () const
 Return the spot radius, which for an elliptical spot is the same as the semi-minor axis.
double GetSemiMajorAxis () const
virtual void SetIncidenceAngle (double aIncidenceAngle)
 Set the incidence angle of the beam on target, with respect to the normal to the target's surface at the spot center.
virtual double GetWavelength () const
 Return the characteristic wavelength of the beam.
unsigned GetWavelength_nm () const
 Return the characteristic wavelength of the beam as a string in nm.
virtual void SetWavelength (double aWavelength)
 Set the characteristic wavelength.
virtual double GetApertureDiameter () const
 Return the diameter of the exit aperture of the beam producing the spot.
virtual void SetApertureDiameter (double aApertureDiameter)
 Set the diameter of the aperture through which the beam exits (m^2).
virtual double GetInitialPower () const
 Return the initial power of the beam before any losses.
virtual void SetInitialPower (double aInitialPower)
 Set initial power of the beam before any losses.
double GetPeakIrradiance () const
 Return the average irradiance.
void SetPeakIrradiance (double aPeakIrradiance)
 Set the peak irradiance (W/m^2).
double GetAverageIrradiance () const
 Return the average irradiance over the beam spot (W/m2).
void SetAverageIrradiance (double aAverageIrradiance)
 Set the average irradiance over the beam spot.
double GetEdgeIrradiance () const
 Return the average irradiance over the beam spot (W/m2).
void SetEdgeIrradiance (double aEdgeIrradiance)
 Set the average irradiance over the beam spot.
virtual double GetPulseRepetitionFrequency () const
 Return the Pulse Repetition Frequency.
virtual void SetPulseRepetitionFrequency (double aPRF)
 Set the pulse repetition frequency.
virtual double GetPulseWidth () const
 Return the Pulse Width.
virtual void SetPulseWidth (double aPulseWidth)
 Set the pulse width (0 == CW).
virtual double GetEnergyDensity () const
double GetEnergy () const
 Return the total energy (i.e., the average irradiance on target integrated over time and area; J).
void SetEnergy (double aEnergy)
 Set the energy deposited during the engagement in the beam spot (J).
double GetAveragePower () const
 Return the average power on target, integrated over the beam spot.
void SetAveragePower (double aAveragePower)
 Set the average power on target, integrated over the beam spot.
void GetOffsetLocationECS (double aLocationECS[3]) const
 Get the beam's offset location in target entity coordinates.
void SetOffsetLocationECS (const double aLocationECS[3])
 Set the beam's offset location in target entity coordinates.
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Protected Member Functions

void Propagate (double aSimTime) override=0
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Protected Attributes

WsfDirectedEnergyWeaponmWeaponPtr
bool mSysInit
 The weapon object associated with the HEL.
bool mCalculateIncidence
double mIncidenceAngle
size_t mTargetIndex
WsfStringId mTargetOffsetName
bool mTargetOccluded
double mTargetRange
bool mIsLasing
bool mDebug
double mLastUpdateTime
double mDamageRadius
double mDefaultDamageRadius
double mJitterExpectedValue
double mBeamQuality
wsf::AtmosphericTurbulence mTurbulenceModel

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Detailed Description

This implementation is decoupled from the weapon class to handle only laser-related effects, including propagation and engagement.

Constructor & Destructor Documentation

◆ WsfHighEnergyLaser() [1/2]

◆ WsfHighEnergyLaser() [2/2]

◆ ~WsfHighEnergyLaser()

WsfHighEnergyLaser::~WsfHighEnergyLaser ( )
overridedefault

Member Function Documentation

◆ BeginLasing()

void WsfHighEnergyLaser::BeginLasing ( double aSimTime,
size_t aTargetIndex,
const std::string & aTargetOffsetName = "" )
virtual

◆ Clone()

WsfDirectedEnergyWeapon::Beam * WsfHighEnergyLaser::Clone ( ) const
overridepure virtual

Clone this object.

Reimplemented from WsfDirectedEnergyWeapon::Beam.

Implemented in WsfDefaultHEL.

Referenced by WsfHighEnergyLaserTypes::Create().

◆ EndLasing()

void WsfHighEnergyLaser::EndLasing ( double aSimTime)
virtual

References mIsLasing, and mTargetIndex.

◆ GetAeroStrehl()

virtual double WsfHighEnergyLaser::GetAeroStrehl ( ) const
inlinevirtual

Get the aero strehl (strehl from aerooptics; should be between 0 and 1).

◆ GetDamageRadius()

double WsfHighEnergyLaser::GetDamageRadius ( ) const
inline

Get the max. radius about which the laser is effective.

Note
If the value is zero, the damage radius is ignored, and the spot edge is used instead.

References mDamageRadius.

◆ GetDefaultDamageRadius()

double WsfHighEnergyLaser::GetDefaultDamageRadius ( ) const
inline

Get the max. radius about which the laser is effective (default value).

Note
If the value is zero, the damage radius is ignored, and the spot edge is used instead.
This accessor is meant to support legacy operation, where only one damage radius is specified.

References mDefaultDamageRadius.

◆ GetIncidenceAngle()

double WsfHighEnergyLaser::GetIncidenceAngle ( ) const
inlineoverridevirtual

Return the incidence angle of the laser on the target.

Reimplemented from WsfDirectedEnergyWeapon::Beam.

References mIncidenceAngle.

◆ GetJitter()

double WsfHighEnergyLaser::GetJitter ( ) const
inline

Get the expected value for the jitter of the HEL on target.

References mJitterExpectedValue.

◆ GetSimulation()

WsfSimulation * WsfHighEnergyLaser::GetSimulation ( ) const

◆ GetSystemStrehl()

virtual double WsfHighEnergyLaser::GetSystemStrehl ( ) const
inlinevirtual

Get the total rms strehl from all sources.

◆ GetSystemTransmission()

virtual double WsfHighEnergyLaser::GetSystemTransmission ( ) const
inlinevirtual

Get the system transmission, if available (default is 1.0).

◆ GetTargetIndex()

size_t WsfHighEnergyLaser::GetTargetIndex ( ) const
inline

Get the current target index (valid only while IsLasing is true).

References mTargetIndex.

◆ GetTargetRange()

double WsfHighEnergyLaser::GetTargetRange ( ) const
inline

Get the current range to target (only valid while IsLasing is true).

References mTargetRange.

Referenced by WsfDefaultHEL::Propagate().

◆ GetWeapon()

WsfDirectedEnergyWeapon * WsfHighEnergyLaser::GetWeapon ( ) const
inline

◆ GetWindowStrehl()

virtual double WsfHighEnergyLaser::GetWindowStrehl ( ) const
inlinevirtual

Get the strehl due to window effects (default is 1.0 [no effect]).

◆ Initialize()

bool WsfHighEnergyLaser::Initialize ( WsfDirectedEnergyWeapon * aWeaponPtr)
virtual

◆ IsLasing()

bool WsfHighEnergyLaser::IsLasing ( ) const
inline

Return whether the weapon is currently lasing.

References mIsLasing.

◆ operator=()

WsfHighEnergyLaser & WsfHighEnergyLaser::operator= ( const WsfHighEnergyLaser & )
delete

References WsfHighEnergyLaser().

◆ OutputConfiguration()

virtual void WsfHighEnergyLaser::OutputConfiguration ( ) const
inlinevirtual

◆ ProcessInput()

bool WsfHighEnergyLaser::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from WsfDirectedEnergyWeapon::Beam.

References mCalculateIncidence, mDefaultDamageRadius, mTurbulenceModel, WsfDirectedEnergyWeapon::Beam::SetApertureDiameter(), SetBeamQuality(), WsfDirectedEnergyWeapon::Beam::SetInitialPower(), SetJitter(), and WsfDirectedEnergyWeapon::Beam::SetWavelength().

Referenced by WsfDefaultHEL::ProcessInput().

◆ Propagate()

void WsfHighEnergyLaser::Propagate ( double )
overrideprotectedpure virtual

Propagate the beam to the target.

Note
This method's signature may be changed in the future.

Reimplemented from WsfDirectedEnergyWeapon::Beam.

Implemented in WsfDefaultHEL.

Referenced by UpdateLasing().

◆ RequiredDurationEnergy() [1/2]

virtual double WsfHighEnergyLaser::RequiredDurationEnergy ( double aEnergy,
const WsfGeoPoint & aSourceLocation,
const WsfGeoPoint & aTargetLocation )
inlinevirtual

Determine from the given geometry and desired total energy the required duration.

Parameters
aEnergyThe total energy on target.
aSourceLocationThe laser's location.
aTargetLocationThe perceived target location.
Returns
The required duration for lasing, or 0.0 if unsuccessful.

◆ RequiredDurationEnergy() [2/2]

virtual double WsfHighEnergyLaser::RequiredDurationEnergy ( double aEnergy,
int aTargetIndex,
const std::string & aTargetOffset = "" )
inlinevirtual

Determine from the given geometry and desired total energy the required duration.

Parameters
aEnergyThe total energy on target.
aTargetIndexA target index against which to laser.
aTargetOffsetThe intended target offset to
Returns
The required duration for lasing, or 0.0 if unsuccessful.

◆ RequiredDurationFluence() [1/2]

virtual double WsfHighEnergyLaser::RequiredDurationFluence ( double aEnergyDensity,
const WsfGeoPoint & aSourceLocation,
const WsfGeoPoint & aTargetLocation )
inlinevirtual

Determine from the given geometry and desired energy density the required duration.

Parameters
aEnergyDensityThe energy density on target.
aSourceLocationThe laser's location.
aTargetLocationThe perceived target location.
Returns
The required duration for lasing, or 0.0 if unsuccessful.

◆ RequiredDurationFluence() [2/2]

virtual double WsfHighEnergyLaser::RequiredDurationFluence ( double aEnergyDensity,
size_t aTargetIndex,
const std::string & aTargetOffset = "" )
inlinevirtual

Determine from the given geometry and desired energy density the required duration.

Parameters
aEnergyDensityThe energy density on target.
aTargetIndexA target index against which to laser.
aTargetOffsetThe intended target offset to
Returns
The required duration for lasing, or 0.0 if unsuccessful.

◆ SetAeroStrehl()

virtual void WsfHighEnergyLaser::SetAeroStrehl ( double aAeroStrehl)
inlinevirtual

Set the areo strehl (strehl from aerooptics; should be between 0 and 1).

◆ SetAtmosphericStructure()

virtual void WsfHighEnergyLaser::SetAtmosphericStructure ( const std::string & aAtmosphericStructure)
inlinevirtual

References mTurbulenceModel.

◆ SetBeamQuality()

void WsfHighEnergyLaser::SetBeamQuality ( double aBeamQuality)
inline

Set the beam quality wrt a perfect Gaussian beam.

References mBeamQuality.

Referenced by ProcessInput().

◆ SetDamageRadius()

virtual void WsfHighEnergyLaser::SetDamageRadius ( double aDamageRadius)
inlinevirtual

Set the max. radius about which the laser is effective.

Note
This value is usually set in the framework based on values defined in WsfHEL_Lethality.

References mDamageRadius.

◆ SetJitter()

void WsfHighEnergyLaser::SetJitter ( double aJitter)
inline

Set the expected value for the jitter of the HEL on target.

References mJitterExpectedValue.

Referenced by ProcessInput().

◆ SetSystemStrehl()

virtual void WsfHighEnergyLaser::SetSystemStrehl ( double aSystemStrehl)
inlinevirtual

Set the total rms system strehl.

◆ SetWindowStrehl()

virtual void WsfHighEnergyLaser::SetWindowStrehl ( double aWindowStrehl)
inlinevirtual

Set the window strehl (should be between 0 and 1).

◆ TargetOccluded()

virtual bool WsfHighEnergyLaser::TargetOccluded ( ) const
inlinevirtual

Return whether the HEL-target interaction results in a target occlusion.

Note
For this result to be valid, either there must be an active engagement (you've called Fire(...), or you first call UpdateTargetGeometry(...).

References mTargetOccluded.

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ TestLasing() [1/2]

virtual bool WsfHighEnergyLaser::TestLasing ( double aDuration,
const WsfGeoPoint & aSourceLocation,
const WsfGeoPoint & aTargetLocation )
inlinevirtual

Test the laser against a perceived target in a particular location without actually engaging.

Parameters
aDurationA specific duration to lase.
aSourceLocationThe laser's location.
aTargetLocationThe perceived target location.
Returns
Whether the test was successful.

◆ TestLasing() [2/2]

virtual bool WsfHighEnergyLaser::TestLasing ( double aDuration,
size_t aTargetIndex,
const std::string & aTargetOffset = "" )
inlinevirtual

Test the laser against a specific target without actually engaging.

Parameters
aDurationA specific duration to lase.
aTargetIndexA target index against which to laser.
aTargetOffsetThe intended target offset to
Returns
Whether the test was successful.

◆ UpdateEngagementGeometry()

bool WsfHighEnergyLaser::UpdateEngagementGeometry ( double aSimTime,
size_t aTargetIndex,
const std::string & aTargetOffset = "",
bool aAddJitter = true )
virtual

Set up all engagement geometry in preparation for the laser propagation calculation. This includes weapon and target positioning and optional raycasting to a target offset with specified jitter.

Parameters
aSimTimethe current simulation time.
aTargetIndexThe target index against which the laser will fire.
aTargetOffsetThe desired target offset if any (used for raycasting).
aAddJitterThe jitter offset calculated instantaneously (used in raycasting).
Note
This is also used to perform an independent raycasting calculation to determine target occlusion.

Default target geometry update calculation. This should be extended, possibly as a template method, to account for the new geometry meshes.

References cWSF_COMPONENT_INTERSECT_MESH, WsfComponentListT< COMPONENT_TYPE >::FindComponentByRole(), WsfAuxDataEnabled::GetAuxDataConst(), WsfDirectedEnergyWeapon::GetBeam(), WsfComponentList::GetComponent(), WsfPlatform::GetIndex(), WsfSimulation::GetPlatformByIndex(), WsfSimulation::GetRandom(), GetSimulation(), WsfIntersectMesh::GetTargetOffsetName(), WsfIntersectProcessor::GetTargetOffsetName(), GetWeapon(), WsfIntersectMesh::Intersect(), WsfIntersectProcessor::Intersect(), mCalculateIncidence, mIncidenceAngle, mJitterExpectedValue, mTargetOccluded, mTargetOffsetName, mTargetRange, mWeaponPtr, WsfDirectedEnergyWeapon::Beam::SetIncidenceAngle(), WsfIntersectMesh::TargetOffsetExists(), WsfIntersectProcessor::TargetOffsetExists(), and WsfPlatform::Update().

Referenced by UpdateLasing(), and UT_DEFINE_SCRIPT_METHOD().

◆ UpdateLasing()

void WsfHighEnergyLaser::UpdateLasing ( double aSimTime)

Assuming a laser engagement is underway, update the target geometry and Integrate the fluence on target.

References mIsLasing, mLastUpdateTime, mTargetIndex, mTargetOffsetName, Propagate(), and UpdateEngagementGeometry().

Referenced by BeginLasing().

Member Data Documentation

◆ mBeamQuality

double WsfHighEnergyLaser::mBeamQuality
protected

◆ mCalculateIncidence

bool WsfHighEnergyLaser::mCalculateIncidence
protected

◆ mDamageRadius

double WsfHighEnergyLaser::mDamageRadius
protected

◆ mDebug

bool WsfHighEnergyLaser::mDebug
protected

◆ mDefaultDamageRadius

double WsfHighEnergyLaser::mDefaultDamageRadius
protected

◆ mIncidenceAngle

double WsfHighEnergyLaser::mIncidenceAngle
protected

◆ mIsLasing

bool WsfHighEnergyLaser::mIsLasing
protected

◆ mJitterExpectedValue

double WsfHighEnergyLaser::mJitterExpectedValue
protected

◆ mLastUpdateTime

double WsfHighEnergyLaser::mLastUpdateTime
protected

◆ mSysInit

bool WsfHighEnergyLaser::mSysInit
protected

The weapon object associated with the HEL.

Referenced by WsfHighEnergyLaser(), and WsfHighEnergyLaser().

◆ mTargetIndex

size_t WsfHighEnergyLaser::mTargetIndex
protected

◆ mTargetOccluded

bool WsfHighEnergyLaser::mTargetOccluded
protected

◆ mTargetOffsetName

WsfStringId WsfHighEnergyLaser::mTargetOffsetName
protected

◆ mTargetRange

double WsfHighEnergyLaser::mTargetRange
protected

◆ mTurbulenceModel

wsf::AtmosphericTurbulence WsfHighEnergyLaser::mTurbulenceModel
protected

◆ mWeaponPtr


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved