WSF
WsfBallisticMissileLaunchComputer Class Reference

#include <WsfBallisticMissileLaunchComputer.hpp>

Inheritance diagram for WsfBallisticMissileLaunchComputer:
Collaboration diagram for WsfBallisticMissileLaunchComputer:

Classes

class  SA_LaunchWindow
class  BallisticModel
class  PurgeSolutionEvent
class  TempPoint
 A temporary class for holding an intersection point. More...
class  TempRangeEntry
 A temporary form of 'RangeEntry' used during creation of the final tables. More...
class  RangeLine
class  RangeEntry
class  SA_Table
 The data used for surface-to-air launches. More...
class  SS_Table
 The data used for surface-to-surface launches. More...
class  SA_Evaluator
class  SA_Solution

Public Types

using TargetMap = std::map<size_t, WsfMover::KinematicModel*>
Public Types inherited from WsfLaunchComputer
enum  Constraints {
  cMAX_DELTA_ALTITUDE , cMIN_DELTA_ALTITUDE , cMIN_OPENING_SPEED , cMAX_OPENING_SPEED ,
  cMAX_SLANT_RANGE , cMIN_SLANT_RANGE , cMAX_BORESIGHT_ANGLE , cNUMBER_OF_CONSTRAINTS
}
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Public Member Functions

 WsfBallisticMissileLaunchComputer ()
 Constructor.
 WsfBallisticMissileLaunchComputer (const WsfBallisticMissileLaunchComputer &aSrc)
 Copy constructor.
WsfBallisticMissileLaunchComputeroperator= (const WsfBallisticMissileLaunchComputer &)=delete
 ~WsfBallisticMissileLaunchComputer () override
 Destructor.
WsfLaunchComputerClone () const override
bool Initialize (double aSimTime, WsfWeapon *aWeaponPtr) override
 =================================================================================================
bool ProcessInput (UtInput &aInput) override
double EstimatedTimeToIntercept (double aSimTime, const WsfTrack &aTrack, double aLaunchDelayTime) override
virtual double ComputeLateralTargetOffset (double aSimTime, const WsfTrack &aTrack)
double GetTargetApogeeTime () const
void GetTargetApogeeLocationWCS (double aLocWCS[3]) const
void ComputeEndPoint ()
Public Member Functions inherited from WsfLaunchComputer
 WsfLaunchComputer ()
 WsfLaunchComputer (const WsfLaunchComputer &aSrc)
 Copy constructor.
 ~WsfLaunchComputer () override=default
WsfLaunchComputeroperator= (const WsfLaunchComputer &)=delete
WsfLaunchComputerClone () const override
const char * GetScriptClassName () const override
bool ProcessInput (UtInput &aInput) override
virtual void Update (double aSimTime)
WsfWeaponGetWeapon () const
 Return the weapon with which this launch computer is associated.
WsfPlatformGetPlatform () const
 Return the platform with which this launch computer is associated.
