WSF
WsfOrbitalAttitudeChangeEvent Class Reference

#include <WsfOrbitalAttitudeChangeEvent.hpp>

Inheritance diagram for WsfOrbitalAttitudeChangeEvent:
Collaboration diagram for WsfOrbitalAttitudeChangeEvent:

Public Member Functions

 WsfOrbitalAttitudeChangeEvent (const WsfScenario &aScenario)
 WsfOrbitalAttitudeChangeEvent (const WsfOrbitalAttitudeChangeEvent &aSrc)
 ~WsfOrbitalAttitudeChangeEvent () override=default
WsfOrbitalEventClone () const override
 Make a copy of this object.
bool ProcessInput (UtInput &aInput) override
bool Initialize (const UtCalendar &aEpoch, const wsf::space::OrbitalMissionContext &aContext) override
const char * GetScriptClassName () const override
void SetOrientation (std::unique_ptr< wsf::space::Orientation > aOrientationPtr)
wsf::space::OrientationGetOrientation () const
void Accept (WsfOrbitalEventVisitor *aVisitorPtr) override
bool ValidateParameterRanges (const std::string &aExecutingPlatformName) const override
Public Member Functions inherited from WsfOrbitalEvent
 WsfOrbitalEvent (const WsfOrbitalEvent &aSrc)
WsfOrbitalEventoperator= (const WsfOrbitalEvent &)=delete
 ~WsfOrbitalEvent () override=default
bool ProcessInput (UtInput &aInput) override
bool CanVerify () const
 Return whether this event can be verified.
virtual bool VerifyCondition () const
virtual bool EvaluatePreconditions (const wsf::space::OrbitalMissionContext &aContext) const
virtual bool EvaluatePostconditions (const wsf::space::OrbitalMissionContext &aContext) const
bool IsComplete () const
 Return whether the event is complete.
bool IsCanceled () const
 Return whether the event is canceled.
void SetCanceled ()
 Mark the event as canceled.
bool Execute (const UtCalendar &aEpoch, wsf::space::OrbitalMissionContext &aContext)
const char * GetScriptClassName () const override
bool IsFinite () const
void SetFinite (bool aIsFinite)
 Set whether the event is finite.
bool HasExecuted () const
 Return whether the event has executed at least once (i.e., Execute() has been called).
const wsf::space::OrbitalPropagatorConditionGetCondition () const
 Return the condition for event execution (const).
wsf::space::OrbitalPropagatorConditionGetCondition ()
 Return the condition for event execution (non-const).
WsfStringId GetConditionString () const
 Return the condition string for event execution.
void SetCondition (std::unique_ptr< wsf::space::OrbitalPropagatorCondition > aConditionPtr)
 Set the condition for execution.
const UtCalendar & GetStartTime () const
 Return the time at which the event will begin executing.
void SetStartTime (const UtCalendar &aStartTime)
 Set the start time to begin event execution.
const UtCalendar & GetEvaluationTime () const
 Return the nominal time to execute the event impulsively.
UtTimeValue GetDuration () const
 Return the full duration of the event. If the event is impulsive, this method returns 0.
void SetDuration (const UtTimeValue &aDuration)
 Set the full duration of the event. A value of 0 implies and impulsive event; otherwise it is finite.
void SetOnlyDuration (const UtTimeValue &aDuration)
UtTimeValue GetUpdateInterval () const
 For finite events, return the interval at which the event is to be re-evaluated.
void SetUpdateInterval (const UtTimeValue &aUpdateInterval)
 Set the update interval for which the event is to be re-evaluated.
virtual const WsfOrbitalEventGetCurrentMissionEvent () const
virtual WsfOrbitalEventGetCurrentMissionEvent ()
virtual WsfOrbitalEventAdvanceMissionEvent (const UtCalendar &aEpoch, const wsf::space::OrbitalMissionContext &aContext)
virtual bool IsSequence () const
 Is this MissionEvent a MissionEvent sequence (WsfMissionEventSequence)?
virtual double GetRequiredDeltaV (const UtOrbitalPropagatorBase &aPropagator) const
 Return the minimum required delta-v needed to complete this event; the default is to return 0.0.
virtual double GetDeltaV () const
 Get the delta V expended to execute this event; the default is to return 0.0.
virtual bool GetNextExecutionTime (const UtCalendar &aCurrentTime, const UtOrbitalPropagatorBase &aPropagator, UtCalendar &aNextExecutionTime)
 For finite events, return the next time the event should be executed.
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 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)

Static Public Member Functions

static WsfStringId GetTypeId ()
Static Public Member Functions inherited from WsfOrbitalEvent
static WsfOrbitalEventCreate (const WsfScenario &aScenario, UtInput &aInput, bool aIgnoreSomeExceptions=false)

Protected Member Functions

bool ExecuteEvent (const UtCalendar &aEpoch, wsf::space::OrbitalMissionContext &aContext) override
Protected Member Functions inherited from WsfOrbitalEvent
 WsfOrbitalEvent (const WsfScenario &aScenario)
virtual bool InitializeVariables (const UtCalendar &aCurrentTime, const UtCalendar &aEvaluationTime, const wsf::space::OrbitalMissionContext &aContext)
virtual bool InitializeTimes (const UtCalendar &aEpoch, const wsf::space::OrbitalMissionContext &aContext)
virtual bool EvaluateCompletion (const UtCalendar &aEpoch, const UtOrbitalPropagatorBase &aPropagator)
Protected Member Functions inherited from WsfUniqueId
void AssignUniqueId (WsfSimulation *aSimulationPtr)
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Protected Attributes

