WSF
WsfGuidedMoverBase Class Referenceabstract

An abstract base class that defines an interface for guided movers. More...

#include <WsfGuidedMoverBase.hpp>

Inheritance diagram for WsfGuidedMoverBase:
Collaboration diagram for WsfGuidedMoverBase:

Public Member Functions

 WsfGuidedMoverBase (WsfScenario &aScenario)
 ~WsfGuidedMoverBase () override
WsfGuidedMoverBaseoperator= (const WsfGuidedMoverBase &)=delete
Public Member Functions inherited from WsfMover
 WsfMover ()=delete
 WsfMover (const WsfScenario &aScenario)
 WsfMover (const WsfMover &aSrc)
WsfMoveroperator= (const WsfMover &)=delete
 ~WsfMover () override
virtual double TurnRadius (double atSpeed)
WsfModeListGetModeList () const
virtual void TriggerExtrapolation ()
virtual KinematicModelCreateKinematicModel (double aSimTime, WsfStringId aPlatformTypeId, const double aLocationWCS[3], const double aVelocityWCS[3], WsfMover *aMoverPtr, WsfDraw *aDrawPtr) const
WsfComponentCloneComponent () const override
int GetComponentInitializationOrder () const override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override
WsfMoverClone () const override=0
const char * GetScriptClassName () const override
virtual void SwapMoverInitiated (double aSimTime, WsfMover *aOldMoverPtr)
bool Initialize (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
void Update (double aSimTime) override
bool Initialize2 (double aSimTime) override
void TurnOff (double aSimTime) override
void TurnOn (double aSimTime) override
void SetNonOperational (double aSimTime) override
void SetOperational (double aSimTime) override
void PartBroken (double aSimTime) override
void Restore (double aSimTime) override
virtual void SetHeading (double aHeading)
virtual void SetPitch (double aPitch)
virtual void SetRoll (double aRoll)
virtual void SetOrientationNED (double aHeading, double aPitch, double aRoll)
virtual void ResetPosition (double aSimTime)
 Informs the mover to use the current platform state.
double GetLastUpdateTime () const
double GetUpdateInterval () const override
double GetUpdateTimeTolerance () const
void SetUpdateInterval (double aUpdateInterval) override
void SetLastUpdateTime (double aLastUpdateTime)
virtual bool UpdateAllowed () const
bool UpdateWhenBroken () const
void SetUpdateWhenBroken ()
void SetNoUpdateWhenBroken ()
virtual const WsfRouteGetDefaultRoute () const
virtual int RoutePointIndex () const
virtual bool GoToAltitude (double aSimTime, double aAltitude, double aClimbDiveRate, bool aKeepRoute)
virtual bool ReturnToRoute (double aSimTime)
virtual bool GoToClosestPoint (double aSimTime)
virtual bool GoToLabel (double aSimTime, WsfStringId aLabelId)
virtual bool GoToLocation (double aSimTime, double aLatitude, double aLongitude, double aAltitude)
virtual bool GoToSpeed (double aSimTime, double aSpeed, double aLinearAccel, bool aKeepRoute)
virtual bool TurnToHeading (double aSimTime, double aHeading, double aRadialAccel, WsfPath::TurnDirection aTurnDirection)
virtual bool TurnToRelativeHeading (double aSimTime, double aHeadingChange, double aRadialAccel, WsfPath::TurnDirection aTurnDirection)
virtual bool UpdateDefaultRoute ()
virtual bool GoToWaypoint (double aSimTime, unsigned int aDestination)
virtual bool FindAndSetPath (double aSimTime, WsfGeoPoint *aStartPtr, WsfGeoPoint *aEndPtr)
virtual bool FlyRates (const UtVec3d &aAngularRates, const UtVec3d &aLongitudinalAccel)
virtual bool FlyHeadingSpeedAltitude (double aHeading, double aSpeed, double aAltitude, double aMaxGees, double aMaxClimb)
virtual bool TurnInPlaneWithSpeed (const UtVec3d &aPlane, double aGees, double aSpeed)
virtual bool TurnInPlaneWithThrottle (const UtVec3d &aPlane, double aGees, double aThrottle)
virtual bool FlyVectorWithSpeed (const UtVec3d &aVelocityVector, double aMaxGees, double aSpeed)
virtual bool FlyVectorWithThrottle (const UtVec3d &aVelocityVector, double aMaxGees, double aThrottle)
virtual bool ExecuteTriggers (double aSimTime, unsigned int aPointIndex)
virtual bool GetFutureLocationWCS (double aSimTime, double aLocationWCS[3])
WsfStringId GetModeId () const
virtual void SetMode (WsfStringId aModeName)
bool ThreadSafe () const
 Returns true if the mover update is thread safe.
void SetThreadSafe ()
void SetNotThreadSafe ()
virtual void InitializeProperties ()
 Add any input properties and its default value common properties list.
virtual bool PropertyExists (const std::string &aPropertyName)
 Return true if the given property exists in the set of properties.
virtual void RegisterProperty (const std::string &aPropertyName, const int &aProperty)
 Add an integer property to the common set of properties.
virtual void RegisterProperty (const std::string &aPropertyName, const double &aProperty)
 Add an floating point property to the common set of properties.
virtual void RegisterProperty (const std::string &aPropertyName, const std::string &aProperty)
 Add an string property to the set of common properties.
virtual bool GetPropertyInt (const std::string &aPropertyName, int &aProperty)
virtual bool GetPropertyDouble (const std::string &aPropertyName, double &aProperty)
virtual bool GetPropertyString (const std::string &aPropertyName, std::string &aProperty)
virtual double GetThrottlePosition ()
Public Member Functions inherited from WsfPlatformPart
 WsfPlatformPart (const WsfScenario &aScenario, int aPartType)
WsfPlatformPartoperator= (const WsfPlatformPart &aRhs)=delete
 ~WsfPlatformPart () override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override
bool DebugEnabled () const
 Returns 'true' if debugging is enabled for this instance.
void SetDebugEnabled (bool aDebugEnabled)
unsigned int GetDebugMask ()
bool IsExternallyControlled () const
virtual void SetExternallyControlled (double aSimTime, bool aIsExternallyControlled)
int GetPartType () const
const char * GetScriptClassName () const override
WsfSimulationGetSimulation () const
const WsfScenarioGetScenario () const
WsfStringId GetComponentName () const override
void ComponentParentChanged (WsfPlatform *aPlatformPtr) override
bool Initialize (double aSimTime) override
bool Initialize2 (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
WsfPlatformGetPlatform () const
virtual void SetPlatform (WsfPlatform *aPlatformPtr)
virtual void PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr)
virtual void PlatformDeleted (WsfPlatform *aPlatformPtr)
double GetLastStatusChangeTime () const
void SetLastStatusChangeTime (double aSimTime)
 Allows a system to set the time at which the device was initialized.
bool CanBeMadeOperational () const
 Returns an indication that this system can be made operational.
bool CanBeMadeNonOperational () const
 Returns an indication that this system can be made non-operational.
bool CanBeTurnedOn () const
 Returns an indication that this system can be turned on.
bool CanBeTurnedOff () const
 Returns an indication that this system can be turned off.
bool IsTurnedOn () const
bool InitiallyTurnedOn () const
 Is the system to be turned 'on' when added to the simulation?
void SetInitiallyTurnedOn (bool aInitiallyTurnedOn)
 Sets if the system is turned on when added to the simulation.
bool IsOperational () const
bool SetOperational (double aSimTime, bool aMakeOperational)
double GetDamageFactor () const
bool SetDamageFactor (double aSimTime, double aDamageFactor)
bool IsCritical () const
void SetCritical (bool aValue)
virtual void OnPlatformBrokenEvent (double aSimTime)
 Owning platform has issued a broken event.
bool IsBroken () const
WsfInternalLinksGetInternalLinks ()
 Return the internal links for this part.
virtual bool HasInternalLinks () const
 Does this platform part have a communication link to other platform parts?
virtual bool ProcessMessage (double aSimTime, const WsfMessage &aMessage)
virtual bool ReceiveMessage (double aSimTime, const WsfMessage &aMessage)
virtual void SendMessage (double aSimTime, const WsfMessage &aMessage)
virtual void SendMessageTo (double aSimTime, const WsfMessage &aMessage, WsfStringId aRecipientId)
void SendMessageToProcessor (double aSimTime, const WsfMessage &aMessage, WsfStringId aRecipientId)
virtual void SendQueuedMessages (double aSimTime)
const WsfCategoryListGetCategories () const
 Get the categories to which this part belongs.
void AddCategory (WsfStringId aCategoryId)
 Adds the provided category to the platform part's category list.
bool IsCategoryMember (WsfStringId aCategoryId) const
const WsfGroupListGetGroups () const
 Get the groups to which this platform part belongs.
void JoinGroup (WsfGroup *aGroupPtr)
 Join the given group.
void LeaveGroup (WsfGroup *aGroupPtr)
 Leave the given group.
bool IsGroupMember (WsfStringId aGroupId)
unsigned int GetUpdateEventEpoch () const
void IncrementUpdateEventEpoch ()
bool UpdateEventActive () const
 Is an 'Update' event active?
void SetUpdateEventActive (bool aUpdateEventActive)
 Indicate if the 'Update' event is active.
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)
Public Member Functions inherited from WsfComponentT< WsfPlatform >
 WsfComponentT ()
 WsfComponentT (const WsfComponentT &) noexcept
