WSF
WsfOrbitalManeuver Class Referenceabstract

#include <WsfOrbitalManeuver.hpp>

Inheritance diagram for WsfOrbitalManeuver:
Collaboration diagram for WsfOrbitalManeuver:

Public Member Functions

 WsfOrbitalManeuver (const WsfOrbitalManeuver &aSrc)=default
WsfOrbitalManeuveroperator= (const WsfOrbitalManeuver &)=delete
 ~WsfOrbitalManeuver () override=default
WsfOrbitalManeuverClone () const override=0
 Make a copy of this object.
bool VerifyCondition () const override
bool EvaluatePreconditions (const wsf::space::OrbitalMissionContext &aContext) const override
bool EvaluatePostconditions (const wsf::space::OrbitalMissionContext &aContext) const override
virtual void ComputeDeltaV (const UtCalendar &aCurrentTime, const UtCalendar &aEvaluationTime, const UtOrbitalPropagatorBase &aPropagator, UtVec3d &aDeltaV) const
const char * GetScriptClassName () const override
 Return the name of the script class associated with this class.
double GetDeltaV () const override
double GetRequiredDeltaV (const UtOrbitalPropagatorBase &aPropagator) const override
Public Member Functions inherited from WsfOrbitalEvent
 WsfOrbitalEvent (const WsfOrbitalEvent &aSrc)
WsfOrbitalEventoperator= (const WsfOrbitalEvent &)=delete
 ~WsfOrbitalEvent () override=default
bool ProcessInput (UtInput &aInput) override
virtual bool Initialize (const UtCalendar &aEpoch, const wsf::space::OrbitalMissionContext &aContext)
bool CanVerify () const
 Return whether this event can be verified.
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 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 bool GetNextExecutionTime (const UtCalendar &aCurrentTime, const UtOrbitalPropagatorBase &aPropagator, UtCalendar &aNextExecutionTime)
 For finite events, return the next time the event should be executed.
virtual void Accept (WsfOrbitalEventVisitor *aVisitorPtr)=0
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

 WsfOrbitalManeuver (const WsfScenario &aScenario)
bool InitializeTimes (const UtCalendar &aEpoch, const wsf::space::OrbitalMissionContext &aContext) override
bool ExecuteEvent (const UtCalendar &aEpoch, wsf::space::OrbitalMissionContext &aContext) override
bool EvaluateCompletion (const UtCalendar &aEpoch, const UtOrbitalPropagatorBase &aPropagator) override
const UtOrbitalPropagatorBase * GetTargetPropagatorPerception (WsfLocalTrack &aLocalTrack, const wsf::space::OrbitalMissionContext &aContext) const
const UtOrbitalPropagatorBase * GetTargetPropagatorTruth (WsfStringId aTargetName, WsfSimulation *aSimulationPtr) const
 Get the truth target propagator associated with a space mover on the named platform.
Protected Member Functions inherited from WsfOrbitalEvent
 WsfOrbitalEvent (const WsfScenario &aScenario)
virtual bool InitializeVariables (const UtCalendar &aCurrentTime, const UtCalendar &aEvaluationTime, const wsf::space::OrbitalMissionContext &aContext)
Protected Member Functions inherited from WsfUniqueId
void AssignUniqueId (WsfSimulation *aSimulationPtr)
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Protected Attributes

double mDeltaV
double mRemainingDeltaV
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

A Base class for orbital maneuvers. Derived classes must define the "ComputeDeltaV" and "Clone" methods. For any maneuvers that rely on a Condition (see below) to succeed, the "EvaluatePreconditions" method should be implemented. Likewise, for any post-maneuver criteria that must be evaluated (e.g., orbit not intersecting the Earth), the "EvaluatePostConditions" method should be implemented. Orbital maneuvers can either be executed with a mover in the context of a simulation, or they can be executed exclusively with an orbital propagator. In the latter case, the unique id and script accessible base classes are not used.

Constructor & Destructor Documentation

◆ WsfOrbitalManeuver() [1/2]

WsfOrbitalManeuver::WsfOrbitalManeuver ( const WsfOrbitalManeuver & aSrc)
default

◆ ~WsfOrbitalManeuver()

WsfOrbitalManeuver::~WsfOrbitalManeuver ( )
overridedefault

◆ WsfOrbitalManeuver() [2/2]

WsfOrbitalManeuver::WsfOrbitalManeuver ( const WsfScenario & aScenario)
protected

Member Function Documentation

◆ Clone()

WsfOrbitalManeuver * WsfOrbitalManeuver::Clone ( ) const
overridepure virtual

Make a copy of this object.

Implements WsfOrbitalEvent.

References WsfOrbitalManeuver().

◆ ComputeDeltaV()

virtual void WsfOrbitalManeuver::ComputeDeltaV ( const UtCalendar & aCurrentTime,
const UtCalendar & aEvaluationTime,
const UtOrbitalPropagatorBase & aPropagator,
UtVec3d & aDeltaV ) const
inlinevirtual

Compute the total delta-V needed to complete the associated maneuver. If this is a finite maneuver this method will be called multiple times to complete the maneuver.

Parameters
aCurrentTimeThe current time, which may be different than the evaluation time in a finite maneuver. For example, the maneuver may be scheduled to start before the evaluation time to provide an optimal burn interval about the given constraint. Typically this will start at mStartTime and continue to be evaluated at the update interval of the maneuver.
aEvaluationTimeThe time at which the delta-v is to be computed. Typically this will be mEvaluationTime.
aPropagatorThe propagator representing the current state of the executor of the maneuver. When executing in a simulation context, this propagator will refer to the space mover's propagator. When executing in a verification context, this propagator will be the propagator performing the trial run of the mission sequence.
aDeltaVThe delta-v required to complete the maneuver.

