|
WSF
|
#include <WsfOrbitalEvent.hpp>


Classes | |
| class | AdvanceMissionEventException |
Public Member Functions | |
| WsfOrbitalEvent (const WsfOrbitalEvent &aSrc) | |
| WsfOrbitalEvent & | operator= (const WsfOrbitalEvent &)=delete |
| ~WsfOrbitalEvent () override=default | |
| WsfOrbitalEvent * | Clone () const override=0 |
| Make a copy of this object. | |
| 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 | 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::OrbitalPropagatorCondition & | GetCondition () const |
| Return the condition for event execution (const). | |
| wsf::space::OrbitalPropagatorCondition & | GetCondition () |
| 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 WsfOrbitalEvent * | GetCurrentMissionEvent () const |
| virtual WsfOrbitalEvent * | GetCurrentMissionEvent () |
| virtual WsfOrbitalEvent * | AdvanceMissionEvent (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. | |
| 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. | |
| WsfUniqueId & | operator= (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 TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (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 WsfOrbitalEvent * | Create (const WsfScenario &aScenario, UtInput &aInput, bool aIgnoreSomeExceptions=false) |
Protected Member Functions | |
| 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 | ExecuteEvent (const UtCalendar &aCurrentTime, wsf::space::OrbitalMissionContext &aContext)=0 |
| 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()). | |
Static Protected Member Functions | |
| static WsfOrbitalEvent * | Create (const WsfScenario &aScenario, WsfStringId aType) |
Protected Attributes | |
| ut::CloneablePtr< wsf::space::OrbitalPropagatorCondition > | mCondition {} |
| 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 WsfScenario & | mScenario |
Additional Inherited Members | |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
A Base class for orbital events. Derived classes must define the "ComputeDeltaV" and "Clone" methods. For any events that rely on a Condition (see below) to succeed, the "EvaluatePreconditions" method should be implemented. Likewise, for any post-event criteria that must be evaluated (e.g., orbit not intersecting the Earth), the "EvaluatePostConditions" method should be implemented. Orbital events 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.
| WsfOrbitalEvent::WsfOrbitalEvent | ( | const WsfOrbitalEvent & | aSrc | ) |
References mCanVerify, mCondition, mDebug, mDuration, mEvaluationTime, mHasExecuted, mIsCanceled, mIsComplete, mIsFinite, mScenario, mStartTime, mUpdateInterval, WsfObject::WsfObject(), WsfOrbitalEvent(), and WsfUniqueId::WsfUniqueId().
Referenced by Accept(), AdvanceMissionEvent(), WsfOrbitalMissionSequence::AdvanceMissionEvent(), WsfOrbitalAttitudeChangeEvent::Clone(), Clone(), WsfOrbitalScriptEvent::Clone(), WsfOrbitalStagingEvent::Clone(), Create(), Create(), ExecuteEvent(), GetCurrentMissionEvent(), GetCurrentMissionEvent(), WsfOrbitalMissionSequence::GetCurrentMissionEvent(), WsfOrbitalMissionSequence::GetCurrentMissionEvent(), WsfOrbitalMissionSequence::GetNextMissionEvent(), operator=(), WsfOrbitalScriptEvent::operator=(), WsfOrbitalMissionSequence::ProcessInputWithIgnore(), WsfOrbitalAttitudeChangeEvent::WsfOrbitalAttitudeChangeEvent(), WsfOrbitalAttitudeChangeEvent::WsfOrbitalAttitudeChangeEvent(), WsfOrbitalEvent(), WsfOrbitalManeuver::WsfOrbitalManeuver(), WsfOrbitalMissionSequence::WsfOrbitalMissionSequence(), WsfOrbitalMissionSequence::WsfOrbitalMissionSequence(), WsfOrbitalScriptEvent::WsfOrbitalScriptEvent(), WsfOrbitalScriptEvent::WsfOrbitalScriptEvent(), WsfOrbitalStagingEvent::WsfOrbitalStagingEvent(), WsfOrbitalStagingEvent::WsfOrbitalStagingEvent(), and WsfOrbitalAttitudeChangeEvent::~WsfOrbitalAttitudeChangeEvent().
|
overridedefault |
|
explicitprotected |
|
pure virtual |
Implemented in WsfOrbitalAttitudeChangeEvent, WsfOrbitalMissionSequence, WsfOrbitalScriptEvent, and WsfOrbitalStagingEvent.
References InitializeTimes(), InitializeVariables(), and WsfOrbitalEvent().
|
virtual |
Return the next MissionEvent object in a sequence (see WsfMissionEventSequence::AdvanceMissionEvent). If this MissionEvent is not a MissionEvent sequence, zero is returned.
Advance to the "next" MissionEvent in the MissionEvent sequence, after the current MissionEvent. The base class' version simply returns nullptr if it has executed, or "this" if not (see WsfOrbitalMissionSequence::AdvanceMissionEvent).
| aEpoch | The current epoch, to be used as the basis for evaluating the next MissionEvent in the sequence. |
| aContext | The orbital mission context in which this event is being executed. |
Reimplemented in WsfOrbitalMissionSequence.
References mHasExecuted, and WsfOrbitalEvent().
Referenced by WsfOrbitalMissionSequence::AdvanceMissionEvent().
|
inline |
Return whether this event can be verified.
References mCanVerify.
|
overridepure virtual |
Make a copy of this object.
Implements WsfObject.
Implemented in WsfOrbitalAttitudeChangeEvent, WsfOrbitalManeuver, WsfOrbitalMissionSequence, WsfOrbitalScriptEvent, and WsfOrbitalStagingEvent.
References Create(), Initialize(), and WsfOrbitalEvent().
Referenced by Create(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
static |
Factory method to create an orbital event.
| aScenario | The scenario object that owns the orbital event types factory. |
| aInput | The input object specifying the orbital event. |
| aIgnoreSomeExceptions | Indicate if this method should ignore bad value exceptions. |
References Create(), ProcessInput(), and WsfOrbitalEvent().
Referenced by Clone(), Create(), ExecuteEvent(), and WsfOrbitalMissionSequence::ProcessInputWithIgnore().
|
staticprotected |
Per-mover factory method to create events by type.
| aScenario | The current scenario (used to find and clone a prototype event). |
| aType | The type of event to create. |
References Clone(), WsfObjectTypeList< T >::Find(), WsfScenario::GetTypes(), and WsfOrbitalEvent().
|
protectedvirtual |
Evaluate whether an event is marked as complete. If it is complete, mIsComplete is true in Execute(), and the event sequence will progress to the next event.
Reimplemented in WsfOrbitalManeuver, and WsfOrbitalScriptEvent.
References mDuration, and mStartTime.
Referenced by WsfOrbitalScriptEvent::EvaluateCompletion(), Execute(), and ExecuteEvent().
|
virtual |
As part of event verification, evaluate any required postconditions associated with the event. These checks involve making sure that this is an expected post-event orbit; for instance, there is no intersection with the earth and it is not hyperbolic.
| aContext | The orbital mission context in which this event is executing. |
Reimplemented in WsfOrbitalManeuver.
|
virtual |
As part of event verification, evaluate any preconditions associated with the event. Usually this involves making sure that the provided WsfOrbitalEvent::Condition is correct.
| aContext | The orbital mission context in which this event is executing. |
Reimplemented in WsfOrbitalManeuver.
| bool WsfOrbitalEvent::Execute | ( | const UtCalendar & | aEpoch, |
| wsf::space::OrbitalMissionContext & | aContext ) |
Direct the space mover associated with this MissionEvent to execute the MissionEvent. The space mover may or may not be successful in actually executing the MissionEvent due to delta-V limitations. In the case of finite MissionEvents, this method is called multiple times at the given update interval.
References wsf::space::OrbitalMissionContext::CompleteMissionEvent(), EvaluateCompletion(), ExecuteEvent(), wsf::space::OrbitalMissionContext::GetPropagator(), wsf::space::OrbitalMissionContext::InitiateMissionEvent(), IsComplete(), mHasExecuted, mIsComplete, mStartTime, and wsf::space::OrbitalMissionContext::UpdateMissionEvent().
|
protectedpure virtual |
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.
| aCurrentTime | The current time to be used in the event execution. |
| aContext | The orbital mission context in which this event is executing. |
Implemented in WsfOrbitalAttitudeChangeEvent, WsfOrbitalManeuver, WsfOrbitalScriptEvent, and WsfOrbitalStagingEvent.
References Create(), EvaluateCompletion(), and WsfOrbitalEvent().
Referenced by Execute().
|
inline |
Return the condition for event execution (non-const).
References mCondition.
|
inline |
Return the condition for event execution (const).
References mCondition.
Referenced by WsfOrbitalScriptEvent::GetNextExecutionTime(), WsfOrbitalManeuver::InitializeTimes(), wsf::event::utils::PrintOrbitalManeuverData(), and wsf::event::utilsCSV::PrintOrbitalManeuverData().
|
inline |
Return the condition string for event execution.
References mCondition.
Referenced by wsf::event::utils::PrintOrbitalManeuverData(), and wsf::event::utilsCSV::PrintOrbitalManeuverData().
|
inlinevirtual |
Return the current MissionEvent object (see WsfOrbitalMissionSequence::GetCurrentMissionEvent). If this MissionEvent is not a MissionEvent sequence, "this" is returned.
Reimplemented in WsfOrbitalMissionSequence.
References WsfOrbitalEvent().
|
inlinevirtual |
Return the current event object (see WsfOrbitalMissionSequence::GetCurrentEvent). If this event is not a event sequence, "this" is returned.
Reimplemented in WsfOrbitalMissionSequence.
References WsfOrbitalEvent().
Referenced by WsfOrbitalMissionSequence::GetCurrentMissionEvent(), WsfOrbitalMissionSequence::GetCurrentMissionEvent(), WsfSpaceMoverBase::GetCurrentMissionEvent(), wsf::space::OrbitalMissionSimulationContext::Initialize(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
inlinevirtual |
Get the delta V expended to execute this event; the default is to return 0.0.
Reimplemented in WsfOrbitalManeuver, and WsfOrbitalMissionSequence.
|
inline |
Return the full duration of the event. If the event is impulsive, this method returns 0.
References mDuration.
Referenced by WsfOrbitalManeuvering::GetManeuverDuration(), wsf::event::utils::PrintOrbitalManeuverData(), and wsf::event::utilsCSV::PrintOrbitalManeuverData().
|
inline |
Return the nominal time to execute the event impulsively.
References mEvaluationTime.
|
virtual |
For finite events, return the next time the event should be executed.
Reimplemented in WsfOrbitalScriptEvent.
References GetUpdateInterval(), and IsFinite().
Referenced by WsfOrbitalScriptEvent::GetNextExecutionTime().
|
inlinevirtual |
Return the minimum required delta-v needed to complete this event; the default is to return 0.0.
Reimplemented in WsfOrbitalManeuver, and WsfOrbitalMissionSequence.
|
inlineoverride |
|
inline |
Return the time at which the event will begin executing.
References mStartTime.
Referenced by WsfOrbitalManeuvering::GetManeuverDuration(), WsfOrbitalManeuvering::Maneuver(), wsf::space::OrbitalMissionSimulationContext::Schedule(), and wsf::space::OrbitalMissionVerificationContext::VerifyMission().
|
inline |
For finite events, return the interval at which the event is to be re-evaluated.
References mUpdateInterval.
Referenced by GetNextExecutionTime().
|
inline |
Return whether the event has executed at least once (i.e., Execute() has been called).
References mHasExecuted.
Referenced by WsfOrbitalManeuvering::Maneuver().
|
virtual |
Initialize this MissionEvent in preparation to execute it.
| aEpoch | The current epoch, to be used as the basis for evaluating the next mission event in the sequence. |
| aContext | The orbital mission context in which this event is executing. |
Reimplemented in WsfOrbitalAttitudeChangeEvent, WsfOrbitalMissionSequence, and WsfOrbitalScriptEvent.
References WsfUniqueId::AssignUniqueId(), wsf::space::OrbitalMissionContext::GetSimulation(), InitializeTimes(), mCondition, ok, and VerifyCondition().
Referenced by Clone(), WsfOrbitalAttitudeChangeEvent::Initialize(), and WsfOrbitalScriptEvent::Initialize().
|
protectedvirtual |
Initialize the start and evaluation times for the event. In the case of finite maneuvers set the start time according to a patched conic approximation.
Reimplemented in WsfOrbitalManeuver.
References wsf::space::OrbitalMissionContext::GetPropagator(), InitializeVariables(), mCondition, mEvaluationTime, mStartTime, and ok.
Referenced by Accept(), and Initialize().
|
protectedvirtual |
Called during InitializeTimes(), this method should be overridden to ensure proper initialization of any variables used in ComputeDeltaV. Default is to do nothing.
| aCurrentTime | The current time. |
| aEvaluationTime | The evaluation time of the event. |
| aContext | The orbital mission context in which this event is being executed. |
Referenced by Accept(), InitializeTimes(), and WsfOrbitalManeuver::InitializeTimes().
|
inline |
Return whether the event is canceled.
References mIsCanceled.
|
inline |
Return whether the event is complete.
References mIsComplete.
Referenced by Execute(), WsfOrbitalMissionSequence::GetCurrentMissionEvent(), and WsfOrbitalMissionSequence::GetCurrentMissionEvent().
|
inline |
Is the event finite?
References mIsFinite.
Referenced by GetNextExecutionTime(), WsfOrbitalScriptEvent::GetNextExecutionTime(), and WsfOrbitalManeuvering::Maneuver().
|
inlinevirtual |
Is this MissionEvent a MissionEvent sequence (WsfMissionEventSequence)?
Reimplemented in WsfOrbitalMissionSequence.
|
delete |
References WsfOrbitalEvent().
|
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'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
Reimplemented in WsfOrbitalMissionSequence, and WsfOrbitalScriptEvent.
References wsf::space::OrbitalPropagatorConditionTypes::Get(), mCondition, mDebug, mDuration, mIsFinite, mScenario, and mUpdateInterval.
Referenced by Create(), WsfOrbitalAttitudeChangeEvent::ProcessInput(), WsfOrbitalScriptEvent::ProcessInput(), and WsfOrbitalMissionSequence::ProcessInputWithIgnore().
|
inline |
Mark the event as canceled.
References mIsCanceled.
|
inline |
Set the condition for execution.
References mCondition.
| void WsfOrbitalEvent::SetDuration | ( | const UtTimeValue & | aDuration | ) |
|
inline |
Set whether the event is finite.
References mIsFinite.
| void WsfOrbitalEvent::SetOnlyDuration | ( | const UtTimeValue & | aDuration | ) |
Set only the duration.
Unlike SetDuration, this method has not side effects on if the event is considered to be finite or not. Note that if the event is not set to be finite through some other means, this may result in no effect on the resulting simulation.
| aDuration | - The duration to set on the event. |
References mDuration.
|
inline |
Set the start time to begin event execution.
References mStartTime.
Referenced by UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
Set the update interval for which the event is to be re-evaluated.
References mUpdateInterval.
|
virtual |
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.
| aExecutingPlatformName | The name of the platform that would be executing this event. |
Reimplemented in WsfOrbitalAttitudeChangeEvent.
References WsfObject::GetType(), mCondition, mDuration, mIsFinite, and mUpdateInterval.
Referenced by WsfOrbitalAttitudeChangeEvent::ValidateParameterRanges().
|
virtual |
Verify that the condition set in the event is one of the possible valid constraints. Note that when executed the constraint may not be valid at the time.
Reimplemented in WsfOrbitalManeuver.
References wsf::space::ApoapsisCondition::cTYPE, wsf::space::AscendingNodeCondition::cTYPE, wsf::space::DescendingNodeCondition::cTYPE, wsf::space::EclipseEntryCondition::cTYPE, wsf::space::EclipseExitCondition::cTYPE, wsf::space::NoneCondition::cTYPE, wsf::space::PeriapsisCondition::cTYPE, wsf::space::RelativeTimeCondition::cTYPE, and mCondition.
Referenced by Initialize().
|
protected |
Referenced by CanVerify(), WsfOrbitalEvent(), WsfOrbitalEvent(), and WsfOrbitalScriptEvent::WsfOrbitalScriptEvent().
|
protected |
Referenced by WsfOrbitalMissionSequence::ComputeContraintEpoch(), GetCondition(), GetCondition(), GetConditionString(), Initialize(), InitializeTimes(), WsfOrbitalManeuver::InitializeTimes(), ProcessInput(), SetCondition(), ValidateParameterRanges(), VerifyCondition(), WsfOrbitalEvent(), and WsfOrbitalEvent().
|
protected |
Referenced by WsfOrbitalMissionSequence::AdvanceMissionEvent(), ProcessInput(), WsfOrbitalEvent(), and WsfOrbitalEvent().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by IsCanceled(), SetCanceled(), WsfOrbitalEvent(), and WsfOrbitalEvent().
|
protected |
Referenced by WsfOrbitalMissionSequence::AdvanceMissionEvent(), Execute(), IsComplete(), WsfOrbitalEvent(), and WsfOrbitalEvent().
|
protected |
|
protected |
Referenced by ProcessInput(), WsfOrbitalEvent(), and WsfOrbitalEvent().
|
protected |
Can this event be verified without running in a simulation?
Referenced by EvaluateCompletion(), Execute(), GetStartTime(), WsfOrbitalMissionSequence::Initialize(), InitializeTimes(), WsfOrbitalManeuver::InitializeTimes(), SetStartTime(), WsfOrbitalEvent(), and WsfOrbitalEvent().
|
protected |
Referenced by GetUpdateInterval(), ProcessInput(), SetUpdateInterval(), ValidateParameterRanges(), WsfOrbitalEvent(), and WsfOrbitalEvent().