WsfComponentToperator= (const WsfComponentT &) noexcept
 ~WsfComponentT () override=default
ParentTypeGetComponentParent () const
void SetComponentParent (ParentType *aParentPtr)
Public Member Functions inherited from WsfComponent
virtual ~WsfComponent ()=default
template<typename T>
bool QueryInterfaceT (T *&aRolePtr)
bool ComponentHasRole (int aRole)
 Returns true if the component has the specified role.
virtual bool PreInitialize (double aSimTime)
virtual void PreInput ()
Public Member Functions inherited from WsfUniqueId
 WsfUniqueId ()
 Construtor initializes the unique identifier to 0.
 WsfUniqueId (const WsfUniqueId &)
 Copy constructor initializes the unique identifier to 0.
WsfUniqueIdoperator= (const WsfUniqueId &)
unsigned int GetUniqueId () const
 Get the unique identifier assigned to this object.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
Public Member Functions inherited from WsfAuxDataEnabled
 WsfAuxDataEnabled ()=default
 WsfAuxDataEnabled (const WsfAuxDataEnabled &aSrc)=default
WsfAuxDataEnabledoperator= (const WsfAuxDataEnabled &aRhs)
 WsfAuxDataEnabled (WsfAuxDataEnabled &&)=default
WsfAuxDataEnabledoperator= (WsfAuxDataEnabled &&)=default
virtual ~WsfAuxDataEnabled () noexcept
void SetAuxData (const WsfAttributeContainer &aAuxData)
void DeleteAuxData ()
 Delete the aux data container from the object.
