WSF
WsfP6DOF_GuidanceComputer Class Reference

#include <WsfP6DOF_GuidanceComputer.hpp>

Inheritance diagram for WsfP6DOF_GuidanceComputer:
Collaboration diagram for WsfP6DOF_GuidanceComputer:

Public Member Functions

 WsfP6DOF_GuidanceComputer ()=delete
 WsfP6DOF_GuidanceComputer (WsfScenario &aScenarioPtr)
 ~WsfP6DOF_GuidanceComputer () override=default
WsfP6DOF_GuidanceComputeroperator= (const WsfP6DOF_GuidanceComputer &other)=delete
WsfProcessorClone () const override
bool Initialize (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
void TurnOff (double aSimTime) override
void TurnOn (double aSimTime) override
void UpdateGuidance (double aSimTime, double aCurTime, double aEndTime) override
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
void SensorTrackInitiated (double aSimTime, WsfSensor *aSensorPtr, const WsfTrack *aTrackPtr) override
Public Member Functions inherited from WsfGuidanceComputer
 WsfGuidanceComputer (WsfScenario &aScenarioPtr)
 ~WsfGuidanceComputer () override
WsfGuidanceComputeroperator= (const WsfGuidanceComputer &)=delete
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)
bool Initialize2 (double aSimTime) override
const char * GetScriptClassName () const 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

 WsfP6DOF_GuidanceComputer (const WsfP6DOF_GuidanceComputer &aSrc)
void CheckForPhaseChange (double aSimTime, double aEndTime) override
 Check for a change in the guidance phase.
void SelectPhase (double aSimTime, double aChangeTime, WsfStringId aPhaseName) override
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.
 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 CheckForWaypointChange (double aSimTime, double aEndTime)
 Determine if a waypoint switch is required.
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
virtual void SelectWaypoint (double aSimTime, double aChangeTime, unsigned int aNewIndex)
 Select the indicated waypoint as the current target waypoint.
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

WsfP6DOF_MovermP6DofMoverPtr
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 P6DOF 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 WsfP6DOF_Mover to control vehicle motion/guidance.

Constructor & Destructor Documentation

◆ WsfP6DOF_GuidanceComputer() [1/3]

WsfP6DOF_GuidanceComputer::WsfP6DOF_GuidanceComputer ( )
delete

◆ WsfP6DOF_GuidanceComputer() [2/3]

WsfP6DOF_GuidanceComputer::WsfP6DOF_GuidanceComputer ( WsfScenario & aScenarioPtr)
explicit

◆ ~WsfP6DOF_GuidanceComputer()

WsfP6DOF_GuidanceComputer::~WsfP6DOF_GuidanceComputer ( )
overridedefault

◆ WsfP6DOF_GuidanceComputer() [3/3]

Member Function Documentation

◆ CheckForPhaseChange()

◆ Clone()

WsfProcessor * WsfP6DOF_GuidanceComputer::Clone ( ) const
overridevirtual

Create a clone of this object.

Returns
A pointer to the new copy.

Reimplemented from WsfGuidanceComputer.

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

◆ Initialize()

bool WsfP6DOF_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 WsfGuidanceComputer.

References WsfGuidanceProgramTypes::CreateInstance(), WsfPlatformPart::DebugEnabled(), WsfGuidanceComputer::FindPhase(), WsfGuidanceComputer::FindProgram(), WsfGuidanceProgramTypes::Get(), WsfPlatform::GetMover(), 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, mP6DofMoverPtr, 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, ok, pi, RouteChanged(), WsfObserver::SensorTrackInitiated(), SensorTrackInitiated(), WsfPlatformPart::SetInitiallyTurnedOn(), StageBurnout(), StageIgnition(), StageSeparation(), WsfGuidanceComputer::ValidateNextPhaseName(), and WsfGuidanceComputer::WsfGuidanceProgram.

◆ operator=()

