|
WSF
|
#include <SAM_LaunchComputerGenerator.hpp>


Classes | |
| struct | TestPoint |
Public Member Functions | |
| SAM_LaunchComputerGenerator (WsfScenario &aScenario) | |
| ~SAM_LaunchComputerGenerator () override | |
| Tool * | Clone () const override |
| bool | Initialize (WsfSimulation &aSimulation) override |
| bool | ProcessInput (UtInput &aInput) override |
| void | Update (double aSimTime) override |
| Public Member Functions inherited from Tool | |
| Tool (const Tool &aSrc) | |
| Tool & | operator= (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. | |
| virtual void | PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr) |
| Optional tool method called by WeaponObserver to pass on the PlatformAdded simulation observer event. | |
| WsfStringId | WeaponPlatformTypeId () const |
| double | FrameStep () const |
| bool | IsInitialized () const |
| WsfPlatform * | GetLauncherPlatform () const |
| WsfExplicitWeapon * | GetLauncherWeapon () 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 TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (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 Types | |
| enum | StateType { cLC_GEN , cDONE } |
| < Enumerated states listed in chronological order: More... | |
Protected Member Functions | |
| void | ErrorBailout () override |
| bool | FireNewWeapon (double aSimTime) override |
| void | LCGenUpdate (double aSimTime) |
| bool | PlaceNewTarget (double aSimTime, WsfTrack &aTrack) |
| void | WriteOutputFile () |
| void | TestOutputFile () |
| void | TestPoints () |
| bool | ProcessArray (UtInput &aInput, const std::string &aBlockTerminator, UtInput::ValueType aUnitType, std::vector< double > &aValues) |
| Protected Member Functions inherited from Tool | |
| WsfSimulation * | GetSimulation () const |
| WsfScenario & | GetScenario () const |
| ToolManager * | GetManager () 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< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| Protected Attributes inherited from Tool | |
| WsfScenario * | mScenarioPtr |
| WsfSimulation * | mSimulationPtr |
| WeaponObserver | mObserver |
| WsfPlatform * | mLaunchPlatPtr |
| WsfExplicitWeapon * | mLaunchWpnPtr |
| 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 |
Surface To Air Missile (SAM) Launch Computer Generation Tool. An instance of this class fires SAM System missiles repeatedly against targets at specified altitudes and ranges, to compute the Time Of Flight and Range attained. This information is used to feed values to a Launch Computer, setting the earliest time when a missile system can be fired against an inbound threat missile.
|
protected |
| SAM_LaunchComputerGenerator::SAM_LaunchComputerGenerator | ( | WsfScenario & | aScenario | ) |
References cLC_GEN, Tool::mToolProduces, and Tool::Tool().
Referenced by Clone().
|
override |
|
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 SAM_LaunchComputerGenerator(), and Tool::Tool().
|
overrideprotectedvirtual |
Reimplemented from Tool.
References cDONE, Tool::mDone, and Tool::mObserver.
|
overrideprotectedvirtual |
Method called to fire a new weapon. Pure virtual base method must be implemented in derived classes.
| aSimTime | The current simulated time. |
Implements Tool.
References Tool::DebugEnabled(), Tool::mLatDeg, Tool::mLaunchPlatPtr, Tool::mLaunchWpnPtr, Tool::mLonDeg, Tool::mObserver, PlaceNewTarget(), and Tool::WeaponPlatformTypeId().
Referenced by LCGenUpdate().
|
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.
Reimplemented from Tool.
References WsfEM_XmtrRcvr::GetAntenna(), WsfSensor::GetEM_Xmtr(), WsfSensor::GetEM_XmtrCount(), WsfEM_Antenna::GetHeight(), Tool::Initialize(), Tool::mInitialized, Tool::mLaunchPlatPtr, Tool::mObserver, and Tool::UnInitialize().
|
protected |
References cDONE, WeaponObserver::cIDLE, WeaponObserver::cTERMINATED, Tool::DebugEnabled(), WsfSimulation::DeletePlatform(), FireNewWeapon(), WsfSimulation::GetPlatformByIndex(), Tool::GetSimulation(), Tool::mDone, Tool::mObserver, TestOutputFile(), TestPoints(), and WriteOutputFile().
Referenced by Update().
|
protected |
References WsfRoute::Append(), WsfObjectTypeList< T >::Clone(), Tool::DebugEnabled(), WsfPlatformTypes::Get(), WsfPlatform::GetIndex(), WsfPlatform::GetMover(), Tool::GetScenario(), Tool::GetSimulation(), WsfTrack::Initialize(), Tool::mLaunchPlatPtr, moverPtr, Tool::mTargetPlatformTypeId, WsfWaypoint::SetHeading(), WsfTrackId::SetLocalTrackNumber(), WsfObject::SetName(), WsfTrackId::SetOwningPlatformId(), WsfTrack::SetTargetIndex(), and WsfTrack::Update().
Referenced by FireNewWeapon().
|
protected |
Parse an input stream and extract from it an array of unit values.
| aInput | The input stream reference. |
| aBlockTerminator | The string to search for end-of-block. |
| aUnitType | The type of unit to be read in and added to the array contents. |
| aValues | An array of floating point values to hold the results of parsing. |
Referenced by ProcessInput().
|
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'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
References SAM_LaunchComputerGenerator::TestPoint::altitude, SAM_LaunchComputerGenerator::TestPoint::groundRange, SAM_LaunchComputerGenerator::TestPoint::latOffset, ProcessArray(), Tool::ProcessInput(), and SAM_LaunchComputerGenerator::TestPoint::speed.
|
protected |
References WsfLaunchComputerTypes::Get(), Tool::GetScenario(), Tool::mOutputFileName, and WsfSAM_LaunchComputer::ValidateEnvelope().
Referenced by LCGenUpdate().
|
protected |
References SAM_LaunchComputerGenerator::TestPoint::altitude, WsfSimulation::GetSimTime(), Tool::GetSimulation(), SAM_LaunchComputerGenerator::TestPoint::groundRange, SAM_LaunchComputerGenerator::TestPoint::latOffset, Tool::mLaunchPlatPtr, simTime, and SAM_LaunchComputerGenerator::TestPoint::speed.
Referenced by LCGenUpdate().
|
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 cDONE, cLC_GEN, LCGenUpdate(), Tool::mLastUpdate, and Tool::Update().
|
protected |
References WsfSAM_LaunchComputer::InterceptEnvelope::Altitude(), WsfSAM_LaunchComputer::BaseTypeName(), WsfSAM_LaunchComputer::InterceptEnvelope::GroundRange(), Tool::mOutputFileName, Tool::mOutputObjectName, WsfSAM_LaunchComputer::InterceptEnvelope::NumAltitudes(), WsfSAM_LaunchComputer::InterceptEnvelope::NumOffsets(), WsfSAM_LaunchComputer::InterceptEnvelope::NumRanges(), WsfSAM_LaunchComputer::InterceptEnvelope::NumSpeeds(), WsfSAM_LaunchComputer::InterceptEnvelope::Offset(), WsfSAM_LaunchComputer::InterceptEnvelope::Speed(), and WsfSAM_LaunchComputer::InterceptEnvelope::TimeOfFlight().
Referenced by LCGenUpdate().