WSF
WsfOrbitalMissionSequence Class Reference

#include <WsfOrbitalMissionSequence.hpp>

Inheritance diagram for WsfOrbitalMissionSequence:
Collaboration diagram for WsfOrbitalMissionSequence:

Public Types

using MissionEvents = std::list<ut::CloneablePtr<WsfOrbitalEvent>>
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Public Member Functions

 WsfOrbitalMissionSequence (const WsfScenario &aScenario)
 WsfOrbitalMissionSequence (const WsfOrbitalMissionSequence &aSrc)
WsfOrbitalMissionSequenceoperator= (const WsfOrbitalMissionSequence &)=delete
 ~WsfOrbitalMissionSequence () override=default
WsfOrbitalMissionSequenceClone () 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 WsfOrbitalEventGetCurrentMissionEvent () const override
WsfOrbitalEventGetCurrentMissionEvent () override
WsfOrbitalEventAdvanceMissionEvent (const UtCalendar &aEpoch, const wsf::space::OrbitalMissionContext &aContext) override
UtCalendar ComputeContraintEpoch (const UtCalendar &aEpoch, const UtOrbitalPropagatorBase &aPropagator, bool &aSuccess) const
const MissionEventsGetSequence () const
 Return the actual sequence (std::list) of maneuvers (WsfOrbitalEvent).
void AddMissionEvent (std::unique_ptr< WsfOrbitalEvent > &&aMissionEventPtr)
double GetRequiredDeltaV (const UtOrbitalPropagatorBase &aPropagator) const override
double GetDeltaV () const override
bool IsSequence () const override
 Is this MissionEvent a MissionEvent sequence (WsfMissionEventSequence)?
const char * GetScriptClassName () const override
MissionEventsGetSequence ()
 Return the actual sequence (std::list) of maneuvers (WsfOrbitalEvent).
void Accept (WsfOrbitalEventVisitor *aVisitorPtr) override
bool ProcessInputWithIgnore (UtInput &aInput, bool aIgnoreSomeExceptions)
template<typename Callable>
bool PreOrderTraversal (Callable aOperation)
bool IsEmpty () const
Public Member Functions inherited from WsfOrbitalEvent
 WsfOrbitalEvent (const WsfOrbitalEvent &aSrc)
WsfOrbitalEventoperator= (const WsfOrbitalEvent &)=delete
 ~WsfOrbitalEvent () override=default
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
virtual bool ValidateParameterRanges (const std::string &aExecutingPlatformName) 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 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

WsfOrbitalEventGetNextMissionEvent () const
const WsfScenarioGetScenario () const
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)
Protected Member Functions inherited from WsfUniqueId
void AssignUniqueId (WsfSimulation *aSimulationPtr)
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Additional Inherited Members

Static Protected Member Functions inherited from WsfOrbitalEvent
static WsfOrbitalEventCreate (const WsfScenario &aScenario, WsfStringId aType)
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

Detailed Description

A sequence of maneuvers. A maneuver sequence is aggregated by a WsfManeuvering object, which can execute maneuver sequences for capable derived propagator types, or for space mover types that aggregates a capable derived propagator. Currently the sole capable propagator is the UtOrbitalPropagator, and the only mover capable of executing maneuvers is the WsfSpaceMover.

Member Typedef Documentation

◆ MissionEvents

using WsfOrbitalMissionSequence::MissionEvents = std::list<ut::CloneablePtr<WsfOrbitalEvent>>

Constructor & Destructor Documentation

◆ WsfOrbitalMissionSequence() [1/2]

WsfOrbitalMissionSequence::WsfOrbitalMissionSequence ( const WsfScenario & aScenario)
explicit

◆ WsfOrbitalMissionSequence() [2/2]

WsfOrbitalMissionSequence::WsfOrbitalMissionSequence ( const WsfOrbitalMissionSequence & aSrc)

◆ ~WsfOrbitalMissionSequence()

WsfOrbitalMissionSequence::~WsfOrbitalMissionSequence ( )
overridedefault

Member Function Documentation

◆ Accept()

void WsfOrbitalMissionSequence::Accept ( WsfOrbitalEventVisitor * aVisitorPtr)
overridevirtual