void MergeAuxData (const WsfAuxDataEnabled &aSrc)
 Merge the object's aux data with aux data from an existing object.
void UpdateAuxData (const WsfAuxDataEnabled &aSrc)
 Update the object's aux data with aux data from an existing object.
bool HasAuxData () const
 Returns true if this object has aux data.
bool ProcessInput (UtInput &aInput)
template<typename T>
void Serialize (T &aBuff)
 (De)serialization for XIO
WsfAttributeContainerGetAuxData ()
const WsfAttributeContainerGetAuxData () const noexcept
const WsfAttributeContainerGetAuxDataConst () const noexcept

Callback objects for route changes and stage transitions.

Another object can 'connect' to these objects to receive notification when a stage transition occurs. The first argument in the callback is the current simulation time. The second argument is the actual time of the event. This may less than the current simulation time.

enum  Phase { cPHASE_PRE_BURN , cPHASE_BURN , cPHASE_POST_BURN , cPHASE_FAIL }
UtCallbackListN< void(double)> RouteChanged
UtCallbackListN< void(double, double)> StageIgnition
UtCallbackListN< void(double, double)> StageBurnout
UtCallbackListN< void(double, double)> StageSeparation
double mLaunchTime
UtEntity mExternalState
double mLastAdvanceTime
 The time to which 'mExternalState' is applicable.
double mIntegrationTimestep
 The timestep for fixed-timestep movement.
size_t mStageIndex
 The index of the current stage.
size_t mBoostCompleteStageIndex
 The index of the stage, which when the burn completes, signifies the boost phase is complete.
bool mBoostComplete
 'true' if the boost phase has been declared complete.
WsfRoute mRoute
 A route to follow (if guidance supports it).
void WriteKinematicStatus (ut::log::MessageStream &aStream)
 WsfGuidedMoverBase (const WsfGuidedMoverBase &aSrc)
virtual void AdvanceTime (double aSimTime, double aBegTime, double &aEndTime, Phase &aNextPhase)=0
void CallStagingEventScript (double aSimTime, const std::string &aScriptName)
virtual void InitiateMotion (double aSimTime, double aCurTime)
virtual bool SeparateStage (double aSimTime, size_t aStageIndex)
 The base mover only supports a single stage.
virtual bool IgniteStage (double aSimTime, size_t aStageIndex)
 The base mover only supports a single stage.
virtual void InitiateStage (double aSimTime, double aCurTime, size_t aStageIndex)
virtual void PostUpdate (double aSimTime)
void PrelaunchAdvanceTime (double aSimTime, double aCurTime)
 Advance time while still attached to the launch platform.
void PrelaunchComplete (double aSimTime, double aCurTime)
void SetInitialState (double aSimTime, double aCurTime, bool aInitiatingMotion)
virtual void WriteStagingMessage (ut::log::MessageStream &aStream, double aSimTime, double aCurTime, const std::string &aStatus, size_t aStageIndex)
virtual void WriteTrajectoryOutput (double aSimTime, double aCurTime, const double aECS_Forces[3])
 Write trajectory output if requested by the user.

Phase control

Phase mPhase
double mPhaseStartTime
 The simulation time when the phase started.
double mPreIgnitionCoastTime
 The amount of time that must elapse prior to ignition.
double mPreSeparationCoastTime
 The amount of tame that must elapse after the motor turns off and stage separation.
double mLaunchComputerBurnTime
 The time (relative to launch) when then launch computer has indicated the engines are to shut down.
WsfMoverGuidancemGuidancePtr
double mYForce
double mZForce
double mCommandedRollRate
double mCommandedPitchRate
double mCommandedYawRate
double mCommandedSpeed
double mCommandedThrottle
double mCommandedEngineStopTime
double mCommandedPreSeparationCoastTime
 Override of the pre_separation_coast_time for the NEXT stage (from EjectStage).
double mCommandedPreIgnitionCoastTime
 Override of the pre_ignition_coast_time for the CURRENT stage (from EjectStage).
double mMinimumHeightAboveTerrain
 The minimum height above terrain required for terrain following.
bool mShowStatus
 show initial conditions on standard output
bool mShowTrajectory
bool mMatchOwningPlatHeading
 If true, sets unguided mover heading to match owning platform's velocity vector, rather than orientation.
bool mCheckForGroundImpact
 If true, check for ground impact directly instead of relying on a 'fuse' processor.
UtAtmosphere mAtmosphere
double mSeaLevelPressure
double mFMM_Time
 Information captured at time of 'first missile motion' (needed by trajectory output).
double mFMM_LocWCS [3]
double mFMM_Heading
std::string mTimeHistoryPath
std::ofstream mTimeHistoryOfs
size_t mLaunchPlatformIndex
WsfWeaponmLaunchWeaponPtr

Common framework methods.