WsfP6DOF_GuidanceComputer & WsfP6DOF_GuidanceComputer::operator= ( const WsfP6DOF_GuidanceComputer & other)
delete

◆ ProcessInput()

bool WsfP6DOF_GuidanceComputer::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 WsfGuidanceComputer.

References WsfGuidanceComputer::FindPhase(), WsfGuidanceProgramTypes::Get(), WsfPlatformPart::GetScenario(), WsfGuidanceComputer::mAtmosphere, WsfScriptProcessor::mContextPtr, WsfGuidanceComputer::mDefinedPrograms, WsfGuidanceComputer::mExplicitPhaseUsed, WsfGuidanceComputer::mGuideToTruth, WsfGuidanceComputer::mImplicitPhaseUsed, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::Phase::mPhaseName, WsfGuidanceComputer::mPhaseTemplate, WsfGuidanceComputer::mShowEvaluations, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, WsfGuidanceComputer::mTimeConstant, WsfGuidanceComputer::Phase::ProcessInput(), ProcessInput(), and WsfScriptProcessor::ProcessInput().

Referenced by ProcessInput().

◆ RouteChanged()

void WsfP6DOF_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, mP6DofMoverPtr, WsfGuidanceComputer::mShowStatus, WsfGuidanceComputer::PrintStatusHeader(), and WsfGuidanceComputer::SelectWaypoint().

Referenced by Initialize().

◆ SelectPhase()