◆ AddMissionEvent()

void WsfOrbitalMissionSequence::AddMissionEvent ( std::unique_ptr< WsfOrbitalEvent > && aMissionEventPtr)

Add a maneuver to this maneuver sequence.

Parameters
aMissionEventPtrThe maneuver to be added. This instance will take control of the passed object.

◆ AdvanceMissionEvent()

WsfOrbitalEvent * WsfOrbitalMissionSequence::AdvanceMissionEvent ( const UtCalendar & aEpoch,
const wsf::space::OrbitalMissionContext & aContext )
overridevirtual

Advance to the "next" MissionEvent in the MissionEvent sequence, after the current MissionEvent. (see WsfOrbitalMissionSequence::GetCurrentMissionEvent, above). The next MissionEvent may also be a MissionEvent sequence (e.g. a Hohmann transfer). The progression of calls to AdvanceMissionEvent is to return a MissionEvent sequence once, followed by aggregated MissionEvents: in the example of the Hohmann transfer, the aggregate Hohmann transfer is first returned, followed by the two "atomic" MissionEvents that first change to the transfer orbit, and second change to the final orbit. It is the responsibility of the caller to call Execute() on the returned MissionEvent before calling this method again. This is to allow propagation to occur up to the execution time of the MissionEvent. For instance, a Hohmann transfer may have a constraint upon it to execute at a relative time. In that case, calling Execute() will advance the MissionEvent to the proper time to begin execution of the two actual transfer burns associated with the MissionEvent.

Parameters
aEpochThe current epoch, to be used as the basis for evaluating the next MissionEvent in the sequence.
aContextThe orbital mission context in which this event is being executed.
Returns
A pointer to the next (non-sequence) MissionEvent object, or zero if there is no next MissionEvent.
Note
Do not call Initialize on the returned MissionEvent object, as it will have already been initialized.
Call this method in a try ... catch block. If the next MissionEvent cannot be initialized, an AdvanceMissionEventExeption will be thrown. Throwing the exception, as opposed to returning a bool or some other mechanism, is done to properly unwind the stack.

Reimplemented from WsfOrbitalEvent.

References WsfOrbitalEvent::AdvanceMissionEvent(), wsf::space::OrbitalMissionContext::CompleteMissionEvent(), WsfObject::GetType(), WsfOrbitalEvent::mDebug, WsfOrbitalEvent::mIsComplete, and WsfOrbitalEvent::WsfOrbitalEvent().

◆ Clone()

WsfOrbitalMissionSequence * WsfOrbitalMissionSequence::Clone ( ) const
inlineoverridevirtual

Make a copy of this object.

Implements WsfOrbitalEvent.

References WsfOrbitalMissionSequence().

◆ ComputeContraintEpoch()

UtCalendar WsfOrbitalMissionSequence::ComputeContraintEpoch ( const UtCalendar & aEpoch,
const UtOrbitalPropagatorBase & aPropagator,
bool & aSuccess ) const

References WsfOrbitalEvent::mCondition.

Referenced by Initialize().

◆ GetCurrentMissionEvent() [1/2]

const WsfOrbitalEvent * WsfOrbitalMissionSequence::GetCurrentMissionEvent ( ) const
overridevirtual

Return the "current" MissionEvent in the MissionEvent sequence, defined to be either a MissionEvent that is currently executing, or if no MissionEvent is currently executing, the next MissionEvent to execute in a sequence. If the current MissionEvent is also a sequence (e.g. a Hohmann transfer), this method will continue to recurse to return the current MissionEvent that is not a sequence (const version).

Returns
A const pointer to the current (non-sequence) MissionEvent object, or zero if there is no current MissionEvent.

Reimplemented from WsfOrbitalEvent.

References WsfOrbitalEvent::GetCurrentMissionEvent(), WsfOrbitalEvent::IsComplete(), WsfOrbitalEvent::mHasExecuted, and WsfOrbitalEvent::WsfOrbitalEvent().

◆ GetCurrentMissionEvent() [2/2]

WsfOrbitalEvent * WsfOrbitalMissionSequence::GetCurrentMissionEvent ( )
overridevirtual

