WSF
WsfGuidedMover Class Reference

#include <WsfGuidedMover.hpp>

Inheritance diagram for WsfGuidedMover:
Collaboration diagram for WsfGuidedMover:

Classes

class  Stage
class  KinematicState
class  State
class  Ejectable
struct  RK2_StepFunction
 Take a step using second-order Runge-Kutta. More...
struct  RK4_StepFunction
 Take a step using fourth-order Runge-Kutta. More...

Public Types

enum  CoordinateFrame { cCF_WCS , cCF_ECI }
using CurvePtr = UtCloneablePtr<UtTable::Curve>
using TablePtr = UtCloneablePtr<UtTable::Table>
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.

Public Member Functions

 WsfGuidedMover (WsfScenario &aScenario, bool aGuidanceOn=true)
 ~WsfGuidedMover () override=default
WsfGuidedMoveroperator= (const WsfGuidedMover &)=delete
Public Member Functions inherited from WsfGuidedMoverBase
 WsfGuidedMoverBase (WsfScenario &aScenario)
 ~WsfGuidedMoverBase () override
WsfGuidedMoverBaseoperator= (const WsfGuidedMoverBase &)=delete
void WriteKinematicStatus (ut::log::MessageStream &aStream)
bool Initialize (double aSimTime) override
bool Initialize2 (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
void Update (double aSimTime) override
void PartBroken (double aSimTime) override
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.
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)
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
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 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

Accessors for script methods

enum  IntegrationMethod { cTRAPEZOIDAL , cRK2 , cRK4 }
std::vector< StagemStageList
 The list of stages.
bool mExplicitStageUsed
 'true' if a 'stage' command was used
bool mImplicitStageUsed
 'true' if a stage was defined without using 'stage'
std::vector< EjectablemEjectables
 The list of eject-able objects.
double mDivertThrust
double mDivertFuelFlowRate
double mDivertMinAlt
double mDivertMaxAlt
UtCloneablePtr< UtTable::Table > mTimeConstantPtr
 airframe time constant
CoordinateFrame mDesiredCoordinateFrame
IntegrationMethod mIntegrationMethod
bool mGuidanceOn
bool mVerifyValues
double mCommandedYaw
double mCommandedPitch
double mCommandedRoll
double mLastYaw
double mLastPitch
double mLastRoll
double mLastAeroForcesECS [3]
double mLastMach
 For tracking Mach 1 crossing for show_status.
double mLastQ
 For tracking MaxQ for show_status.
double mMaxQ
double mIV_Values [6]
State mCurState
 The current entity state.
State mTempState1
 Temporary state for RK2/RK4 integration.
State mTempState2
 Temporary state for RK4 integration.
State mTempState3
 Temporary state for RK4 integration.
UtEntity mTempEntity
 Temporary entity for WCS<->ECI conversions.
std::unique_ptr< WsfGuidedMoverTestObjectmTestSupportObjectPtr
ut::CloneablePtr< UtECI_Conversion > mECI_ConversionPtr {nullptr}
double mECI_UpdateTime {0.0}
double mECI_LastUpdateTime {0.0}
bool mComputeForcesEachSubstep {false}
double GetCurrentThrust () const
void GetAeroForcesECS (double aAeroForcesECS[3]) const
void GetThrustForcesECS (double aThrustForcesECS[3]) const
double GetMaximumLateralAerodynamicForce () const
double GetDynamicPressure () const
double GetGravitationalAcceleration () const
size_t GetNumStages () const
double GetEmptyMass () const
double GetFuelMass () const
double GetPayloadMass () const
double GetTotalMass () const
double GetEmptyMass (size_t aStageIndex) const
double GetFuelMass (size_t aStageIndex) const
double GetPayloadMass (size_t aStageIndex) const
double GetTotalMass (size_t aStageIndex) const
double GetCurrentFuelMass () const
double GetCurrentTotalMass () const
double GetCurrentFuelFlowRate () const
double GetLevelFlightThrust (double aSimTime, double aAltitude_m, double aMach) const
double GetLevelFlightDrag (double aAltitude_m, double aMach, double aWeight_N) const
double GetLevelFlightFuelBurnRate (double aSimTime, double aAltitude_m, double aSpeed_mps, double aWeight_N) const
 WsfGuidedMover (const WsfGuidedMover &aSrc)
