WSF
wsf::six_dof::GuidanceComputer Class Reference

#include <WsfSixDOF_GuidanceComputer.hpp>

Inheritance diagram for wsf::six_dof::GuidanceComputer:
Collaboration diagram for wsf::six_dof::GuidanceComputer:

Public Member Functions

 GuidanceComputer ()=delete
 GuidanceComputer (WsfScenario &aScenarioPtr)
 ~GuidanceComputer ()=default
GuidanceComputeroperator= (const GuidanceComputer &other)=delete
WsfProcessorClone () const override
bool Initialize (double aSimTime) override
void TurnOff (double aSimTime) override
void TurnOn (double aSimTime) override
void UpdateGuidance (double aSimTime, double aCurTime, double aEndTime) override
double GetCommandedAltitude ()
double GetCommandedSpeed ()
bool GetAllowRouteFollowing ()
bool StopEngines () override
 Called from script interface to command the mover to stop the engines.
void RouteChanged (double aSimTime) override
void StageIgnition (double aSimTime, double aEventTime) override
void StageBurnout (double aSimTime, double aEventTime) override
void StageSeparation (double aSimTime, double aEventTime) override
Public Member Functions inherited from WsfGuidanceComputer
 WsfGuidanceComputer (WsfScenario &aScenarioPtr)
 ~WsfGuidanceComputer () override
WsfGuidanceComputeroperator= (const WsfGuidanceComputer &)=delete
virtual void SensorTrackInitiated (double aSimTime, WsfSensor *aSensorPtr, const WsfTrack *aTrackPtr)
bool ShowStatus () const
bool ShowDiagnostics () const
bool ShowGraphics () const
PhaseGetCurrentPhase ()
double GetCommandedFlightPathAngle () const
double GetLastFlightPathAngle () const
double GetLaunchComputerFlightPathAngle () const
double GetTimeConstant (const Phase &aPhase) const
 Return the guidance time constant for the legacy guidance program.