bool Initialize (double aSimTime) override
bool Initialize2 (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
void Update (double aSimTime) override

Status (on/off) methods.

void PartBroken (double aSimTime) override

Base class mover methods

WsfSpatialDomain GetSpatialDomain () const override
const WsfRouteGetRoute () const override
bool IsExtrapolating () const override
bool IsPaused () const override
bool IsStopped () const override
 Return whether the mover (and its attached platform) is stopped.
bool SetRoute (double aSimTime, const WsfRoute &aRoute) override
bool UpdateRoute (double aSimTime, const WsfRoute &aRoute) override
virtual void SetGuidance (WsfMoverGuidance *aGuidancePtr)
virtual WsfMoverGuidanceGetGuidance () const
 Get the pointer to the mover guidance object.

Command functions from the guidance computer.

virtual void SetYandZForces (double aYForce, double aZForce)
virtual void SetCommandedYawRate (double aRate)
 Set the commanded yaw rate.
virtual void SetCommandedPitchRate (double aRate)
 Set the commanded pitch rate.
virtual void SetCommandedRollRate (double aRate)
 Set the commanded roll rate.
virtual void SetCommandedSpeed (double aCommandedSpeed)
virtual void SetCommandedThrottle (double aCommandedThrottle)
virtual void SetCommandedEngineStopTime (double aStopTime)
virtual void SetMinimumHeightAboveTerrain (double aMinimum)
virtual size_t CurrentStage () const
 Currently active Stage for this object.
virtual void EjectStage (double aSimTime, double aPreSeparationCoastTime, double aPreIgnitionCoastTime)

Additional Inherited Members

Public Types inherited from WsfPlatformPart
enum  { cLEVEL_ONE_DEBUG = 0x00000001 , cLEVEL_TWO_DEBUG = 0x00000002 }
using InternalMessageQueue = std::queue<WsfMessage*>
using RecipientMessageQueue = std::queue<std::pair<WsfPlatformPart*, WsfMessage*>>
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
Public Types inherited from WsfComponentT< WsfPlatform >
typedef WsfPlatform ParentType
 This is needed to support the WsfComponentList template.
Static Public Attributes inherited from WsfMover
static const char * cTYPE_KIND = "mover"
Static Public Attributes inherited from WsfAuxDataEnabled
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataAccessed
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataDestroyed
void SetModeList (WsfModeList *aModeListPtr)
void SetUpdateTimeTolerance (double aDt)
 Revise the internal time tolerance allowed for Update() sequencing logic.
 WsfPlatformPart (const WsfPlatformPart &aSrc)
 Copy constructor (for Clone()).
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).
Protected Member Functions inherited from WsfUniqueId
void AssignUniqueId (WsfSimulation *aSimulationPtr)
double mLastUpdateTime
 The simulation time when Update was last called.
WsfVariable< double > mUpdateTimeTolerance
bool mThreadSafe
std::vector< WsfMoverMode * > mMoverModeList
 The generic list of modes (not valid until Initialize is called).
WsfStringId mModeId

Detailed Description

An abstract base class that defines an interface for guided movers.

Member Enumeration Documentation

◆ Phase

enum WsfGuidedMoverBase::Phase
protected
Enumerator
cPHASE_PRE_BURN 
cPHASE_BURN 
cPHASE_POST_BURN 
cPHASE_FAIL 

Constructor & Destructor Documentation

◆ WsfGuidedMoverBase() [1/2]

◆ ~WsfGuidedMoverBase()

WsfGuidedMoverBase::~WsfGuidedMoverBase ( )
override

◆ WsfGuidedMoverBase() [2/2]

Member Function Documentation

◆ AdvanceTime()

virtual void WsfGuidedMoverBase::AdvanceTime ( double aSimTime,
double aBegTime,
double & aEndTime,
Phase & aNextPhase )
protectedpure virtual

Advance forward in time.

This is the main function of this class. The derived class is responsible for moving time forward and pushing the updated kinematic state into the protected data member 'mExternalState'.

Parameters
aSimTimeThe true current simulation time.
aBegTimeThe beginning of the integration interval.
aEndTimeThe ending of the integration interval. This will be updated if in burn phase and the fuel source becomes empty during this interval.
aNextPhaseThe current phase. This will be updated if in the burn phase and the fuel source becomes empty during this interval.

Implemented in WsfGuidedMover.

References CallStagingEventScript(), IgniteStage(), InitiateMotion(), InitiateStage(), PostUpdate(), PrelaunchAdvanceTime(), PrelaunchComplete(), SeparateStage(), SetInitialState(), WriteStagingMessage(), and WriteTrajectoryOutput().

◆ CallStagingEventScript()

void WsfGuidedMoverBase::CallStagingEventScript ( double aSimTime,
const std::string & aScriptName )
protected

◆ CurrentStage()

virtual size_t WsfGuidedMoverBase::CurrentStage ( ) const
inlinevirtual

Currently active Stage for this object.

References mStageIndex.

◆ EjectStage()

void WsfGuidedMoverBase::EjectStage ( double aSimTime,
double aPreSeparationCoastTime,
double aPreIgnitionCoastTime )
virtual

◆ GetGuidance()

virtual WsfMoverGuidance * WsfGuidedMoverBase::GetGuidance ( ) const
inlinevirtual

Get the pointer to the mover guidance object.