void AdvanceTime (double aSimTime, double aBegTime, double &aEndTime, Phase &aNextPhase) override
void AdvanceTimeSinglestep (double aSimTime, double aBegTime, double &aEndTime, Phase &aNextPhase)
void AdvanceTimeMultistep (double aSimTime, double aBegTime, double aEndTime, Phase &aNextPhase)
void InitiateMotion (double aSimTime, double aCurTime) override
bool SeparateStage (double aSimTime, size_t aStageIndex) override
 The base mover only supports a single stage.
bool IgniteStage (double aSimTime, size_t aStageIndex) override
 The base mover only supports a single stage.
void InitiateStage (double aSimTime, double aCurTime, size_t aStageIndex) override
void PostUpdate (double aSimTime) override
void AdvanceTimeLegacyRK2 (double aSimTime, State &aState, const double aAppliedForcesECS[3])
void AdvanceTimeLegacyRK4 (double aSimTime, State &aState, const double aAppliedForcesECS[3])
void AdvanceTimeTrapezoidal (double aSimTime, State &aState, const double aAppliedForcesECS[3])
template<typename StepFunction>
void AdvanceTimeRK (double aSimTime, double aBegTime, double aEndTime)
 This method takes a Runge-Kutta step.
void ComputeDivertForces (double aDeltaTime, State &aState, double aCommandedForceY, double aCommandedForceZ, double aAppliedForcesECS[3], double aDivertThrustForcesECS[3]) const
void ComputeThrustForces (double aSimTime, double aDeltaTime, State &aState, Stage &aStage, double aThrustForceECS[3]) const
double GetHorizontalThrust (double aSimTime, double aDeltaTime, State &aState, double aCommandedThrottle, const double aIV_Values[6], Stage &aCurrentStage) const
void ComputeVectoredThrustForces (double aSimTime, double aCommandedForceY, double aCommandedForceZ, const Stage &aStage, double aThrustForceECS[3]) const
void ComputeAeroForces (double aSimTime, double aDeltaT, const Stage &aStage, const double aThrustForcesECS[3], double aAeroForcesECS[3]) const
void ComputeThrustForCommandedSpeed (double aDeltaT, State &aState, const Stage &aStage, const double aAeroForcesECS[3], double aThrustForcesECS[3]) const
double GetTimeConstant (const Stage &aStage) const
 Get the aerodynamic time constant.
void ComputeFullForces (double aSimTime, double aBegTime, double aEndTime, State &aRHS_State, Stage &aRHS_Stage) const
void IntegrateEOM (double aDeltaTime, const double aAppliedForcesECS[3], State &aOutState, State &aInState1, State &aInState2)
void JettisonEjectables (double aSimTime)
 Jettison eject-ables that meet the criteria for ejection.
bool SelectCoordinateFrame (const State &aState, CoordinateFrame &aTargetFrame) const
void SwitchCoordinateFrame (State &aState, CoordinateFrame aTargetFrame)
void UpdateExternalState (State &aState)
 Propagate the internal spherical WCS values to ellipsoidal values that are used externally.
UtECI_Conversion & GetECI_Conversion ()
 Get the ECI conversion object. You MUST call this method, instead of directly accessing the object.

Common framework methods.