Referenced by ExecuteEvent(), GetRequiredDeltaV(), and InitializeTimes().

◆ EvaluateCompletion()

bool WsfOrbitalManeuver::EvaluateCompletion ( const UtCalendar & aEpoch,
const UtOrbitalPropagatorBase & aPropagator )
overrideprotectedvirtual

Evaluate whether a maneuver is marked as complete. If it is complete, mIsComplete is true in Execute(). otherwise do nothing. The default implementation checks to see whether sufficient delta-V has been expended to complete the maneuver.

Reimplemented from WsfOrbitalEvent.

References mRemainingDeltaV.

◆ EvaluatePostconditions()

bool WsfOrbitalManeuver::EvaluatePostconditions ( const wsf::space::OrbitalMissionContext & aContext) const
overridevirtual

As part of maneuver verification, evaluate any required postconditions associated with the maneuver. These checks involve making sure that this is an expected post-maneuver orbit; for instance, there is no intersection with the earth and it is not hyperbolic.

Parameters
aContextThe orbital mission context in which this event is executing.
Returns
True if the post-conditions are met, false otherwise.

Reimplemented from WsfOrbitalEvent.

References wsf::space::OrbitalMissionContext::GetAvailableDeltaV(), wsf::space::OrbitalMissionContext::GetPropagator(), GetRequiredDeltaV(), WsfObject::GetType(), and ok.

◆ EvaluatePreconditions()

bool WsfOrbitalManeuver::EvaluatePreconditions ( const wsf::space::OrbitalMissionContext & aContext) const
overridevirtual

As part of maneuver verification, evaluate any preconditions associated with the maneuver. Usually this involves making sure that the provided WsfOrbitalManeuver::Condition is correct.

Parameters
aContextThe orbital mission context in which this event is executing.
Returns
True if the preconditions are met, false otherwise.

Reimplemented from WsfOrbitalEvent.

References WsfObject::GetType(), ok, and VerifyCondition().

◆ ExecuteEvent()

bool WsfOrbitalManeuver::ExecuteEvent ( const UtCalendar & aEpoch,
wsf::space::OrbitalMissionContext & aContext )
overrideprotectedvirtual

Direct the space mover associated with this maneuver to execute the maneuver. The space mover may or may not be successful in actually executing the maneuver due to delta-V limitations. In the case of finite maneuvers, this method is called multiple times at the given update interval.

Parameters
aEpochThe absolute time at which to execute the maneuver.
aContextThe orbital mission context in which this event is executing.

Implements WsfOrbitalEvent.

References ComputeDeltaV(), wsf::space::OrbitalMissionContext::GetPropagator(), wsf::space::OrbitalMissionContext::Maneuver(), mDeltaV, WsfOrbitalEvent::mEvaluationTime, mRemainingDeltaV, success, and wsf::space::OrbitalMissionContext::Update().

◆ GetDeltaV()

double WsfOrbitalManeuver::GetDeltaV ( ) const
inlineoverridevirtual

Get the delta V expended to execute this maneuver. This value may increment during execution of a finite maneuver. the full value is only valid when IsComplete() is true.

Reimplemented from WsfOrbitalEvent.

References mDeltaV.

◆ GetRequiredDeltaV()

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

Return the minimum required delta-v needed to complete this maneuver. If the maneuver is impulsive, this value will be the actual required value; otherwise if finite, the actual value will be greater.

Note
Use this method to determine the feasibility of maneuver execution for a given delta-V budget.

Reimplemented from WsfOrbitalEvent.

References ComputeDeltaV(), and WsfOrbitalEvent::mEvaluationTime.

Referenced by EvaluatePostconditions(), and InitializeTimes().

◆ GetScriptClassName()

const char * WsfOrbitalManeuver::GetScriptClassName ( ) const
inlineoverride

Return the name of the script class associated with this class.

◆ GetTargetPropagatorPerception()

◆ GetTargetPropagatorTruth()

const UtOrbitalPropagatorBase * WsfOrbitalManeuver::GetTargetPropagatorTruth ( WsfStringId aTargetName,
WsfSimulation * aSimulationPtr ) const
protected

Get the truth target propagator associated with a space mover on the named platform.

References WsfPlatform::GetMover(), WsfSimulation::GetPlatformByName(), and WsfSpaceMoverBase::GetPropagator().

◆ GetTypeId()

WsfStringId WsfOrbitalManeuver::GetTypeId ( )
static

Referenced by WsfOrbitalManeuver().

◆ InitializeTimes()

bool WsfOrbitalManeuver::InitializeTimes ( const UtCalendar & aEpoch,
const wsf::space::OrbitalMissionContext & aContext )
overrideprotectedvirtual

◆ operator=()

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

References WsfOrbitalManeuver().

◆ VerifyCondition()

bool WsfOrbitalManeuver::VerifyCondition ( ) const
overridevirtual

Verify that the condition set in the maneuver is one of the possible valid constraints. Note that when executed the constraint may not be valid at the time.

Reimplemented from WsfOrbitalEvent.

Referenced by EvaluatePreconditions().

Member Data Documentation

◆ mDeltaV

double WsfOrbitalManeuver::mDeltaV
protected

◆ mRemainingDeltaV

double WsfOrbitalManeuver::mRemainingDeltaV
protected

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