References mGuidancePtr.

◆ GetRoute()

const WsfRoute * WsfGuidedMoverBase::GetRoute ( ) const
overridevirtual

Return the pointer to the current route.

Returns
A pointer to the current route or zero if a current route is not defined.

Reimplemented from WsfMover.

References mRoute.

◆ GetSpatialDomain()

WsfSpatialDomain WsfGuidedMoverBase::GetSpatialDomain ( ) const
inlineoverridevirtual

Return the spatial domain in which the mover is operating.

The spatial domain is the domain in which the mover is operating (land, sea, space, etc.).

Returns
The spatial domain in which the platform is operating. WSF_SPATIAL_DOMAIN_LAND is returned if this method is not overridden by a derived class.

Reimplemented from WsfMover.

References WSF_SPATIAL_DOMAIN_AIR.

◆ IgniteStage()

bool WsfGuidedMoverBase::IgniteStage ( double aSimTime,
size_t aStageIndex )
protectedvirtual

The base mover only supports a single stage.

Reimplemented in WsfGuidedMover.

Referenced by AdvanceTime().

◆ Initialize()

bool WsfGuidedMoverBase::Initialize ( double aSimTime)
overridevirtual

Perform phase 1 initialization. This is called by WsfPlatform::Initialize() during phase 1 initialization of the platform. The component should complete validation of input data that could not be done by ProcessInput, as well as any other functions to prepare for simulation use (subject to the next paragraph).

The order in which components are initialized is defined by GetComponentInitializationOrder. In general a component implementation of this method should not be dependent on the state of another component, i.e.: it should not assume that the other components Initialize() method has been called. If such a dependency exists one should use Initialize2() if possible, or specify a value GetComponentInitializationOrder to force things to initialize in a particular order.

Parameters
aSimTimeThe current simulation time.
Returns
true if successful or false if unsuccessful (bad input data, etc.)
Note
This method should NOT add any other components to the platform. This MUST be done in PreInitialize().

Reimplemented from WsfComponent.

References WsfPlatformPart::DebugEnabled(), WsfPlatformPart::GetPlatform(), WsfMover::Initialize(), mAtmosphere, mExternalState, mIntegrationTimestep, mLastAdvanceTime, mLaunchTime, mSeaLevelPressure, mShowStatus, WsfMover::mUpdateTimeTolerance, and ok.

Referenced by WsfGuidedMover::Initialize().

◆ Initialize2()

bool WsfGuidedMoverBase::Initialize2 ( double aSimTime)
overridevirtual

Perform phase 2 initialization. This is called by WsfPlatform::Initialize() during phase 2 of platform initialization. This method is typically used when a component may have some dependency on another component having completed its phase 1 initialization. The component should be ready for use in the simulation upon completion of this method.

The order in which components are initialized is defined by GetComponentInitializationOrder.

Parameters
aSimTimeThe current simulation time.
Returns
true if successful or false if unsuccessful.
Note
This method MUST NOT add any other components to the platform. This MUST be done in PreInitialize().

Reimplemented from WsfComponent.