WsfMoverClone () const override
bool Initialize (double aSimTime) override
bool Initialize2 (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
const char * GetScriptClassName () const override

Common mover methods.

bool GetPropertyDouble (const std::string &aPropertyName, double &aProperty) override
void GetCommandedAttitude (double &aYaw, double &aPitch, double &aRoll) const
double GetDivertThrust () const
double GetDivertFuelMass () const
WsfGuidedMoverTestObjectGetTestSupportObject () const

Additional Inherited Members

UtCallbackListN< void(double)> RouteChanged
UtCallbackListN< void(double, double)> StageIgnition
UtCallbackListN< void(double, double)> StageBurnout
UtCallbackListN< void(double, double)> StageSeparation
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
Protected Types inherited from WsfGuidedMoverBase
enum  Phase { cPHASE_PRE_BURN , cPHASE_BURN , cPHASE_POST_BURN , cPHASE_FAIL }
 WsfGuidedMoverBase (const WsfGuidedMoverBase &aSrc)
void CallStagingEventScript (double aSimTime, const std::string &aScriptName)
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.
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 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).
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
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

A specialized mover that imposes a Newtonian dynamics model upon a platform, from specified mass properties, applied Aerodynamic forces, and via steering commands issued from a WsfGuidanceComputer.

This implementation assumes a missile-like attack vehicle, with aerodynamics that influence its flight path. The guidance commands will be externally pushed into this object by a processor (such as WsfGuidanceComputer). Termination of flight due to target or ground impact will also be handled by some other means (such as WsfWeaponFuse).

The Mover may not be powered, but multiple stages may be specified with different thrust values and discontinuous changes in aerodynamics, mass properties, and thrust.

Member Typedef Documentation

◆ CurvePtr

using WsfGuidedMover::CurvePtr = UtCloneablePtr<UtTable::Curve>

◆ TablePtr

using WsfGuidedMover::TablePtr = UtCloneablePtr<UtTable::Table>

Member Enumeration Documentation

◆ CoordinateFrame

Enumerator
cCF_WCS 
cCF_ECI 

◆ IntegrationMethod

Enumerator
cTRAPEZOIDAL 
cRK2 
cRK4 

Constructor & Destructor Documentation

◆ WsfGuidedMover() [1/2]

◆ ~WsfGuidedMover()

WsfGuidedMover::~WsfGuidedMover ( )
overridedefault

◆ WsfGuidedMover() [2/2]

Member Function Documentation

◆ AdvanceTime()

void WsfGuidedMover::AdvanceTime ( double aSimTime,
double aBegTime,
double & aEndTime,
Phase & aNextPhase )
overrideprotectedvirtual

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.

Implements WsfGuidedMoverBase.

References AdvanceTimeMultistep(), AdvanceTimeSinglestep(), cCF_ECI, cTRAPEZOIDAL, WsfObject::GetName(), WsfPlatformPart::GetPlatform(), JettisonEjectables(), WsfGuidedMoverBase::mAtmosphere, mCommandedPitch, WsfGuidedMoverBase::mCommandedPitchRate, mCommandedRoll, WsfGuidedMoverBase::mCommandedRollRate, mCommandedYaw, WsfGuidedMoverBase::mCommandedYawRate, mComputeForcesEachSubstep, mCurState, mDesiredCoordinateFrame, mEjectables, mIntegrationMethod, mLastMach, mLastQ, WsfGuidedMoverBase::mLaunchTime, mMaxQ, WsfGuidedMoverBase::mShowStatus, WsfPlatform::SetFuelMass(), UpdateExternalState(), and WsfGuidedMoverBase::WriteTrajectoryOutput().

◆ AdvanceTimeLegacyRK2()

void WsfGuidedMover::AdvanceTimeLegacyRK2 ( double aSimTime,
State & aState,
const double aAppliedForcesECS[3] )
protected

◆ AdvanceTimeLegacyRK4()

◆ AdvanceTimeMultistep()

void WsfGuidedMover::AdvanceTimeMultistep ( double aSimTime,
double aBegTime,
double aEndTime,
Phase & aNextPhase )
protected

◆ AdvanceTimeRK()

template<typename StepFunction>
void WsfGuidedMover::AdvanceTimeRK ( double aSimTime,
double aBegTime,
double aEndTime )
inlineprotected

◆ AdvanceTimeSinglestep()