WsfSimulationGetSimulation () const
void SetMaximumDeltaAltitude (double aMaxDeltaAltitude)
void SetMinimumDeltaAltitude (double aMinDeltaAltitude)
void SetMaximumClosingSpeed (double aMaxClosingSpeed)
void SetMaximumOpeningSpeed (double aMaxOpeningSpeed)
void SetMinimumClosingSpeed (double aMinClosingSpeed)
void SetMinimumOpeningSpeed (double aMinOpeningSpeed)
void SetMaximumSlantRange (double aMaxRange)
void SetMinimumSlantRange (double aMinRange)
void SetMaximumOffBoresight (double aMaxAngle)
void SetMaximumTimeOfFlight (double aMaxTOF)
void SetThrustDuration (double aThrustTime)
void SetCoastDuration (double aCoastTime)
void SetBurnoutSpeed (double aBurnoutSpeed)
void SetMinTerminalSpeed (double aMinTerminalSpeed)
bool ComputerGenerationMode () const
void SetComputerGenerationMode (bool aComputerGenerationMode)
void CopyResultsToTrack (WsfTrack &aTrack)
bool HaveResultsFor (const WsfTrackId &aTrackId) const
bool HaveResultsFor (double aSimTime, const WsfTrackId &aTrackId, double &aTimeToIntercept) const
bool LaunchTimeIsValid () const
bool LauncherBearingIsValid () const
bool LauncherElevationIsValid () const
bool LoftAngleIsValid () const
bool BurnTimeIsValid () const
bool TimeOfFlightIsValid () const
bool InterceptTimeIsValid () const
bool InterceptPointIsValid () const
bool TargetImpactTimeIsValid () const
bool TargetImpactPointIsValid () const
bool EndTimeIsValid () const
bool EndPointIsValid () const
double GetLaunchTime () const
double GetLauncherBearing () const
double GetLauncherElevation () const
double GetLoftAngle () const
double GetBurnTime () const
double GetTimeOfFlight () const
double GetInterceptTime () const
const WsfGeoPointGetInterceptPoint () const
double GetTargetImpactTime () const
const WsfGeoPointGetTargetImpactPoint () const
double GetEndTime () const
const WsfGeoPointGetEndPoint () const
void SetInterceptTime (double aInterceptTime)
void SetInterceptPoint (const WsfGeoPoint &aInterceptPoint)
void SetInterceptPointWCS (const double aLocationWCS[])
void SetLaunchTime (double aLaunchTime)
void SetTimeOfFlight (double aTimeOfFlight)
void SetTargetImpactTime (double aImpactTime)
void SetLoftAngle (double aLoftAngle)
void SetBurnTime (double aBurnTime)
void SetLauncherBearing (double aBearing)
void SetLauncherElevation (double aElevation)
void SetTargetImpactPoint (const WsfGeoPoint &aImpactPoint)
void SetTargetImpactPointWCS (const double aLocationWCS[])
void SetEndTime (double aEndTime)
void SetEndPoint (const WsfGeoPoint &aLocation)
void SetEndPointWCS (const double aLocationWCS[])
void ClearCommandedValues ()
void SetCommandedLauncherBearing (double aBearing)
void SetCommandedLauncherElevation (double aElevation)
void SetCommandedLoftAngle (double aLoftAngle)
void SetCommandedBurnTime (double aBurnTime)
void SetCommandedInterceptPoint (const WsfGeoPoint &aPoint)
bool DebugEnabled () const
void SetDebugEnabled (bool aDebugEnabled)
bool ShowResults () const
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)

Static Public Member Functions

static std::string BaseTypeName ()
 The basic type name (needed by weapon_tools and launch computer processor).
Static Public Member Functions inherited from WsfLaunchComputer
static std::string BaseTypeName ()
static bool LoadInstance (UtInput &aInput, WsfLaunchComputer *&aLCPtr)
static bool GetLauncherBearing (const WsfTrack &aTrack, double &aBearing)
static bool GetLauncherElevation (const WsfTrack &aTrack, double &aElevation)
static bool GetLoftAngle (const WsfTrack &aTrack, double &aLoftAngle)
static bool GetBurnTime (const WsfTrack &aTrack, double &aBurnTime)
static bool GetInterceptTime (const WsfTrack &aTrack, double &aInterceptTime)
static bool GetInterceptPoint (const WsfTrack &aTrack, WsfGeoPoint &aPoint)

Temporary classes

The following are temporary classes used during the creation of the surface-to-air tables.

using TempRangeLine = std::vector<TempPoint>
 A temporary form of 'RangeLine' used during creation of the final tables.
bool ComputeAirIntercept (double aSimTime, WsfPlatform *aTargetPtr, const WsfTrack *aTrackPtr, double aLaunchDelayTime)
bool ComputeGroundIntercept (double aSimTime, double aLaunchDelayTime, const double aTargetLocWCS[3])
void ComputeLaunchWindows (double aSimTime, double aLaunchDelayTime, double aTimeToLaunch, double aTimeToIntercept, SA_Evaluator &aEvaluator, std::vector< SA_LaunchWindow > &aLaunchWindows)
void WeaponFired (double aSimTime, const WsfWeaponEngagement *aEngagementPtr, const WsfTrack *aTrackPtr)
 Simulation observer for a weapon firing.
void WeaponFireAborted (double aSimTime, WsfWeapon *aWeaponPtr, const WsfTrack *aTrackPtr, double aQuantity)
bool InitializeTTIData () override

Special methods for determination of launch windows.

Calling 'ComputeLaunchWindows' enables these calculations.