std::unique_ptr< wsf::space::OrientationmOrientationPtr {nullptr}
Protected Attributes inherited from WsfOrbitalEvent
ut::CloneablePtr< wsf::space::OrbitalPropagatorConditionmCondition {}
bool mIsFinite
bool mHasExecuted
bool mIsComplete
bool mIsCanceled
bool mDebug
bool mCanVerify
UtCalendar mStartTime
 Can this event be verified without running in a simulation?
UtCalendar mEvaluationTime
UtTimeValue mDuration
UtTimeValue mUpdateInterval
const WsfScenariomScenario

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
Static Protected Member Functions inherited from WsfOrbitalEvent
static WsfOrbitalEventCreate (const WsfScenario &aScenario, WsfStringId aType)

Detailed Description

An orbital event to change the attitude of the spacecraft to one of the standard types (see wsf::space::Orientation).

Constructor & Destructor Documentation

◆ WsfOrbitalAttitudeChangeEvent() [1/2]

WsfOrbitalAttitudeChangeEvent::WsfOrbitalAttitudeChangeEvent ( const WsfScenario & aScenario)

◆ WsfOrbitalAttitudeChangeEvent() [2/2]

WsfOrbitalAttitudeChangeEvent::WsfOrbitalAttitudeChangeEvent ( const WsfOrbitalAttitudeChangeEvent & aSrc)

◆ ~WsfOrbitalAttitudeChangeEvent()

WsfOrbitalAttitudeChangeEvent::~WsfOrbitalAttitudeChangeEvent ( )
overridedefault

Member Function Documentation

◆ Accept()

void WsfOrbitalAttitudeChangeEvent::Accept ( WsfOrbitalEventVisitor * aVisitorPtr)
overridevirtual

◆ Clone()

WsfOrbitalEvent * WsfOrbitalAttitudeChangeEvent::Clone ( ) const
overridevirtual

Make a copy of this object.

Implements WsfOrbitalEvent.

References WsfOrbitalAttitudeChangeEvent(), and WsfOrbitalEvent::WsfOrbitalEvent().

◆ ExecuteEvent()

bool WsfOrbitalAttitudeChangeEvent::ExecuteEvent ( const UtCalendar & aCurrentTime,
wsf::space::OrbitalMissionContext & aContext )
overrideprotectedvirtual

Perform any necessary event processing. For example, in the case of orbital maneuvers, the actual Maneuver(...) method is called and delta-V computations are performed.

Parameters
aCurrentTimeThe current time to be used in the event execution.
aContextThe orbital mission context in which this event is executing.
Note
This is a template method called from within Execute(...).

Implements WsfOrbitalEvent.

References WsfSpaceMoverBase::GetAttitudeController(), wsf::space::OrbitalMissionContext::GetSpaceMover(), mOrientationPtr, and WsfAttitudeController::SetOrientation().

◆ GetOrientation()

wsf::space::Orientation * WsfOrbitalAttitudeChangeEvent::GetOrientation ( ) const

References mOrientationPtr.

◆ GetScriptClassName()

const char * WsfOrbitalAttitudeChangeEvent::GetScriptClassName ( ) const
inlineoverride

◆ GetTypeId()

WsfStringId WsfOrbitalAttitudeChangeEvent::GetTypeId ( )
static

◆ Initialize()

bool WsfOrbitalAttitudeChangeEvent::Initialize ( const UtCalendar & aEpoch,
const wsf::space::OrbitalMissionContext & aContext )
overridevirtual

Initialize this MissionEvent in preparation to execute it.

Parameters
aEpochThe current epoch, to be used as the basis for evaluating the next mission event in the sequence.
aContextThe orbital mission context in which this event is executing.

Reimplemented from WsfOrbitalEvent.

References WsfSpaceMoverBase::GetAttitudeController(), wsf::space::OrbitalMissionContext::GetSpaceMover(), WsfOrbitalEvent::Initialize(), mOrientationPtr, and ok.

◆ ProcessInput()

bool WsfOrbitalAttitudeChangeEvent::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 wsf::space::Orientation::Factory(), mOrientationPtr, and WsfOrbitalEvent::ProcessInput().

◆ SetOrientation()

void WsfOrbitalAttitudeChangeEvent::SetOrientation ( std::unique_ptr< wsf::space::Orientation > aOrientationPtr)

References mOrientationPtr.

◆ ValidateParameterRanges()

bool WsfOrbitalAttitudeChangeEvent::ValidateParameterRanges ( const std::string & aExecutingPlatformName) const
overridevirtual

Check that the event's parameters are in the valid range for each parameter. When deriving from WsfOrbitalEvent, the subclass should call into this method to apply the checks on any parameters related to the event being finite.

Parameters
aExecutingPlatformNameThe name of the platform that would be executing this event.
Returns
True if the event parameters are all in allowed ranges.

Reimplemented from WsfOrbitalEvent.

References WsfObject::GetType(), mOrientationPtr, and WsfOrbitalEvent::ValidateParameterRanges().

Member Data Documentation

◆ mOrientationPtr

std::unique_ptr<wsf::space::Orientation> WsfOrbitalAttitudeChangeEvent::mOrientationPtr {nullptr}
protected

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