WSF
BallisticLaunchComputerGenerator Class Reference

#include <BallisticLaunchComputerGenerator.hpp>

Inheritance diagram for BallisticLaunchComputerGenerator:
Collaboration diagram for BallisticLaunchComputerGenerator:

Public Member Functions

 BallisticLaunchComputerGenerator (WsfScenario &aScenario)
 BallisticLaunchComputerGenerator (const BallisticLaunchComputerGenerator &aSrc)
BallisticLaunchComputerGeneratoroperator= (const BallisticLaunchComputerGenerator &)=delete
 ~BallisticLaunchComputerGenerator () override
ToolClone () const override
bool Initialize (WsfSimulation &aSimulation) override
bool ProcessInput (UtInput &aInput) override
void Update (double aSimTime) override
void PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr) override
 Optional tool method called by WeaponObserver to pass on the PlatformAdded simulation observer event.
Public Member Functions inherited from Tool
 Tool (const Tool &aSrc)
Tooloperator= (const Tool &)=delete
 ~Tool () override
bool ProcessInput (UtInput &aInput) override
virtual void MoverBurnout (double aSimTime, WsfMover *aMoverPtr)
 name Callbacks from WeaponObserver (lets the tool have access to simulation callbacks)
virtual void GuidanceComputerPhaseChanged (double aSimTime, WsfGuidanceComputer *aComputerPtr)
 Optional tool method called by WeaponObserver to pass on the GuidanceComputerPhaseChanged simulation observer event.
WsfStringId WeaponPlatformTypeId () const
double FrameStep () const
bool IsInitialized () const
WsfPlatformGetLauncherPlatform () const
WsfExplicitWeaponGetLauncherWeapon () 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)

Protected Member Functions

void LARGenUpdate (double aSimTime)
bool FireNewWeapon (double aSimTime) override
void ErrorBailout () override
WsfWeaponFuseGetFuse (WsfPlatform *aPlatformPtr) const
 Obtain a WsfWeaponFuse pointer out of the specified platform.
void WriteOutputFile ()
Protected Member Functions inherited from Tool
WsfSimulationGetSimulation () const
WsfScenarioGetScenario () const
ToolManagerGetManager () const
 Tool (WsfScenario &aScenario)
 This constructor initializes the object.
void UnInitialize ()
bool IsDone () const
 Return a flag to indicate that this Tool has completed its work.
bool DebugEnabled () const
 Return a flag to indicate that debugging is enabled.
virtual void ResolveNames ()
 Method called to determine what the output objects and file names are called.
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
Protected Attributes inherited from Tool
WsfScenariomScenarioPtr
WsfSimulationmSimulationPtr
WeaponObserver mObserver
WsfPlatformmLaunchPlatPtr
WsfExplicitWeaponmLaunchWpnPtr
double mFrameStep
double mLastUpdate
double mLatDeg
double mLonDeg
double mAlt
double mHeadingRad
bool mDone
bool mNotifiedDone
bool mInitialized
bool mDebug
bool mTerminateOnLaunchFailure
std::string mToolProduces
std::string mFileExtension
WsfStringId mWeaponEffectTypeId
WsfStringId mLaunchPlatformTypeId
WsfStringId mTargetPlatformTypeId
WsfStringId mWeaponNameId
std::string mOutputFileName
std::string mOutputObjectName

Detailed Description

Ballistic Launch Computer Generator Tool. The Tool will produce a WsfBallisticLaunchComputer valid for a specified ballistic "iron bomb" weapon type. It computes the proper release time and distance prior to reaching the target location, even if the target track is moving. (Note that the lateral placement of the weapon impact depends upon launch aircraft heading, which this object does not control.) The generator will accept a matrix of launch altitudes, launch speeds, and target altitudes. For each launch altitude and speed, the bomb type will be dropped to intercept the target altitude (the bomb's fuse will be forced to detonate at the specified target altitude. The times to intercept, and the down range distances flown during bomb descent will be written into the computer, for later table lookup during launch timing calculations.

Constructor & Destructor Documentation

◆ BallisticLaunchComputerGenerator() [1/2]

BallisticLaunchComputerGenerator::BallisticLaunchComputerGenerator ( WsfScenario & aScenario)

◆ BallisticLaunchComputerGenerator() [2/2]

BallisticLaunchComputerGenerator::BallisticLaunchComputerGenerator ( const BallisticLaunchComputerGenerator & aSrc)

◆ ~BallisticLaunchComputerGenerator()

BallisticLaunchComputerGenerator::~BallisticLaunchComputerGenerator ( )
override

Member Function Documentation

◆ Clone()

Tool * BallisticLaunchComputerGenerator::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 Tool.

References BallisticLaunchComputerGenerator(), and Tool::Tool().

◆ ErrorBailout()

void BallisticLaunchComputerGenerator::ErrorBailout ( )
overrideprotectedvirtual

Reimplemented from Tool.

References Tool::mDone, and Tool::mObserver.

Referenced by FireNewWeapon(), LARGenUpdate(), and PlatformAdded().

◆ FireNewWeapon()

bool BallisticLaunchComputerGenerator::FireNewWeapon ( double aSimTime)
overrideprotectedvirtual

Method called to fire a new weapon. Pure virtual base method must be implemented in derived classes.

Parameters
aSimTimeThe current simulated time.

Implements Tool.

References ErrorBailout(), Tool::mHeadingRad, Tool::mLatDeg, Tool::mLaunchPlatPtr, Tool::mLaunchWpnPtr, Tool::mLonDeg, Tool::mTerminateOnLaunchFailure, and success.

Referenced by LARGenUpdate().

◆ GetFuse()

WsfWeaponFuse * BallisticLaunchComputerGenerator::GetFuse ( WsfPlatform * aPlatformPtr) const
protected

Obtain a WsfWeaponFuse pointer out of the specified platform.

References WsfComponentList::RoleIterator< T >::AtEnd().

Referenced by operator=(), and PlatformAdded().

◆ Initialize()

bool BallisticLaunchComputerGenerator::Initialize ( WsfSimulation & aSimulation)
overridevirtual

In another typical WSF construct, this method initializes the object prior to run time. If the Initialization fails, the object will not be permitted to transition to the run mode. Derived classes must assure that they are initialized internally, as well as calling the base class Initialize method.

Returns
Boolean success value.

Reimplemented from Tool.

References Tool::Initialize(), Tool::mInitialized, and Tool::UnInitialize().

◆ LARGenUpdate()

◆ operator=()

◆ PlatformAdded()

void BallisticLaunchComputerGenerator::PlatformAdded ( double aSimTime,
WsfPlatform * aPlatformPtr )
overridevirtual

Optional tool method called by WeaponObserver to pass on the PlatformAdded simulation observer event.

Reimplemented from Tool.

References WsfWeaponFuse::cDETONATE_BELOW, ErrorBailout(), GetFuse(), Tool::mLaunchPlatPtr, and WsfWeaponFuse::SetMSL_Criteria().

◆ ProcessInput()

bool BallisticLaunchComputerGenerator::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 Tool::ProcessInput().

◆ Update()

void BallisticLaunchComputerGenerator::Update ( double aSimTime)
overridevirtual

Advance the Tool forward in time. This base method shall be overridden in derived classes, and at the end of the derived method, this parent method must be called, to properly maintain the internal state.

Reimplemented from Tool.

References LARGenUpdate(), and Tool::Update().

◆ WriteOutputFile()

void BallisticLaunchComputerGenerator::WriteOutputFile ( )
protected

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