Note
Computing launch windows is compute intensive.
void ComputeLaunchWindows ()
unsigned int GetLaunchWindowCount () const
double GetFirstLaunchTime (unsigned int aIndex) const
double GetFirstInterceptTime (unsigned int aIndex) const
void GetFirstInterceptLocationWCS (unsigned int aIndex, double aLocWCS[3]) const
double GetLastLaunchTime (unsigned int aIndex) const
double GetLastInterceptTime (unsigned int aIndex) const
void GetLastInterceptLocationWCS (unsigned int aIndex, double aLocWCS[3]) const
bool GetPrecomputedLaunchWindowsFor (double aSimTime, unsigned int aThreatIndex, std::vector< SA_LaunchWindow > &aWindows)
void QueuedSolutionPurge (double aSimTime, size_t aTargetIndex, const std::string &aCaller)
 Purge a solution from the cache.
double LastEvaluatedGroundRange () const
void SetLauncherBearingOnly (double aValue)

Additional Inherited Members

Static Public Attributes inherited from WsfLaunchComputer
static const double cFOREVER = 1.0E8
 Constant indicating a large amount of time, or "will never get there".
static const double cOUT_OF_REACH = 1.0E+30
 Constant indicating an unattainable distance, or "a long way away".
static const double cUNDEFINED_DOUBLE = 1.0E+30
 A constant indicating a value is undefined.
Protected Types inherited from WsfLaunchComputer
enum  {
  cVF_LAUNCH_TIME = 0X0001 , cVF_LAUNCHER_BEARING = 0X0002 , cVF_LAUNCHER_ELEVATION = 0X0004 , cVF_LOFT_ANGLE = 0X0008 ,
  cVF_BURN_TIME = 0X0010 , cVF_TIME_OF_FLIGHT = 0X0020 , cVF_INTERCEPT_TIME = 0X0040 , cVF_INTERCEPT_POINT = 0X0080 ,
  cVF_TARGET_IMPACT_TIME = 0X0100 , cVF_TARGET_IMPACT_POINT = 0X0200 , cVF_END_TIME = 0X0400 , cVF_END_POINT = 0X0800
}
Protected Member Functions inherited from WsfLaunchComputer
bool ResultIsValidFor (unsigned int aDataMask) const
void InitializeResults (double aSimTime, const WsfTrack &aTrack)
void UpdateResults (double aSimTime, double aTimeToIntercept, const WsfTrack &aTrack)
void ClearConstraints ()
void CopyConstraints (const bool aSrc[])
double ExpectedFlightDistance () const
double CurrentOpeningSpeed () const
virtual bool WithinConstraintsAt (double aSimTime, double aFutureInterceptTime, const WsfTrack &aTrack)
bool DeltaAltitudeCheck (double aDeltaAltitude) const
bool SlantRangeCheck (double aSlantRange) const
bool BoresightAngleCheck (WsfPlatform *aPlatPtr, double aLocWCS[3]) const
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).
static bool GetDataValue (const WsfTrack &aTrack, const std::string &aName, double &aValue, double aMultiplier)
WsfWeaponmWeaponPtr
bool mDebugEnabled
bool mShowResults
bool mComputerGenerationMode
bool mConstraintEnabled [cNUMBER_OF_CONSTRAINTS]
double mPredictionLockinTime
double mMaxDeltaAltitude
double mMinDeltaAltitude
double mMinOpeningSpeed
double mMaxOpeningSpeed
double mMaxSlantRange
double mMinSlantRange
double mCosineMaxBoresight
double mMaximumTOF
double mAvgThrustingAccel
double mBurnoutSpeed
double mBurnDuration
double mCoastTime
double mAvgCoastingAccel
double mMinTerminalSpeed
double mLastPredictionTime
WsfTrackId mLastPredictionTrackId
unsigned int mValidityFlags
double mLaunchTime
double mLauncherBearing
double mLauncherElevation
double mLoftAngle
double mBurnTime
double mTimeOfFlight
double mInterceptTime
WsfGeoPoint mInterceptPoint
double mTargetImpactTime
WsfGeoPoint mTargetImpactPoint
double mEndTime
WsfGeoPoint mEndPoint
double mCommandedLauncherBearing
double mCommandedLauncherElevation
double mCommandedLoftAngle
double mCommandedBurnTime
WsfGeoPoint mCommandedInterceptPoint

Detailed Description

A launch computer for ballistic missiles. This launch computer is intended to be used for computing intercept solutions for a ballistic missile interceptor versus a ballistic missile target.