Return the "current" MissionEvent in the MissionEvent sequence, defined to be either a MissionEvent that is currently executing, or if no MissionEvent is currently executing, the next MissionEvent to execute in a sequence. If the current MissionEvent is also a sequence (e.g. a Hohmann transfer), this method will continue to recurse to return the current MissionEvent that is not a sequence.

Returns
A pointer to the current (non-sequence) MissionEvent object, or zero if there is no current MissionEvent.

Reimplemented from WsfOrbitalEvent.

References WsfOrbitalEvent::GetCurrentMissionEvent(), WsfOrbitalEvent::IsComplete(), WsfOrbitalEvent::mHasExecuted, and WsfOrbitalEvent::WsfOrbitalEvent().

◆ GetDeltaV()

double WsfOrbitalMissionSequence::GetDeltaV ( ) const
overridevirtual

Return the sum of the delta-v results for all mission events in the sequence. Only completed events will have nonzero values, so it is suggested that this method is only called when IsComplete() is valid.

Reimplemented from WsfOrbitalEvent.

◆ GetNextMissionEvent()

WsfOrbitalEvent * WsfOrbitalMissionSequence::GetNextMissionEvent ( ) const
protected

◆ GetRequiredDeltaV()

double WsfOrbitalMissionSequence::GetRequiredDeltaV ( const UtOrbitalPropagatorBase & aPropagator) const
overridevirtual

Return the sum of the required delta-v results for all mission events in the sequence. so it is suggested that this method is only called when IsComplete() is valid.

Reimplemented from WsfOrbitalEvent.

◆ GetScenario()

const WsfScenario & WsfOrbitalMissionSequence::GetScenario ( ) const
inlineprotected

◆ GetScriptClassName()

const char * WsfOrbitalMissionSequence::GetScriptClassName ( ) const
inlineoverride

◆ GetSequence() [1/2]

MissionEvents & WsfOrbitalMissionSequence::GetSequence ( )
inline

Return the actual sequence (std::list) of maneuvers (WsfOrbitalEvent).

◆ GetSequence() [2/2]

const MissionEvents & WsfOrbitalMissionSequence::GetSequence ( ) const
inline

Return the actual sequence (std::list) of maneuvers (WsfOrbitalEvent).

Referenced by WsfSpaceMoverBase::VerifyMission().

◆ GetTypeId()

WsfStringId WsfOrbitalMissionSequence::GetTypeId ( )
static

static Return the maneuver type as a WsfStringId.

Referenced by WsfOrbitalMissionSequence().

◆ Initialize()

bool WsfOrbitalMissionSequence::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 WsfUniqueId::AssignUniqueId(), ComputeContraintEpoch(), wsf::space::OrbitalMissionContext::GetPropagator(), wsf::space::OrbitalMissionContext::GetSimulation(), WsfOrbitalEvent::mEvaluationTime, WsfOrbitalEvent::mStartTime, and ok.

◆ IsEmpty()

bool WsfOrbitalMissionSequence::IsEmpty ( ) const

◆ IsSequence()

bool WsfOrbitalMissionSequence::IsSequence ( ) const
inlineoverridevirtual

Is this MissionEvent a MissionEvent sequence (WsfMissionEventSequence)?

Reimplemented from WsfOrbitalEvent.

◆ operator=()

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

◆ PreOrderTraversal()

template<typename Callable>
bool WsfOrbitalMissionSequence::PreOrderTraversal ( Callable aOperation)
inline

Perform a pre-order traversal on the mission sequence.

This will perform a pre-order traversal of the mission sequence, invoking the given aOperation on each mission event. The provided operation must have the signature bool(WsfOrbitalEvent*), and will return true if the traversal should proceed beyond the given orbital event, and false if the traversal should halt.

Parameters
aOperation- A callable entity containing the operation to perform at each event of the sequence.
Returns
- true if every invocation of the operation returns true; false otherwise.

References WsfOrbitalMissionSequence().

◆ ProcessInput()

bool WsfOrbitalMissionSequence::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 WsfOrbitalEvent.

References ProcessInputWithIgnore().

◆ ProcessInputWithIgnore()

bool WsfOrbitalMissionSequence::ProcessInputWithIgnore ( UtInput & aInput,
bool aIgnoreSomeExceptions )

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