double GetTimeSinceLaunch (double aSimTime)
double GetTimeSincePhaseStart (double aSimTime)
double GetLastUpdateTime () const
void DrawPoint (double aRedValue, double aGreenValue, double aBlueValue, int aPointSize)
void PrintStatusHeader (double aSimTime, double aCurTime, ut::log::MessageStream &aStream)
WsfProcessorClone () const override
bool Initialize (double aSimTime) override
bool Initialize2 (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
void TurnOff (double aSimTime) override
void TurnOn (double aSimTime) override
const char * GetScriptClassName () const override
void UpdateGuidance (double aSimTime, double aCurTime, double aEndTime) override
bool SelectPhase (WsfStringId aPhaseName)
bool ClearCommandedAltitude (WsfStringId aPhaseName)
bool ClearCommandedFlightPathAngle (WsfStringId aPhaseName)
bool ClearCommandedSpeed (WsfStringId aPhaseName)
bool ClearCommandedThrottle (WsfStringId aPhaseName)
bool SetAllowRouteFollowing (WsfStringId aPhaseName, bool aValue)
bool SetAimpointAltitudeOffset (WsfStringId aPhaseName, double aValue)
bool SetAimpointAzimuthOffset (WsfStringId aPhaseName, double aValue, const std::string &aDirection)
bool SetAimpointRangeOffset (WsfStringId aPhaseName, double aValue)
bool SetAimpointEvaluationInterval (WsfStringId aPhaseName, double aValue)
bool SetCommandedAltitude (WsfStringId aPhaseName, double aValue, bool aAltIsAGL)
bool SetCommandedAzimuthOffset (WsfStringId aPhaseName, double aValue)
bool SetCommandedFlightPathAngle (WsfStringId aPhaseName, double aValue)
bool SetCommandedMach (WsfStringId aPhaseName, double aValue)
bool SetCommandedSpeed (WsfStringId aPhaseName, double aValue)
bool SetCommandedThrottle (WsfStringId aPhaseName, double aValue)
bool SetGuidanceDelay (WsfStringId aPhaseName, double aValue)
bool SetGuidanceTarget (WsfStringId aPhaseName, const std::string &aValue)
bool SetProportionalNavigationGain (WsfStringId aPhaseName, double aValue)
bool SetProportionalNavigationLimitAngle (WsfStringId aPhaseName, double aValue)
bool SetProportionalNavigationMethod (WsfStringId aPhaseName, const std::string &aValue)
bool SetVelocityPursuitGain (WsfStringId aPhaseName, double aValue)
bool SetGeeBias (WsfStringId aPhaseName, double aValue)
virtual bool SetLateralGeeBias (WsfStringId aPhaseName, double aValue)
bool SetMaximumCommandedGees (WsfStringId aPhaseName, double aValue)
bool SetMaximumPitchAngle (WsfStringId aPhaseName, double aValue)
bool SetMaximumAscentRate (WsfStringId aPhaseName, double aValue)
bool SetMaximumDescentRate (WsfStringId aPhaseName, double aValue)
bool SetPitchChangeGain (WsfStringId aPhaseName, double aValue)
virtual bool EjectStage (double aPreSeparationCoastTime, double aPreIgnitionCoastTime)
bool StartProgram (WsfStringId aProgramName)
bool StopProgram (WsfStringId aProgramName)
Public Member Functions inherited from WsfScriptProcessor
 WsfScriptProcessor (const WsfScenario &aScenario)
 WsfScriptProcessor (const WsfScenario &aScenario, WsfStringId aPartClass, const std::string &aPartVarName)
 ~WsfScriptProcessor () override
WsfProcessorClone () const override
bool Initialize (double aSimTime) override
bool Initialize2 (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
void Update (double aSimTime) override
bool ProcessMessage (double aSimTime, const WsfMessage &aMessage) override
void SendMessage (double aSimTime, const WsfMessage &aMessage) override
virtual void ExecuteOnMessageCreate (double aSimTime, WsfMessage &aMessage)
virtual bool ExecuteScript (double aSimTime, const std::string &aScriptName)
virtual bool ExecuteScript (double aSimTime, WsfStringId aScriptName, UtScriptData &aScriptRetVal, const UtScriptDataList &aScriptArgs=UtScriptDataList())
void ExecuteScriptAtTime (double aTime, WsfStringId aScriptName, const UtScriptDataList &aScriptArgs)
virtual void SuppressMessage (bool aSuppressMessage)
WsfScriptMessageHandlerGetMessageHandler ()
WsfScriptContextGetScriptContext ()
UtScriptContext * GetScriptAccessibleContext () const override
void SetPlatform (WsfPlatform *aPlatformPtr) override
const WsfBehaviorTreeBehaviorTree () const
WsfAdvancedBehaviorTreeAdvancedBehaviorTree () const
virtual const WsfScriptStateMachineGetStateMachine () const
wsf::ExternalLinksGetExternalLinks ()
std::string State ()
std::string StateAll ()
void SetState (std::string &stateName)
void SetStateAll (std::string &stateNameAll)
Public Member Functions inherited from WsfProcessor
 WsfProcessor (const WsfScenario &aScenario)
 ~WsfProcessor () override=default
ComponentListGetComponents ()
const ComponentListGetComponents () const
virtual void ProcessCallback (double aSimTime, const WsfCallback &aCallback)
WsfComponentCloneComponent () const override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override
int GetComponentInitializationOrder () const override
const char * GetScriptClassName () const override
bool PreInitialize (double aSimTime) override
void PreInput () 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
double GetUpdateInterval () const override
void SetUpdateInterval (double aUpdateInterval) override
Public Member Functions inherited from WsfPlatformPart
 WsfPlatformPart (const WsfScenario &aScenario, int aPartType)
WsfPlatformPartoperator= (const WsfPlatformPart &aRhs)=delete
 ~WsfPlatformPart () 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
WsfPlatformGetPlatform () const
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.
virtual void Restore (double aSimTime)
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 ReceiveMessage (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.
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
Public Member Functions inherited from WsfMoverGuidance
 WsfMoverGuidance ()
virtual ~WsfMoverGuidance ()

Protected Member Functions

 GuidanceComputer (const GuidanceComputer &aSrc)
void SelectPhase (double aSimTime, double aChangeTime, WsfStringId aPhaseName) override
void SelectWaypoint (double aSimTime, double aChangeTime, unsigned int aNewIndex) override
 Select the indicated waypoint as the current target waypoint.
bool UpdateAimpoint (double aCurTime, const Phase &aPhase) override
void UpdateTargetPerception (double aCurTime) override
 Update the perception of the target.
void UpdateWeaponPerception (double aCurTime) override
 Update the perception of the weapon.
void UpdateTerrainFollowing (const Phase &aPhase)
void UpdateRouteFollowing (const Phase &aPhase)
void CheckForWaypointChange (double aSimTime, double aEndTime) override
 Determine if a waypoint switch is required.
 WsfGuidanceComputer (const WsfGuidanceComputer &aSrc)
bool BeginExternalCommand (WsfStringId aPhaseName, unsigned int &aPhaseIndex)
 Begin processing for an external command (i.e.: from a script or other external source).
void BeginExternalCommandEcho (unsigned int aPhaseIndex, const char *aCommandPtr, ut::log::MessageStream &aStream)
virtual void CheckForPhaseChange (double aSimTime, double aEndTime)
 Check for a change in the guidance phase.
double ComputeAzimuth (const double aRelLoc[3]) const
double ComputeElevation (const double aRelLoc[3]) const
void ComputeInterceptData (double aCurTime, double &aTimeToGo, double &aRangeToGo)
 A helper for CheckForPhaseChange to compute the time and range to intercept.
unsigned int FindPhase (WsfStringId aPhaseName) const
WsfGuidanceProgramFindProgram (WsfStringId aProgramName) const
double GetSimTime () const
void StartProgram (double aSimTime, double aChangeTime, WsfStringId aProgramName)
void StopProgram (double aSimTime, double aChangeTime, WsfStringId aProgramName)
void UpdateRouteFollowing (const Phase &aPhase)
void UpdateTerrainFollowing (const Phase &aPhase)
bool ValidateNextPhaseName (const Phase &aPhase, WsfStringId aNextPhaseName)
Protected Member Functions inherited from WsfScriptProcessor
 WsfScriptProcessor (const WsfScriptProcessor &aSrc)
 WsfProcessor (const WsfProcessor &aSrc)
 Copy constructor (for Clone()).
WsfProcessoroperator= (const WsfProcessor &aRhs)=delete
 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)

Protected Attributes

MovermVehicleMoverPtr = nullptr
WsfGuidanceProgrammLegacyProgramPtr
ProgramList mDefinedPrograms
 The list of defined programs.
ProgramList mActivePrograms
size_t mProgramCompleteIndex
double mTimeConstant
 The guidance time constant for intercept navigation by the legacy program.
bool mGuideToTruth
 'true' if should guide to target truth.
bool mShowStatus
 'true' if 'show_status' specified
bool mShowDiagnostics
 'true' if 'show_diagnostics' specified
bool mShowCommands
 'true' if 'show_commands' specified
bool mShowEvaluations
 'true' if 'show_evaluations' specified.
bool mShowGraphics
 'true' if 'show_graphics' is specified
WsfGuidedMoverBasemMoverPtr
UtAtmosphere mAtmosphere
UtCallbackHolder mCallbacks
wsf::TerrainmTerrainPtr
double mLaunchTime
double mLaunchLocWCS [3]
double mLastUpdateTime
double mPhaseStartTime
double mGuidanceStartTime
double mCommandedFlightPathAngle
State mState
 The state of the weapon and target.
std::vector< PhasemPhaseList
 The list of phases.
Phase mPhaseTemplate
 The template used to construct a phase.
bool mExplicitPhaseUsed
 'true' if a 'phase' command was used
bool mImplicitPhaseUsed
 'true' if a phase was defined without using 'phase'
WsfStringId mInitialPhaseName
 The name (ID) of the starting phase.
unsigned int mPhaseIndex
 The index of the current phase.
double mLastFlightPathAngle
double mLastTgtUpdateTime
double mLastTgtLocWCS [3]
double mLastTgtVelWCS [3]
bool mTgtStateDefined
double mInterceptLocWCS [3]
double mLaunchComputerFlightPathAngle
unsigned int mRouteIndex
bool mFollowingRoute
bool mWasClosing
double mAimpointExpireTime
double mAimpointLocWCS [3]
unsigned int mAimpointDrawId
WsfDrawmDrawPtr
 For drawing graphics.
bool mOnExitScriptActive
 The following is used to prevent recursion if a SelectPhase occurs in the user 'on_exit' block.
Protected Attributes inherited from WsfScriptProcessor
WsfScriptContextmContextPtr
 Pointer to the script context.
WsfScriptMessageHandlermMessageHandlerPtr
 Pointer to the 'on_message' handler.
UtScript * mOnMessageCreateScriptPtr
 Pointer to the 'on_message_create' script.
UtScriptClass * mMessageClassPtr
wsf::ExternalLinks mExternalLinks
 The external recipients.
WsfBehaviorTreemBehaviorTreePtr
ut::CloneablePtr< WsfAdvancedBehaviorTreemAdvancedBehaviorTreePtr
std::unique_ptr< WsfScriptStateMachinemStateMachinePtr
int mStateIndex
bool mSuppressMessage

Additional Inherited Members

Public Types inherited from WsfGuidanceComputer
enum  GuidanceTarget { cGT_DEFAULT , cGT_TRUTH , cGT_PERCEPTION , cGT_PREDICTED_INTERCEPT }
enum  OffsetDirection { cOD_LEFT , cOD_RIGHT , cOD_EITHER }
using ComponentList = WsfComponentListT<WsfProcessorComponent>
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 WsfGuidanceComputer
static const double cUNDEFINED_DOUBLE = 1.0E+30
 A value that indicates a double precision value has not been defined.
static const double cFROM_LAUNCH_COMPUTER = 1.0E+31
 Indicates 'flight_path_angle from_launch_computer'.
static const double cFLIGHT_PATH_ANGLE_TOLERANCE = 0.0001 * UtMath::cRAD_PER_DEG
 The tolerance for performing a flight path angle phase change.
static const double cLARGE_POSITIVE_DOUBLE = 1.0E+30
Static Public Attributes inherited from WsfAuxDataEnabled
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataAccessed
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataDestroyed
using ProgramList = std::list<WsfGuidanceProgram*>

Detailed Description

This class derives from WsfGuidanceComputer and provides a class representing a guidance computer for steering/influencing a SixDOF Mover. The computer will follow proportional homing guidance to null line-of-sight rates to intercept a track. The track pointer will be "pushed" into this processor from some external source, and extrapolated in time if required. The primary output of the class are constrained steering commands in pitch and yaw, which are pushed into the Mover to control vehicle motion/guidance.

Constructor & Destructor Documentation

◆ GuidanceComputer() [1/3]

wsf::six_dof::GuidanceComputer::GuidanceComputer ( )
delete

◆ GuidanceComputer() [2/3]

wsf::six_dof::GuidanceComputer::GuidanceComputer ( WsfScenario & aScenarioPtr)
explicit

◆ ~GuidanceComputer()

wsf::six_dof::GuidanceComputer::~GuidanceComputer ( )
default

◆ GuidanceComputer() [3/3]

wsf::six_dof::GuidanceComputer::GuidanceComputer ( const GuidanceComputer & aSrc)
protected

Member Function Documentation

◆ CheckForWaypointChange()

void wsf::six_dof::GuidanceComputer::CheckForWaypointChange ( double aSimTime,
double aEndTime )
overrideprotectedvirtual

◆ Clone()

WsfProcessor * wsf::six_dof::GuidanceComputer::Clone ( ) const
overridevirtual

Create a clone of this object.

Returns
A pointer to the new copy.

Implements WsfProcessor.

References GuidanceComputer(), and WsfProcessor::WsfProcessor().

Referenced by operator=().

◆ GetAllowRouteFollowing()

bool wsf::six_dof::GuidanceComputer::GetAllowRouteFollowing ( )
inline

◆ GetCommandedAltitude()

double wsf::six_dof::GuidanceComputer::GetCommandedAltitude ( )
inline

◆ GetCommandedSpeed()

double wsf::six_dof::GuidanceComputer::GetCommandedSpeed ( )
inline

◆ Initialize()

bool wsf::six_dof::GuidanceComputer::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 WsfGuidanceProgramTypes::CreateInstance(), WsfPlatformPart::DebugEnabled(), WsfGuidanceComputer::FindPhase(), WsfGuidanceComputer::FindProgram(), WsfGuidanceProgramTypes::Get(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfPlatformPart::GetScenario(), WsfPlatformPart::GetSimulation(), WsfGuidanceProgram::Initialize(), WsfScriptProcessor::Initialize(), WsfGuidanceComputer::mAimpointDrawId, WsfGuidanceComputer::mCallbacks, WsfGuidanceComputer::mDefinedPrograms, WsfGuidanceComputer::mDrawPtr, WsfGuidanceComputer::Phase::mEndOfRoutePhaseName, WsfGuidanceComputer::mInitialPhaseName, WsfGuidanceComputer::mLastUpdateTime, WsfGuidanceComputer::mLaunchLocWCS, WsfGuidanceComputer::mLaunchTime, WsfGuidanceComputer::mLegacyProgramPtr, WsfGuidanceComputer::Phase::mPhaseChangeList, WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::Phase::mPhaseName, WsfGuidanceComputer::Phase::mPrograms, WsfGuidanceComputer::Phase::mSensorTrackInitiatedPhaseName, WsfGuidanceComputer::mShowEvaluations, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, WsfGuidanceComputer::Phase::mStageBurnoutPhaseName, WsfGuidanceComputer::Phase::mStageIgnitionPhaseName, WsfGuidanceComputer::Phase::mStageSeparationPhaseName, WsfGuidanceComputer::mTerrainPtr, mVehicleMoverPtr, ok, pi, RouteChanged(), WsfGuidanceComputer::SensorTrackInitiated(), WsfObserver::SensorTrackInitiated(), WsfPlatformPart::SetInitiallyTurnedOn(), StageBurnout(), StageIgnition(), StageSeparation(), WsfGuidanceComputer::ValidateNextPhaseName(), WsfGuidanceComputer::WsfGuidanceComputer(), and WsfGuidanceComputer::WsfGuidanceProgram.

Referenced by operator=().

◆ operator=()

GuidanceComputer & wsf::six_dof::GuidanceComputer::operator= ( const GuidanceComputer & other)
delete

◆ RouteChanged()

void wsf::six_dof::GuidanceComputer::RouteChanged ( double aSimTime)
overridevirtual

A callback from the mover that indicates that the route has changed.

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfGuidanceComputer.

References WsfRoute::Empty(), WsfGuidanceComputer::mFollowingRoute, WsfGuidanceComputer::mShowStatus, mVehicleMoverPtr, WsfGuidanceComputer::PrintStatusHeader(), and SelectWaypoint().

Referenced by Initialize().

◆ SelectPhase()

void wsf::six_dof::GuidanceComputer::SelectPhase ( double aSimTime,
double aChangeTime,
WsfStringId aPhaseName )
overrideprotectedvirtual

Select the indicated phase as the current phase.

Parameters
aSimTimeThe current simulation time.
aChangeTimeThe time at which the phase change is actually occurring. This may be less than the current simulation time.
aPhaseNameThe name (dictionary ID) of the phase that is to become the current phase.

Reimplemented from WsfGuidanceComputer.

References WsfGuidanceComputer::cFROM_LAUNCH_COMPUTER, WsfGuidanceComputer::cUNDEFINED_DOUBLE, WsfGuidanceComputer::DrawPoint(), WsfGuidanceComputer::Phase::ExecuteOnEntry(), WsfGuidanceComputer::Phase::ExecuteOnUpdate(), WsfGuidanceComputer::FindPhase(), WsfGuidanceComputer::FindProgram(), WsfPlatformPart::GetPlatform(), WsfPlatformPart::GetSimulation(), WsfObserver::GuidanceComputerPhaseChanged(), WsfGuidanceComputer::mActivePrograms, WsfGuidanceComputer::mAimpointExpireTime, WsfGuidanceComputer::mCommandedFlightPathAngle, WsfGuidanceComputer::Phase::mCommandedFlightPathAngle, WsfGuidanceComputer::Phase::mCommandedSpeed, WsfScriptProcessor::mContextPtr, WsfGuidanceComputer::Phase::mGuidanceDelay, WsfGuidanceComputer::mGuidanceStartTime, WsfGuidanceComputer::mLaunchComputerFlightPathAngle, WsfGuidanceComputer::mOnExitScriptActive, WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mPhaseStartTime, WsfGuidanceComputer::mProgramCompleteIndex, WsfGuidanceComputer::Phase::mProgramCompletePhaseName, WsfGuidanceComputer::Phase::mPrograms, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, mVehicleMoverPtr, WsfGuidanceComputer::PrintStatusHeader(), WsfGuidanceProgram::Start(), UpdateRouteFollowing(), UpdateTerrainFollowing(), and WsfGuidanceComputer::WsfGuidanceProgram.

Referenced by SelectWaypoint(), StageBurnout(), StageIgnition(), StageSeparation(), and TurnOn().

◆ SelectWaypoint()

void wsf::six_dof::GuidanceComputer::SelectWaypoint ( double aSimTime,
double aChangeTime,
unsigned int aNewIndex )
overrideprotectedvirtual

◆ StageBurnout()

void wsf::six_dof::GuidanceComputer::StageBurnout ( double aSimTime,
double aEventTime )
overridevirtual

A callback from the mover that indicates the current stage has just burned-out.

Parameters
aSimTimeThe current simulation time.
aEventTimeThe actual time the stage burned-out. This may be less than the current simulation time.

Reimplemented from WsfGuidanceComputer.

References WsfGuidanceComputer::DrawPoint(), WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, mVehicleMoverPtr, WsfGuidanceComputer::PrintStatusHeader(), SelectPhase(), and UpdateWeaponPerception().

Referenced by Initialize().

◆ StageIgnition()

void wsf::six_dof::GuidanceComputer::StageIgnition ( double aSimTime,
double aEventTime )
overridevirtual

A callback from the mover that indicates the current stage is igniting.

Parameters
aSimTimeThe current simulation time.
aEventTimeThe actual time the stage ignited. This may be less than the current simulation time.

Reimplemented from WsfGuidanceComputer.

References WsfGuidanceComputer::DrawPoint(), WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, mVehicleMoverPtr, WsfGuidanceComputer::PrintStatusHeader(), SelectPhase(), and UpdateWeaponPerception().

Referenced by Initialize().

◆ StageSeparation()

void wsf::six_dof::GuidanceComputer::StageSeparation ( double aSimTime,
double aEventTime )
overridevirtual

A callback from the mover that indicates the current stage is separating.

Parameters
aSimTimeThe current simulation time.
aEventTimeThe actual time the stage separated. This may be less than the current simulation time.

Reimplemented from WsfGuidanceComputer.

References WsfGuidanceComputer::DrawPoint(), WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, mVehicleMoverPtr, WsfGuidanceComputer::PrintStatusHeader(), SelectPhase(), and UpdateWeaponPerception().

Referenced by Initialize().

◆ StopEngines()

bool wsf::six_dof::GuidanceComputer::StopEngines ( )
overridevirtual

Called from script interface to command the mover to stop the engines.

Reimplemented from WsfGuidanceComputer.

References WsfGuidanceComputer::GetSimTime(), WsfGuidanceComputer::mShowStatus, mVehicleMoverPtr, WsfGuidanceComputer::PrintStatusHeader(), simTime, and wsf::six_dof::utils::TimeToTime().

◆ TurnOff()

void wsf::six_dof::GuidanceComputer::TurnOff ( double aSimTime)
overridevirtual

Turn off the platform part (system).

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfPlatformPart.

References WsfPlatformPart::GetPlatform(), mVehicleMoverPtr, WsfProcessor::TurnOff(), and WsfMoverGuidance::WsfMoverGuidance().

Referenced by operator=().

◆ TurnOn()

void wsf::six_dof::GuidanceComputer::TurnOn ( double aSimTime)
overridevirtual

◆ UpdateAimpoint()

◆ UpdateGuidance()

void wsf::six_dof::GuidanceComputer::UpdateGuidance ( double aSimTime,
double aCurTime,
double aEndTime )
overridevirtual

Perform a guidance update. This is called from the mover when a guidance update is desired. It computes the desired values and pushes them back in to the mover.

Parameters
aSimTimeThe current simulation time.
aCurTimeThe current internal time within the mover. This can be less than aSimTime.
aEndTimeThe internal time to which the mover is trying to advance. This is typically one mover integration step beyond aCurTime

Implements WsfMoverGuidance.

References WsfGuidanceProgram::cCOMPLETE, WsfGuidanceComputer::CheckForPhaseChange(), CheckForWaypointChange(), WsfGuidanceComputer::cUNDEFINED_DOUBLE, WsfPlatformPart::DebugEnabled(), deltaTime, WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfObject::GetType(), WsfPlatformPart::IsTurnedOn(), WsfGuidanceComputer::Commands::mAccelCmd, WsfGuidanceComputer::mActivePrograms, WsfGuidanceComputer::Commands::mAngleRateCmd, WsfGuidanceComputer::mAtmosphere, WsfGuidanceComputer::Phase::mCommandedSpeed, WsfScriptProcessor::mContextPtr, WsfGuidanceComputer::mFollowingRoute, WsfGuidanceComputer::mGuidanceStartTime, WsfGuidanceComputer::mLastUpdateTime, WsfGuidanceComputer::mLaunchTime, WsfGuidanceComputer::mLegacyProgramPtr, WsfGuidanceComputer::Phase::mMaxGeeCmd, WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::Phase::mPhaseName, WsfGuidanceComputer::mProgramCompleteIndex, WsfGuidanceComputer::Phase::mProgramCompletePhaseName, WsfGuidanceComputer::Phase::mPrograms, WsfGuidanceComputer::mState, WsfGuidanceComputer::mTgtStateDefined, mVehicleMoverPtr, UpdateAimpoint(), UpdateTargetPerception(), UpdateWeaponPerception(), and WsfGuidanceComputer::WsfGuidanceProgram.

Referenced by operator=().

◆ UpdateRouteFollowing()

void wsf::six_dof::GuidanceComputer::UpdateRouteFollowing ( const Phase & aPhase)
protected

Determine if we are starting, continuing or stopping route following.

Parameters
aPhaseThe current phase.

References WsfRoute::Empty(), WsfGuidanceComputer::Phase::mAllowRouteFollowing, WsfGuidanceComputer::mFollowingRoute, WsfGuidanceComputer::mRouteIndex, and mVehicleMoverPtr.

Referenced by SelectPhase().

◆ UpdateTargetPerception()

◆ UpdateTerrainFollowing()

void wsf::six_dof::GuidanceComputer::UpdateTerrainFollowing ( const Phase & aPhase)
protected

Update the terrain following status.

Parameters
aPhaseThe current phase.

References WsfGuidanceComputer::cUNDEFINED_DOUBLE, WsfGuidanceComputer::Phase::mCommandedAlt, WsfGuidanceComputer::Phase::mCommandedAltIsAGL, and mVehicleMoverPtr.

Referenced by SelectPhase().

◆ UpdateWeaponPerception()

void wsf::six_dof::GuidanceComputer::UpdateWeaponPerception ( double aCurTime)
overrideprotectedvirtual

Member Data Documentation

◆ mVehicleMoverPtr


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