Member Typedef Documentation

◆ TargetMap

◆ TempRangeLine

A temporary form of 'RangeLine' used during creation of the final tables.

Constructor & Destructor Documentation

◆ WsfBallisticMissileLaunchComputer() [1/2]

◆ WsfBallisticMissileLaunchComputer() [2/2]

WsfBallisticMissileLaunchComputer::WsfBallisticMissileLaunchComputer ( const WsfBallisticMissileLaunchComputer & aSrc)

◆ ~WsfBallisticMissileLaunchComputer()

WsfBallisticMissileLaunchComputer::~WsfBallisticMissileLaunchComputer ( )
override

Destructor.

Member Function Documentation

◆ BaseTypeName()

std::string WsfBallisticMissileLaunchComputer::BaseTypeName ( )
inlinestatic

The basic type name (needed by weapon_tools and launch computer processor).

Referenced by WsfLaunchComputerTypes::WsfLaunchComputerTypes().

◆ Clone()

WsfLaunchComputer * WsfBallisticMissileLaunchComputer::Clone ( ) const
overridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements WsfObject.

References WsfBallisticMissileLaunchComputer(), and WsfLaunchComputer::WsfLaunchComputer().

◆ ComputeAirIntercept()

bool WsfBallisticMissileLaunchComputer::ComputeAirIntercept ( double aSimTime,
WsfPlatform * aTargetPtr,
const WsfTrack * aTrackPtr,
double aLaunchDelayTime )
protected

References ComputeLaunchWindows(), WsfBallisticMissileLaunchComputer::SA_Evaluator::FindLaunchWindowStart(), WsfMover::KinematicModel::GetApogeeTime(), WsfMeasurement::GetExtrapolatedLocationWCS(), WsfPlatform::GetIndex(), WsfMover::KinematicModel::GetLocationXYZ(), WsfPlatform::GetMover(), WsfTrack::GetTargetIndex(), WsfMover::KinematicModel::GetTimeAtLocation(), WsfObject::GetTypeId(), WsfBallisticMissileLaunchComputer::SA_Solution::mEndPointWCS, WsfBallisticMissileLaunchComputer::SA_Solution::mEndTime, WsfBallisticMissileLaunchComputer::SA_Solution::mInterceptFlightPathAngle, WsfLaunchComputer::mInterceptPoint, WsfBallisticMissileLaunchComputer::SA_Solution::mInterceptSpeed, WsfBallisticMissileLaunchComputer::SA_Solution::mInterceptTime, WsfLaunchComputer::mInterceptTime, WsfBallisticMissileLaunchComputer::SA_Solution::mLaunchTime, WsfLaunchComputer::mLaunchTime, WsfBallisticMissileLaunchComputer::SA_Solution::mLaunchWindows, WsfBallisticMissileLaunchComputer::SA_Solution::mLoftAngle, WsfLaunchComputer::mLoftAngle, moverPtr, WsfBallisticMissileLaunchComputer::SA_Solution::mTimeOfFlight, WsfLaunchComputer::mTimeOfFlight, WsfLaunchComputer::mWeaponPtr, WsfLaunchComputer::SetEndPointWCS(), WsfLaunchComputer::SetEndTime(), WsfLaunchComputer::SetInterceptPointWCS(), WsfLaunchComputer::SetInterceptTime(), WsfLaunchComputer::SetLaunchTime(), WsfLaunchComputer::SetLoftAngle(), WsfLaunchComputer::SetTargetImpactPointWCS(), WsfLaunchComputer::SetTargetImpactTime(), WsfLaunchComputer::SetTimeOfFlight(), targetIndex(), and WsfPlatform::Update().

Referenced by EstimatedTimeToIntercept().

◆ ComputeEndPoint()

void WsfBallisticMissileLaunchComputer::ComputeEndPoint ( )
inline

Indicate the weapon 'end point and time' should be computed on the next EstimatedTimeToIntercept call. The 'end point and time' is an estimate of where the weapon/interceptor would hit the ground if it continued on a ballistic trajectory after missing the target.

Note
This only applies to the next call to EstimatedTimeToIntercept. It must be called for each call where this data is required, or the input value 'compute_end_point' must be specified as true.

◆ ComputeGroundIntercept()