◆ AdvanceTimeTrapezoidal()

◆ Clone()

WsfMover * WsfGuidedMover::Clone ( ) const
overridevirtual

Clone this object.

Returns
a pointer to the new object.

Implements WsfMover.

References WsfGuidedMover(), and WsfMover::WsfMover().

◆ ComputeAeroForces()

void WsfGuidedMover::ComputeAeroForces ( double aSimTime,
double aDeltaT,
const Stage & aStage,
const double aThrustForcesECS[3],
double aAeroForcesECS[3] ) const
protected

◆ ComputeDivertForces()

void WsfGuidedMover::ComputeDivertForces ( double aDeltaTime,
State & aState,
double aCommandedForceY,
double aCommandedForceZ,
double aAppliedForcesECS[3],
double aDivertThrustForcesECS[3] ) const
protected

◆ ComputeFullForces()

◆ ComputeThrustForces()

void WsfGuidedMover::ComputeThrustForces ( double aSimTime,
double aDeltaTime,
State & aState,
Stage & aStage,
double aThrustForceECS[3] ) const
protected

◆ ComputeThrustForCommandedSpeed()

void WsfGuidedMover::ComputeThrustForCommandedSpeed ( double aDeltaT,
State & aState,
const Stage & aStage,
const double aAeroForcesECS[3],
double aThrustForcesECS[3] ) const
protected

◆ ComputeVectoredThrustForces()

void WsfGuidedMover::ComputeVectoredThrustForces ( double aSimTime,
double aCommandedForceY,
double aCommandedForceZ,
const Stage & aStage,
double aThrustForceECS[3] ) const
protected

◆ GetAeroForcesECS()

void WsfGuidedMover::GetAeroForcesECS ( double aAeroForcesECS[3]) const
inline

References mLastAeroForcesECS.

◆ GetCommandedAttitude()

void WsfGuidedMover::GetCommandedAttitude ( double & aYaw,
double & aPitch,
double & aRoll ) const

Return the commanded attitude angles. This is called by WsfGuidanceProgram::AttitudeProgram to retrieve the current commanded attitude angles. These are the angles that have been applied by the user command in addition to the standard velocity-vector aligned coordinate system.

Parameters
aYawThe current yaw angle.
aPitchThe current pitch angle.
aRollThe current roll angle.

References mCommandedPitch, mCommandedRoll, and mCommandedYaw.

Referenced by operator=().

◆ GetCurrentFuelFlowRate()

double WsfGuidedMover::GetCurrentFuelFlowRate ( ) const
inline

References mCurState.

◆ GetCurrentFuelMass()

double WsfGuidedMover::GetCurrentFuelMass ( ) const
inline

References mCurState.

◆ GetCurrentThrust()

double WsfGuidedMover::GetCurrentThrust ( ) const
inline

References mCurState.

◆ GetCurrentTotalMass()

double WsfGuidedMover::GetCurrentTotalMass ( ) const
inline

◆ GetDivertFuelMass()

double WsfGuidedMover::GetDivertFuelMass ( ) const
inline

References mCurState.

◆ GetDivertThrust()

double WsfGuidedMover::GetDivertThrust ( ) const
inline

References mDivertThrust.

◆ GetDynamicPressure()

double WsfGuidedMover::GetDynamicPressure ( ) const

◆ GetECI_Conversion()

UtECI_Conversion & WsfGuidedMover::GetECI_Conversion ( )
protected

Get the ECI conversion object. You MUST call this method, instead of directly accessing the object.

References WsfPlatformPart::GetSimulation(), mECI_ConversionPtr, mECI_LastUpdateTime, and mECI_UpdateTime.

Referenced by SwitchCoordinateFrame().

◆ GetEmptyMass() [1/2]

double WsfGuidedMover::GetEmptyMass ( ) const

◆ GetEmptyMass() [2/2]

double WsfGuidedMover::GetEmptyMass ( size_t aStageIndex) const

References mStageList.