void WsfP6DOF_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::DrawPoint(), WsfRoute::Empty(), WsfGuidanceComputer::FindPhase(), WsfGuidanceComputer::FindProgram(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfPlatformPart::GetSimulation(), WsfObserver::GuidanceComputerPhaseChanged(), WsfGuidanceComputer::mActivePrograms, WsfGuidanceComputer::mAimpointExpireTime, WsfGuidanceComputer::Phase::mAllowRouteFollowing, WsfGuidanceComputer::Phase::mCommandedAlt, WsfGuidanceComputer::Phase::mCommandedAltIsAGL, WsfGuidanceComputer::mCommandedFlightPathAngle, WsfGuidanceComputer::Phase::mCommandedFlightPathAngle, WsfGuidanceComputer::Phase::mCommandedSpeed, WsfScriptProcessor::mContextPtr, WsfGuidanceComputer::mFollowingRoute, WsfGuidanceComputer::Phase::mGuidanceDelay, WsfGuidanceComputer::mGuidanceStartTime, WsfGuidanceComputer::mLaunchComputerFlightPathAngle, WsfGuidanceComputer::mOnExitScriptActive, mP6DofMoverPtr, WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mPhaseStartTime, WsfGuidanceComputer::Phase::mPrograms, WsfGuidanceComputer::mRouteIndex, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, WsfGuidanceComputer::PrintStatusHeader(), WsfGuidanceProgram::Start(), and WsfGuidanceComputer::WsfGuidanceProgram.

Referenced by CheckForPhaseChange(), SensorTrackInitiated(), StageBurnout(), StageIgnition(), StageSeparation(), and TurnOn().

◆ SensorTrackInitiated()

void WsfP6DOF_GuidanceComputer::SensorTrackInitiated ( double aSimTime,
WsfSensor * aSensorPtr,
const WsfTrack * aTrackPtr )
overridevirtual

Callback to indicate that a sensor track has begun.

Parameters
aSimTimeSimulation time.
aSensorPtrthe sensor producing the track.
aTrackPtrthe Track produced by the sensor.

Reimplemented from WsfGuidanceComputer.

References WsfPlatformPart::GetPlatform(), WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, and SelectPhase().

Referenced by Initialize().

◆ StageBurnout()

void WsfP6DOF_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(), mP6DofMoverPtr, WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, WsfGuidanceComputer::PrintStatusHeader(), SelectPhase(), and UpdateWeaponPerception().

Referenced by Initialize().

◆ StageIgnition()

void WsfP6DOF_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(), mP6DofMoverPtr, WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, WsfGuidanceComputer::PrintStatusHeader(), SelectPhase(), and UpdateWeaponPerception().

Referenced by Initialize().

◆ StageSeparation()

void WsfP6DOF_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(), mP6DofMoverPtr, WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mShowGraphics, WsfGuidanceComputer::mShowStatus, WsfGuidanceComputer::PrintStatusHeader(), SelectPhase(), and UpdateWeaponPerception().

Referenced by Initialize().

◆ StopEngines()

bool WsfP6DOF_GuidanceComputer::StopEngines ( )
overridevirtual

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

Reimplemented from WsfGuidanceComputer.

References WsfGuidanceComputer::GetSimTime(), mP6DofMoverPtr, WsfGuidanceComputer::mShowStatus, WsfGuidanceComputer::PrintStatusHeader(), simTime, and P6DofUtils::TimeToTime().

◆ TurnOff()

void WsfP6DOF_GuidanceComputer::TurnOff ( double aSimTime)
overridevirtual

Turn off the platform part (system).

Parameters
aSimTimeThe current simulation time.

Reimplemented from WsfGuidanceComputer.

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

◆ TurnOn()

void WsfP6DOF_GuidanceComputer::TurnOn ( double aSimTime)
overridevirtual

◆ UpdateAimpoint()

◆ UpdateGuidance()

void WsfP6DOF_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

Reimplemented from WsfGuidanceComputer.

References P6DOF::CurrentTargetData::autopilotPitchGLoadCommand_g, P6DOF::CurrentTargetData::autopilotRollRateCommand_dps, P6DOF::CurrentTargetData::autopilotYawGLoadCommand_g, CheckForPhaseChange(), WsfPlatformPart::DebugEnabled(), deltaTime, WsfTrackManager::GetCurrentTarget(), WsfObject::GetName(), WsfPlatformPart::GetPlatform(), WsfPlatform::GetTrackManager(), P6DOF::CurrentTargetData::guidanceFlightPathAngle_deg, P6DOF::CurrentTargetData::guidanceGBias_g, P6DOF::CurrentTargetData::guidanceMaxG, P6DOF::CurrentTargetData::guidancePitchAccelCommand_g, P6DOF::CurrentTargetData::guidanceYawAccelCommand_g, WsfPlatformPart::IsTurnedOn(), P6DOF::CurrentTargetData::isValid, WsfGuidanceComputer::Commands::mAccelCmd, WsfGuidanceComputer::mActivePrograms, WsfGuidanceComputer::Commands::mAngleRateCmd, WsfGuidanceComputer::mAtmosphere, WsfGuidanceComputer::mCommandedFlightPathAngle, WsfGuidanceComputer::Phase::mCommandedSpeed, WsfGuidanceComputer::mGuidanceStartTime, WsfGuidanceComputer::mLastUpdateTime, WsfGuidanceComputer::mLaunchTime, WsfGuidanceComputer::mLegacyProgramPtr, WsfGuidanceComputer::Phase::mMaxGeeCmd, mP6DofMoverPtr, WsfGuidanceComputer::mPhaseIndex, WsfGuidanceComputer::mPhaseList, WsfGuidanceComputer::mState, WsfGuidanceComputer::mTgtStateDefined, P6DOF::CurrentTargetData::targetAziumth_deg, P6DOF::CurrentTargetData::targetElevation_deg, P6DOF::CurrentTargetData::targetName, P6DOF::CurrentTargetData::targetSlantRange_nm, trackPtr, UpdateAimpoint(), UpdateTargetPerception(), and UpdateWeaponPerception().

◆ UpdateTargetPerception()

◆ UpdateWeaponPerception()

void WsfP6DOF_GuidanceComputer::UpdateWeaponPerception ( double aCurTime)
overrideprotectedvirtual

Member Data Documentation

◆ mP6DofMoverPtr


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