◆ ComputeLateralTargetOffset()

double WsfBallisticMissileLaunchComputer::ComputeLateralTargetOffset ( double aSimTime,
const WsfTrack & aTrack )
virtual

◆ ComputeLaunchWindows() [1/2]

void WsfBallisticMissileLaunchComputer::ComputeLaunchWindows ( )
inline

Referenced by ComputeAirIntercept().

◆ ComputeLaunchWindows() [2/2]

◆ EstimatedTimeToIntercept()

double WsfBallisticMissileLaunchComputer::EstimatedTimeToIntercept ( double aSimTime,
const WsfTrack & aTrack,
double aLaunchDelayTime )
overridevirtual

◆ GetFirstInterceptLocationWCS()

void WsfBallisticMissileLaunchComputer::GetFirstInterceptLocationWCS ( unsigned int aIndex,
double aLocWCS[3] ) const

◆ GetFirstInterceptTime()

double WsfBallisticMissileLaunchComputer::GetFirstInterceptTime ( unsigned int aIndex) const

◆ GetFirstLaunchTime()

double WsfBallisticMissileLaunchComputer::GetFirstLaunchTime ( unsigned int aIndex) const

◆ GetLastInterceptLocationWCS()

void WsfBallisticMissileLaunchComputer::GetLastInterceptLocationWCS ( unsigned int aIndex,
double aLocWCS[3] ) const

◆ GetLastInterceptTime()

double WsfBallisticMissileLaunchComputer::GetLastInterceptTime ( unsigned int aIndex) const

◆ GetLastLaunchTime()

double WsfBallisticMissileLaunchComputer::GetLastLaunchTime ( unsigned int aIndex) const

◆ GetLaunchWindowCount()

unsigned int WsfBallisticMissileLaunchComputer::GetLaunchWindowCount ( ) const
inline

◆ GetPrecomputedLaunchWindowsFor()

bool WsfBallisticMissileLaunchComputer::GetPrecomputedLaunchWindowsFor ( double aSimTime,
unsigned int aThreatIndex,
std::vector< SA_LaunchWindow > & aWindows )

◆ GetTargetApogeeLocationWCS()

void WsfBallisticMissileLaunchComputer::GetTargetApogeeLocationWCS ( double aLocWCS[3]) const

Referenced by operator=().

◆ GetTargetApogeeTime()

double WsfBallisticMissileLaunchComputer::GetTargetApogeeTime ( ) const

Referenced by operator=().

◆ Initialize()

bool WsfBallisticMissileLaunchComputer::Initialize ( double aSimTime,
WsfWeapon * aWeaponPtr )
overridevirtual

◆ InitializeTTIData()

bool WsfBallisticMissileLaunchComputer::InitializeTTIData ( )
overrideprotectedvirtual

Initialize Time To Intercept data for the object. If no TTI data is needed, then override method and simply return true.

Returns
'true' if successful or 'false' if some sort of error occurred.

Reimplemented from WsfLaunchComputer.

◆ LastEvaluatedGroundRange()

double WsfBallisticMissileLaunchComputer::LastEvaluatedGroundRange ( ) const
inlineprotected

◆ operator=()

◆ ProcessInput()

bool WsfBallisticMissileLaunchComputer::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 WsfObject.

References WsfLaunchComputer::DebugEnabled(), WsfScenario::FindExtension(), WsfScenario::FromInput(), WsfScenario::GetSystemLog(), WsfLaunchComputer::ProcessInput(), and WsfSystemLog::WriteLogEntry().

◆ QueuedSolutionPurge()

void WsfBallisticMissileLaunchComputer::QueuedSolutionPurge ( double aSimTime,
size_t aTargetIndex,
const std::string & aCaller )

◆ SetLauncherBearingOnly()

void WsfBallisticMissileLaunchComputer::SetLauncherBearingOnly ( double aValue)
inlineprotected

◆ WeaponFireAborted()

void WsfBallisticMissileLaunchComputer::WeaponFireAborted ( double aSimTime,
WsfWeapon * aWeaponPtr,
const WsfTrack * aTrackPtr,
double aQuantity )
protected

◆ WeaponFired()

void WsfBallisticMissileLaunchComputer::WeaponFired ( double aSimTime,
const WsfWeaponEngagement * aEngagementPtr,
const WsfTrack * aTrackPtr )
protected

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