◆ GetFuelMass() [1/2]

double WsfGuidedMover::GetFuelMass ( ) const

◆ GetFuelMass() [2/2]

double WsfGuidedMover::GetFuelMass ( size_t aStageIndex) const

References mStageList.

◆ GetGravitationalAcceleration()

double WsfGuidedMover::GetGravitationalAcceleration ( ) const

◆ GetHorizontalThrust()

◆ GetLevelFlightDrag()

double WsfGuidedMover::GetLevelFlightDrag ( double aAltitude_m,
double aMach,
double aWeight_N ) const

◆ GetLevelFlightFuelBurnRate()

double WsfGuidedMover::GetLevelFlightFuelBurnRate ( double aSimTime,
double aAltitude_m,
double aSpeed_mps,
double aWeight_N ) const

◆ GetLevelFlightThrust()

double WsfGuidedMover::GetLevelFlightThrust ( double aSimTime,
double aAltitude_m,
double aMach ) const

◆ GetMaximumLateralAerodynamicForce()

double WsfGuidedMover::GetMaximumLateralAerodynamicForce ( ) const

◆ GetNumStages()

size_t WsfGuidedMover::GetNumStages ( ) const
inline

References mStageList.

◆ GetPayloadMass() [1/2]

double WsfGuidedMover::GetPayloadMass ( ) const

◆ GetPayloadMass() [2/2]

double WsfGuidedMover::GetPayloadMass ( size_t aStageIndex) const

References mStageList.

◆ GetPropertyDouble()

bool WsfGuidedMover::GetPropertyDouble ( const std::string & aPropertyName,
double & aProperty )
overridevirtual

Get the value of a floating point property from either a derived-class set of properties or the common set of properties.

Reimplemented from WsfMover.

References WsfPlatform::GetEmptyMass(), WsfPlatform::GetPayloadMass(), WsfPlatformPart::GetPlatform(), WsfMover::GetPropertyDouble(), WsfGuidedMoverBase::mBoostCompleteStageIndex, mCurState, WsfGuidedMoverBase::mPhaseStartTime, WsfGuidedMoverBase::mStageIndex, and mStageList.

◆ GetScriptClassName()

const char * WsfGuidedMover::GetScriptClassName ( ) const
override

◆ GetTestSupportObject()

WsfGuidedMoverTestObject * WsfGuidedMover::GetTestSupportObject ( ) const
inline

References mTestSupportObjectPtr.

◆ GetThrustForcesECS()

void WsfGuidedMover::GetThrustForcesECS ( double aThrustForcesECS[3]) const
inline

References mCurState.

◆ GetTimeConstant()

double WsfGuidedMover::GetTimeConstant ( const Stage & aStage) const
protected

Get the aerodynamic time constant.

References mIV_Values, mTimeConstantPtr, and WsfGuidedMover::Stage::mTimeConstantPtr.

Referenced by ComputeAeroForces().

◆ GetTotalMass() [1/2]

double WsfGuidedMover::GetTotalMass ( ) const

◆ GetTotalMass() [2/2]

double WsfGuidedMover::GetTotalMass ( size_t aStageIndex) const

◆ IgniteStage()

bool WsfGuidedMover::IgniteStage ( double aSimTime,
size_t aStageIndex )
overrideprotectedvirtual

The base mover only supports a single stage.

Reimplemented from WsfGuidedMoverBase.

References WsfSimulation::GetRandom(), WsfPlatformPart::GetSimulation(), mStageList, and WsfPlatformPart::SetDamageFactor().

◆ Initialize()