References WsfWeaponEngagement::Find(), WsfLaunchComputer::GetBurnTime(), WsfComponentList::GetComponent(), WsfTrackManager::GetCurrentTarget(), WsfWeaponEngagement::GetFiringPlatformIndex(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfSimulation::GetPlatformByIndex(), WsfPlatformPart::GetSimulation(), WsfPlatform::GetTrackManager(), WsfWeaponEngagement::GetWeaponSystemName(), WsfMover::Initialize2(), InitiateStage(), mCommandedEngineStopTime, mLaunchPlatformIndex, mLaunchWeaponPtr, mPreIgnitionCoastTime, mTimeHistoryOfs, mTimeHistoryPath, ok, SetInitialState(), and trackPtr.

Referenced by WsfGuidedMover::Initialize2().

◆ InitiateMotion()

void WsfGuidedMoverBase::InitiateMotion ( double aSimTime,
double aCurTime )
protectedvirtual

Stub method that is called when the first stage ignition actually occurs.

Parameters
aSimTimeThe current simulation time.
aCurTimeThe current missile time. May be less than the simulation time.

Reimplemented in WsfGuidedMover.

Referenced by AdvanceTime(), and PrelaunchComplete().

◆ InitiateStage()

void WsfGuidedMoverBase::InitiateStage ( double aSimTime,
double aCurTime,
size_t aStageIndex )
protectedvirtual

◆ IsExtrapolating()

bool WsfGuidedMoverBase::IsExtrapolating ( ) const
inlineoverridevirtual

Return whether the mover is "extrapolating". 'Extrapolating' has a slightly different meaning depending on the mover, but it fundamentally means it is moving without any form of external guidance. In the case of a simple waypoint- following mover this means it has reached its final waypoint and has either stopped there or is continuing on at a specified direction, speed, and altitude. For movers that do not follow waypoints it is a little murkier, but it typically means that the motion is occuring without any propulsion. In this latter case it basically means that with a little knowledge an external observer could take the position at any time and use Newton's Laws to estimate future positions.

Reimplemented from WsfMover.

References mBoostComplete.

◆ IsPaused()

bool WsfGuidedMoverBase::IsPaused ( ) const
inlineoverridevirtual

Indicates that the platform is currently in "pause" mode, and is not moving, but may begin moving at some future time. Note that a "paused" platform may supply a non-zero velocity and/or acceleration, but still not move through space with advancing time.

Reimplemented from WsfMover.

References mFMM_Time.

◆ IsStopped()

bool WsfGuidedMoverBase::IsStopped ( ) const
inlineoverridevirtual

Return whether the mover (and its attached platform) is stopped.

Reimplemented from WsfMover.

References mFMM_Time.

◆ operator=()

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

References WsfGuidedMoverBase().

◆ PartBroken()

void WsfGuidedMoverBase::PartBroken ( double aSimTime)
overridevirtual

Inform the internal systems that this part is broken.

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfPlatformPart.

References cPHASE_FAIL, mBoostComplete, mBoostCompleteStageIndex, mPhase, mStageIndex, and WsfMover::PartBroken().

◆ PostUpdate()

void WsfGuidedMoverBase::PostUpdate ( double aSimTime)
protectedvirtual

Perform any post update actions to the platform. This is called by the WsfGuidedMoverBase::Update just prior to exiting. Its main purpose is to allow the derived class to perform any additional updates to the platform that could not easily be See the derived class descriptions for the actions.

Parameters
aSimTimeThe current simulation time.

Reimplemented in WsfGuidedMover.

Referenced by AdvanceTime(), and Update().

◆ PrelaunchAdvanceTime()

void WsfGuidedMoverBase::PrelaunchAdvanceTime ( double aSimTime,
double aCurTime )
protected

◆ PrelaunchComplete()

void WsfGuidedMoverBase::PrelaunchComplete ( double aSimTime,
double aCurTime )
protected

Sever the attachment to the launch platform. This is called once the 'pre-ignition coast time' for the first stage has expired. It initializes the kinematic state of the weapon in preparation for free flight.

References InitiateMotion(), mLaunchPlatformIndex, mLaunchWeaponPtr, and SetInitialState().

Referenced by AdvanceTime().

◆ ProcessInput()

bool WsfGuidedMoverBase::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 WsfRouteTypes::Get(), WsfPlatformPart::GetScenario(), mAtmosphere, mCheckForGroundImpact, mIntegrationTimestep, mMatchOwningPlatHeading, mShowStatus, mShowTrajectory, mTimeHistoryPath, WsfMover::ProcessInput(), and SetRoute().

Referenced by WsfGuidedMover::ProcessInput().

◆ SeparateStage()

bool WsfGuidedMoverBase::SeparateStage ( double aSimTime,
size_t aStageIndex )
protectedvirtual

The base mover only supports a single stage.

Reimplemented in WsfGuidedMover.

Referenced by AdvanceTime().

◆ SetCommandedEngineStopTime()

virtual void WsfGuidedMoverBase::SetCommandedEngineStopTime ( double aStopTime)
inlinevirtual

Explicitly define when the engines are to be stopped. This allows either the launch computer or user to define when the engines are to be stop.

References mCommandedEngineStopTime.

◆ SetCommandedPitchRate()

virtual void WsfGuidedMoverBase::SetCommandedPitchRate ( double aRate)
inlinevirtual

Set the commanded pitch rate.

References mCommandedPitchRate.

◆ SetCommandedRollRate()

virtual void WsfGuidedMoverBase::SetCommandedRollRate ( double aRate)
inlinevirtual

Set the commanded roll rate.

References mCommandedRollRate.

◆ SetCommandedSpeed()

virtual void WsfGuidedMoverBase::SetCommandedSpeed ( double aCommandedSpeed)
inlinevirtual

Set the commanded speed.

Parameters
aCommandedSpeedThe commanded speed (m/s). A value less than zero indicates there is no commanded speed (use the value as determined by the mover).

References mCommandedSpeed.

◆ SetCommandedThrottle()

virtual void WsfGuidedMoverBase::SetCommandedThrottle ( double aCommandedThrottle)
inlinevirtual

Set the commanded throttle setting.

Parameters
aCommandedThrottleThe commanded throttle setting in the range [0..1]. A value less than zero indicates the mover should revert to the value defined by input.

References mCommandedThrottle.

◆ SetCommandedYawRate()

virtual void WsfGuidedMoverBase::SetCommandedYawRate ( double aRate)
inlinevirtual

Set the commanded yaw rate.

References mCommandedYawRate.

◆ SetGuidance()

virtual void WsfGuidedMoverBase::SetGuidance ( WsfMoverGuidance * aGuidancePtr)
inlinevirtual

Set the pointer to the mover guidance object. Ownership is retained by the caller.

References mGuidancePtr.

◆ SetInitialState()

void WsfGuidedMoverBase::SetInitialState ( double aSimTime,
double aCurTime,
bool aInitiatingMotion )
protected

Set/update the initial kinematic state of the platform.

This method is called AT LEAST ONCE while the platform is still attached to the launching platform (i.e.: on the pad or rail). While still attached to the launching platform, the state of this platform is moved along with the motion of the launching platform. The final call to this method is made just when this platform is to start moving on its own.

A platform which has a non-zero value for 'pre_ignition_coast_time' for the first stage will result in this routine being called repeatedly to move this platform along with the launching platform. If the value is zero it will be called only once during initialization.

Parameters
aSimTimeThe current simulation time.
aCurTimeThe current missile time (may be less than aSimTime)
aInitiatingMotiontrue if this is the final call and this platform is about to start moving on its own.

References WsfPlatformPart::GetPlatform(), mExternalState, mFMM_Heading, mFMM_LocWCS, mFMM_Time, mLaunchWeaponPtr, WsfArticulatedPart::UpdatePosition(), and vel.

Referenced by AdvanceTime(), Initialize2(), PrelaunchAdvanceTime(), and PrelaunchComplete().

◆ SetMinimumHeightAboveTerrain()

virtual void WsfGuidedMoverBase::SetMinimumHeightAboveTerrain ( double aMinimum)
inlinevirtual

Set the minimum required height above terrain. This is a very crude mechanism for doing terrain following. When the guidance computer is commanded to an AGL altitude, it will set this to a 'small' positive non-zero value which the mover will then use to prevent the platform from crashing into the ground. This is necessary because the guidance doesn't do look-ahead and thus may not pull up quick enough to avoid an obstacle.

Parameters
aMinimumThe required minimum offset from the terrain. If zero then avoidance is not performed.

References mMinimumHeightAboveTerrain.

◆ SetRoute()

bool WsfGuidedMoverBase::SetRoute ( double aSimTime,
const WsfRoute & aRoute )
overridevirtual

Set the route. Replaces any that might have already been set.

Parameters
aSimTimeThe current simulated clock time (seconds).
aRouteThe new route.
Returns
true if successful.

Reimplemented from WsfMover.

References WsfPlatformPart::GetSimulation(), mRoute, RouteChanged, and WsfObserver::RouteChanged().

Referenced by ProcessInput().

◆ SetYandZForces()

virtual void WsfGuidedMoverBase::SetYandZForces ( double aYForce,
double aZForce )
inlinevirtual

Request desired lateral and vertical aerodynamic forces to be applied in the Body frame. This is merely a request, as the specified forces may not be attainable (aerodynamically) at this flight condition.

References mYForce, and mZForce.

◆ Update()

void WsfGuidedMoverBase::Update ( double aSimTime)
overridevirtual

Update the state of an platform part. Updates the platform part to reflect the state at the specified simulation time.

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfPlatformPart.

References WsfSimulation::DeletePlatform(), wsf::Terrain::GetElevInterp(), WsfPlatformPart::GetPlatform(), WsfPlatformPart::GetSimulation(), WsfPlatform::GetTerrain(), mCheckForGroundImpact, mExternalState, mIntegrationTimestep, mLastAdvanceTime, WsfMover::mLastUpdateTime, mMinimumHeightAboveTerrain, WsfMover::mUpdateTimeTolerance, and PostUpdate().

◆ UpdateRoute()

bool WsfGuidedMoverBase::UpdateRoute ( double aSimTime,
const WsfRoute & aRoute )
overridevirtual

Update the route.

Parameters
aSimTimeThe current simulated clock time (seconds).
aRouteThe new route.
Returns
true if successful.

Reimplemented from WsfMover.

References WsfPlatformPart::GetSimulation(), mRoute, RouteChanged, and WsfObserver::RouteChanged().

◆ WriteKinematicStatus()

void WsfGuidedMoverBase::WriteKinematicStatus ( ut::log::MessageStream & aStream)

A helper function to write the kinematic status of the mover to stdout. This function is invoked by the mover and the guidance computer to write out a common status message at important events. It is expected that the caller has already written out the introductory line that indicates the event that occurred.

References WsfPlatform::GetMass(), WsfPlatformPart::GetPlatform(), mAtmosphere, mFMM_LocWCS, and mFMM_Time.

Referenced by WsfGuidedMover::JettisonEjectables(), WriteStagingMessage(), and ~WsfGuidedMoverBase().

◆ WriteStagingMessage()

void WsfGuidedMoverBase::WriteStagingMessage ( ut::log::MessageStream & aStream,
double aSimTime,
double aCurTime,
const std::string & aStatus,
size_t aStageIndex )
protectedvirtual

◆ WriteTrajectoryOutput()

void WsfGuidedMoverBase::WriteTrajectoryOutput ( double aSimTime,
double aCurTime,
const double aECS_Forces[3] )
protectedvirtual

Member Data Documentation

◆ mAtmosphere

◆ mBoostComplete

bool WsfGuidedMoverBase::mBoostComplete
protected

'true' if the boost phase has been declared complete.

Referenced by IsExtrapolating(), PartBroken(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mBoostCompleteStageIndex

size_t WsfGuidedMoverBase::mBoostCompleteStageIndex
protected

The index of the stage, which when the burn completes, signifies the boost phase is complete.

Referenced by WsfGuidedMover::GetPropertyDouble(), WsfGuidedMover::Initialize(), WsfGuidedMover::InitiateStage(), PartBroken(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mCheckForGroundImpact

bool WsfGuidedMoverBase::mCheckForGroundImpact
protected

If true, check for ground impact directly instead of relying on a 'fuse' processor.

Referenced by ProcessInput(), Update(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mCommandedEngineStopTime

double WsfGuidedMoverBase::mCommandedEngineStopTime
protected

The absolute simulation time when the engines are commanded explicitly commanded to stop. It can be set either from the launch computer or via explicit script command. If not defined then the engines will burn until they run out of fuel.

Referenced by EjectStage(), Initialize2(), SetCommandedEngineStopTime(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mCommandedPitchRate

double WsfGuidedMoverBase::mCommandedPitchRate
protected

◆ mCommandedPreIgnitionCoastTime

double WsfGuidedMoverBase::mCommandedPreIgnitionCoastTime
protected

Override of the pre_ignition_coast_time for the CURRENT stage (from EjectStage).

Referenced by EjectStage(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mCommandedPreSeparationCoastTime

double WsfGuidedMoverBase::mCommandedPreSeparationCoastTime
protected

Override of the pre_separation_coast_time for the NEXT stage (from EjectStage).

Referenced by EjectStage(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mCommandedRollRate

double WsfGuidedMoverBase::mCommandedRollRate
protected

◆ mCommandedSpeed

double WsfGuidedMoverBase::mCommandedSpeed
protected

◆ mCommandedThrottle

double WsfGuidedMoverBase::mCommandedThrottle
protected

◆ mCommandedYawRate

double WsfGuidedMoverBase::mCommandedYawRate
protected

◆ mExternalState

UtEntity WsfGuidedMoverBase::mExternalState
protected

The following is the entity state into which derived class AdvanceTime method should push their final kinematic state. The base class Update will use this to maintain the state of the entity as seen by the simulation. The two may differ because the derived class may run only on fixed time steps and the base class must extrapolate from the last timestep to get an intermediate position before the next timestep.

Referenced by WsfGuidedMover::Initialize(), Initialize(), SetInitialState(), Update(), WsfGuidedMover::UpdateExternalState(), WriteTrajectoryOutput(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mFMM_Heading

double WsfGuidedMoverBase::mFMM_Heading
protected

◆ mFMM_LocWCS

◆ mFMM_Time

double WsfGuidedMoverBase::mFMM_Time
protected

Information captured at time of 'first missile motion' (needed by trajectory output).

Referenced by WsfGuidedMover::InitiateMotion(), IsPaused(), IsStopped(), SetInitialState(), WriteKinematicStatus(), WriteTrajectoryOutput(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mGuidancePtr

◆ mIntegrationTimestep

double WsfGuidedMoverBase::mIntegrationTimestep
protected

◆ mLastAdvanceTime

double WsfGuidedMoverBase::mLastAdvanceTime
protected

The time to which 'mExternalState' is applicable.

Referenced by Initialize(), Update(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mLaunchComputerBurnTime

double WsfGuidedMoverBase::mLaunchComputerBurnTime
protected

The time (relative to launch) when then launch computer has indicated the engines are to shut down.

Referenced by WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mLaunchPlatformIndex

size_t WsfGuidedMoverBase::mLaunchPlatformIndex
protected

The following is true if the weapon to be held on the pad/rail during the pre-ignition time for the first stage.

Referenced by Initialize2(), PrelaunchAdvanceTime(), PrelaunchComplete(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mLaunchTime

double WsfGuidedMoverBase::mLaunchTime
protected

◆ mLaunchWeaponPtr

WsfWeapon* WsfGuidedMoverBase::mLaunchWeaponPtr
protected

◆ mMatchOwningPlatHeading

bool WsfGuidedMoverBase::mMatchOwningPlatHeading
protected

If true, sets unguided mover heading to match owning platform's velocity vector, rather than orientation.

Referenced by WsfGuidedMover::InitiateMotion(), ProcessInput(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mMinimumHeightAboveTerrain

double WsfGuidedMoverBase::mMinimumHeightAboveTerrain
protected

The minimum height above terrain required for terrain following.

Referenced by SetMinimumHeightAboveTerrain(), Update(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mPhase

◆ mPhaseStartTime

◆ mPreIgnitionCoastTime

double WsfGuidedMoverBase::mPreIgnitionCoastTime
protected

The amount of time that must elapse prior to ignition.

Referenced by Initialize2(), WsfGuidedMover::InitiateStage(), InitiateStage(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mPreSeparationCoastTime

double WsfGuidedMoverBase::mPreSeparationCoastTime
protected

The amount of tame that must elapse after the motor turns off and stage separation.

Referenced by WsfGuidedMover::InitiateStage(), InitiateStage(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mRoute

WsfRoute WsfGuidedMoverBase::mRoute
protected

A route to follow (if guidance supports it).

Referenced by GetRoute(), SetRoute(), UpdateRoute(), WsfGuidedMoverBase(), and WsfGuidedMoverBase().

◆ mSeaLevelPressure

◆ mShowStatus

◆ mShowTrajectory

bool WsfGuidedMoverBase::mShowTrajectory
protected

◆ mStageIndex

◆ mTimeHistoryOfs

std::ofstream WsfGuidedMoverBase::mTimeHistoryOfs
protected

◆ mTimeHistoryPath

std::string WsfGuidedMoverBase::mTimeHistoryPath
protected

◆ mYForce

◆ mZForce

◆ RouteChanged

UtCallbackListN<void(double)> WsfGuidedMoverBase::RouteChanged

◆ StageBurnout

UtCallbackListN<void(double, double)> WsfGuidedMoverBase::StageBurnout

◆ StageIgnition

UtCallbackListN<void(double, double)> WsfGuidedMoverBase::StageIgnition

◆ StageSeparation

UtCallbackListN<void(double, double)> WsfGuidedMoverBase::StageSeparation

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