bool WsfGuidedMover::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 cRK2, cRK4, WsfPlatformPart::DebugEnabled(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfPlatformPart::GetSimulation(), WsfGuidedMover::Stage::Initialize(), WsfGuidedMoverBase::Initialize(), WsfGuidedMoverBase::mBoostCompleteStageIndex, mComputeForcesEachSubstep, mCurState, mDivertFuelFlowRate, mDivertThrust, mEjectables, WsfGuidedMover::Stage::mEmptyMass, WsfGuidedMoverBase::mExternalState, WsfGuidedMover::Stage::mFuelMass, mIntegrationMethod, WsfGuidedMover::Stage::mIntegrationTimestep, WsfGuidedMoverBase::mIntegrationTimestep, WsfGuidedMover::Stage::mPayloadMass, WsfGuidedMoverBase::mShowStatus, mStageList, mTempEntity, WsfGuidedMover::Stage::mThrust, ok, and WsfGuidedMover::Stage::ShowStatus().

◆ Initialize2()

bool WsfGuidedMover::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 WsfGuidedMoverBase::Initialize2(), and ok.

◆ InitiateMotion()

◆ InitiateStage()

◆ IntegrateEOM()

void WsfGuidedMover::IntegrateEOM ( double aDeltaTime,
const double aAppliedForcesECS[3],
State & aOutState,
State & aInState1,
State & aInState2 )
protected

◆ JettisonEjectables()

void WsfGuidedMover::JettisonEjectables ( double aSimTime)
protected

◆ operator=()

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

◆ PostUpdate()

void WsfGuidedMover::PostUpdate ( double aSimTime)
overrideprotectedvirtual

Perform any post update actions to the platform. This is called by the WsfGuidedMoverBase::Update just prior to exiting. The reason this exists is that mExternalState (the state pushed to the platform prior to calling guidance and aero) must not have any extra rotations other that provided by the standard orientation-to-velocity-vector (WsfGuidanceComputer assumes this!.) Because we allow extra orientations through angle_of_attack table, bank_to_turn and explicit attitude control programs, these must be applied just prior to exiting update.

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfGuidedMoverBase.

References WsfGuidedMover::Stage::cBANK_TO_TURN, WsfPlatform::GetMass(), WsfPlatformPart::GetPlatform(), WsfGuidedMover::Stage::mAngleOfAttackPtr, mCommandedPitch, mCommandedRoll, mCommandedYaw, mIV_Values, mLastAeroForcesECS, mLastPitch, mLastRoll, WsfMover::mLastUpdateTime, mLastYaw, WsfGuidedMoverBase::mStageIndex, mStageList, and WsfGuidedMover::Stage::mTurnMethod.

◆ ProcessInput()

bool WsfGuidedMover::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 cCF_ECI, cCF_WCS, cRK2, cRK4, cTRAPEZOIDAL, mComputeForcesEachSubstep, mCurState, mDesiredCoordinateFrame, mDivertFuelFlowRate, mDivertMaxAlt, mDivertMinAlt, mDivertThrust, mEjectables, mExplicitStageUsed, mImplicitStageUsed, mIntegrationMethod, mStageList, mTimeConstantPtr, mVerifyValues, ProcessInput(), and WsfGuidedMoverBase::ProcessInput().

Referenced by ProcessInput().

◆ SelectCoordinateFrame()

bool WsfGuidedMover::SelectCoordinateFrame ( const State & aState,
CoordinateFrame & aTargetFrame ) const
protected

◆ SeparateStage()

bool WsfGuidedMover::SeparateStage ( double aSimTime,
size_t aStageIndex )
overrideprotectedvirtual

The base mover only supports a single stage.

Reimplemented from WsfGuidedMoverBase.

References WsfSimulation::GetRandom(), WsfPlatformPart::GetSimulation(), mStageList, and WsfPlatformPart::SetDamageFactor().

◆ SwitchCoordinateFrame()

◆ UpdateExternalState()

Member Data Documentation

◆ mCommandedPitch

double WsfGuidedMover::mCommandedPitch
protected

◆ mCommandedRoll

double WsfGuidedMover::mCommandedRoll
protected

◆ mCommandedYaw

double WsfGuidedMover::mCommandedYaw
protected

◆ mComputeForcesEachSubstep

bool WsfGuidedMover::mComputeForcesEachSubstep {false}
protected

◆ mCurState

◆ mDesiredCoordinateFrame

◆ mDivertFuelFlowRate

double WsfGuidedMover::mDivertFuelFlowRate
protected

◆ mDivertMaxAlt

double WsfGuidedMover::mDivertMaxAlt
protected

◆ mDivertMinAlt

double WsfGuidedMover::mDivertMinAlt
protected

◆ mDivertThrust

double WsfGuidedMover::mDivertThrust
protected

◆ mECI_ConversionPtr

ut::CloneablePtr<UtECI_Conversion> WsfGuidedMover::mECI_ConversionPtr {nullptr}
protected

◆ mECI_LastUpdateTime

double WsfGuidedMover::mECI_LastUpdateTime {0.0}
protected

Referenced by GetECI_Conversion().

◆ mECI_UpdateTime

double WsfGuidedMover::mECI_UpdateTime {0.0}
protected

◆ mEjectables

std::vector<Ejectable> WsfGuidedMover::mEjectables
protected

◆ mExplicitStageUsed

bool WsfGuidedMover::mExplicitStageUsed
protected

'true' if a 'stage' command was used

Referenced by ProcessInput(), WsfGuidedMover(), and WsfGuidedMover().

◆ mGuidanceOn

bool WsfGuidedMover::mGuidanceOn
protected

◆ mImplicitStageUsed

bool WsfGuidedMover::mImplicitStageUsed
protected

'true' if a stage was defined without using 'stage'

Referenced by ProcessInput(), WsfGuidedMover(), and WsfGuidedMover().

◆ mIntegrationMethod

◆ mIV_Values

◆ mLastAeroForcesECS

double WsfGuidedMover::mLastAeroForcesECS[3]
protected

◆ mLastMach

double WsfGuidedMover::mLastMach
protected

For tracking Mach 1 crossing for show_status.

Referenced by AdvanceTime(), InitiateMotion(), WsfGuidedMover(), and WsfGuidedMover().

◆ mLastPitch

double WsfGuidedMover::mLastPitch
protected

◆ mLastQ

double WsfGuidedMover::mLastQ
protected

For tracking MaxQ for show_status.

Referenced by AdvanceTime(), WsfGuidedMover(), and WsfGuidedMover().

◆ mLastRoll

double WsfGuidedMover::mLastRoll
protected

◆ mLastYaw

double WsfGuidedMover::mLastYaw
protected

◆ mMaxQ

double WsfGuidedMover::mMaxQ
protected

◆ mStageList

◆ mTempEntity

UtEntity WsfGuidedMover::mTempEntity
protected

Temporary entity for WCS<->ECI conversions.

Referenced by Initialize(), UpdateExternalState(), WsfGuidedMover(), and WsfGuidedMover().

◆ mTempState1

State WsfGuidedMover::mTempState1
protected

Temporary state for RK2/RK4 integration.

Referenced by AdvanceTimeLegacyRK2(), AdvanceTimeLegacyRK4(), WsfGuidedMover(), and WsfGuidedMover().

◆ mTempState2

State WsfGuidedMover::mTempState2
protected

Temporary state for RK4 integration.

Referenced by AdvanceTimeLegacyRK4(), WsfGuidedMover(), and WsfGuidedMover().

◆ mTempState3

State WsfGuidedMover::mTempState3
protected

Temporary state for RK4 integration.

Referenced by AdvanceTimeLegacyRK4(), WsfGuidedMover(), and WsfGuidedMover().

◆ mTestSupportObjectPtr

std::unique_ptr<WsfGuidedMoverTestObject> WsfGuidedMover::mTestSupportObjectPtr
protected

◆ mTimeConstantPtr

UtCloneablePtr<UtTable::Table> WsfGuidedMover::mTimeConstantPtr
protected

airframe time constant

Referenced by GetTimeConstant(), ProcessInput(), WsfGuidedMover(), and WsfGuidedMover().

◆ mVerifyValues

bool WsfGuidedMover::mVerifyValues
protected

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