WSF
wsf::space::OrbitalMissionSimulationContext Class Reference

#include <WsfSpaceOrbitalMissionSimulationContext.hpp>

Inheritance diagram for wsf::space::OrbitalMissionSimulationContext:
Collaboration diagram for wsf::space::OrbitalMissionSimulationContext:

Public Member Functions

 OrbitalMissionSimulationContext (WsfSpaceMoverBase &aMover)
 OrbitalMissionSimulationContext (WsfSpaceMoverBase &aMover, const OrbitalMissionSimulationContext &aOther)
 OrbitalMissionSimulationContext (const OrbitalMissionSimulationContext &aOther)=delete
 ~OrbitalMissionSimulationContext () override=default
void Update (const UtCalendar &aEpoch) override
 Update the MissionEvents state to the specified absolute time.
bool Initialize (const UtCalendar &aEpoch) override
const UtOrbitalPropagatorBase & GetPropagator () const override
WsfSimulationGetSimulation () const override
WsfSpaceMoverBaseGetSpaceMover () const override
void InitiateMissionEvent (const UtCalendar &aEpoch, const WsfOrbitalEvent &aMissionEvent) const override
void UpdateMissionEvent (const UtCalendar &aEpoch, const WsfOrbitalEvent &aMissionEvent) const override
void CompleteMissionEvent (const UtCalendar &aEpoch, const WsfOrbitalEvent &aMissionEvent) const override
void CancelMissionEvent (const UtCalendar &aEpoch, const WsfOrbitalEvent &aMissionEvent) const override
bool Maneuver (const UtCalendar &aEpoch, const UtVec3d &aCommandedDeltaV, UtVec3d &aActualDeltaV) const override
double GetAvailableDeltaV () const override
 Get the available delta-v in the executing context.
double GetRequiredDeltaV (double aDuration) const override
 Get the delta-v required to maneuver for the given aDuration.
bool PerformStagingOperation () const override
 Perform a staging operation.
std::string GetName () const override
 Get a name identifying this orbital mission context.
double GetManeuverDuration (const UtCalendar &aEpoch, const WsfOrbitalManeuver &aManeuver, double aDeltaV) const override
bool ProcessInput (UtInput &aInput)
 This method will read in a mission sequence from input.
UtCalendar GetLastUpdateTime () const
void Schedule (WsfOrbitalEvent *aMissionEventPtr)
 Schedule the given orbital event as a simulation event.
void ScheduleMission (const UtCalendar &aEpoch, std::unique_ptr< WsfOrbitalMissionSequence > aMissionEventsPtr)
const WsfOrbitalMissionSequenceGetMissionEvents () const
 Return the mission events configured for this context.
Public Member Functions inherited from wsf::space::OrbitalMissionContext
 OrbitalMissionContext ()=default
virtual ~OrbitalMissionContext ()=default

Detailed Description

The simulation mission context is used for misson sequence execution during a simulation.

This orbital mission context connects to simulation objects during the execution of the mission sequence during the simulation. Additionally, this context stores the mission sequence for space movers.

Constructor & Destructor Documentation

◆ OrbitalMissionSimulationContext() [1/3]

wsf::space::OrbitalMissionSimulationContext::OrbitalMissionSimulationContext ( WsfSpaceMoverBase & aMover)
explicit

◆ OrbitalMissionSimulationContext() [2/3]

wsf::space::OrbitalMissionSimulationContext::OrbitalMissionSimulationContext ( WsfSpaceMoverBase & aMover,
const OrbitalMissionSimulationContext & aOther )

◆ OrbitalMissionSimulationContext() [3/3]

wsf::space::OrbitalMissionSimulationContext::OrbitalMissionSimulationContext ( const OrbitalMissionSimulationContext & aOther)
delete

◆ ~OrbitalMissionSimulationContext()

wsf::space::OrbitalMissionSimulationContext::~OrbitalMissionSimulationContext ( )
overridedefault

Member Function Documentation

◆ CancelMissionEvent()

void wsf::space::OrbitalMissionSimulationContext::CancelMissionEvent ( const UtCalendar & aEpoch,
const WsfOrbitalEvent & aMissionEvent ) const
overridevirtual

Indicate that an orbital mission event was cancelled.

This method offers a means for this context to take action whenever a mission event is cancelled, such as triggering observers.

Parameters
aEpochThe epoch at which point a mission event was cancelled.
aMissionEventThe mission event being cancelled.

Reimplemented from wsf::space::OrbitalMissionContext.

References GetSimulation(), GetSpaceMover(), WsfObserver::OrbitalManeuverCanceled(), and simTime.

◆ CompleteMissionEvent()

void wsf::space::OrbitalMissionSimulationContext::CompleteMissionEvent ( const UtCalendar & aEpoch,
const WsfOrbitalEvent & aMissionEvent ) const
overridevirtual

Indicate that an orbital mission event was completed.

This method offers a means for this context to take action whenever a mission event is completed, such as triggering observers.

Parameters
aEpochThe epoch at which point a mission event was completed.
aMissionEventThe mission event being completed.

Reimplemented from wsf::space::OrbitalMissionContext.

References GetSimulation(), GetSpaceMover(), WsfObserver::OrbitalManeuverCompleted(), and simTime.

◆ GetAvailableDeltaV()

double wsf::space::OrbitalMissionSimulationContext::GetAvailableDeltaV ( ) const
overridevirtual

Get the available delta-v in the executing context.

Reimplemented from wsf::space::OrbitalMissionContext.

◆ GetLastUpdateTime()

UtCalendar wsf::space::OrbitalMissionSimulationContext::GetLastUpdateTime ( ) const
inline

◆ GetManeuverDuration()

double wsf::space::OrbitalMissionSimulationContext::GetManeuverDuration ( const UtCalendar & aEpoch,
const WsfOrbitalManeuver & aManeuver,
double aDeltaV ) const
overridevirtual

Return the duration of the given maneuver for the given delta-v in this context.

Parameters
aEpochThe epoch at which the maneuver is executing.
aManeuverThe maneuver in question.
aDeltaVThe delta-v to be expended in the maneuver.
Returns
The expected duration of the maneuver.

Reimplemented from wsf::space::OrbitalMissionContext.

◆ GetMissionEvents()

const WsfOrbitalMissionSequence & wsf::space::OrbitalMissionSimulationContext::GetMissionEvents ( ) const

Return the mission events configured for this context.

◆ GetName()

std::string wsf::space::OrbitalMissionSimulationContext::GetName ( ) const
overridevirtual

Get a name identifying this orbital mission context.

Reimplemented from wsf::space::OrbitalMissionContext.

◆ GetPropagator()

const UtOrbitalPropagatorBase & wsf::space::OrbitalMissionSimulationContext::GetPropagator ( ) const
overridevirtual

Return the propagator representing the current state of the executing platform.

In some contexts, this will not be a propagator owned by any platform, but will instead be the propagator a platform would have were it executing the mission sequence during a simulation.

Returns
The propagator giving the current state during the execution of the mission.

Implements wsf::space::OrbitalMissionContext.

◆ GetRequiredDeltaV()

double wsf::space::OrbitalMissionSimulationContext::GetRequiredDeltaV ( double aDuration) const
overridevirtual

Get the delta-v required to maneuver for the given aDuration.

Reimplemented from wsf::space::OrbitalMissionContext.

◆ GetSimulation()

WsfSimulation * wsf::space::OrbitalMissionSimulationContext::GetSimulation ( ) const
overridevirtual

Return the simulation to which this context refers.

Some OrbitalMissionContexts will be associated with a simulation, either because the mission is executing in the simulation, or because the simulation is available as a source of information.

Returns
The simulation to which this context refers, or nullptr.

Reimplemented from wsf::space::OrbitalMissionContext.

Referenced by CancelMissionEvent(), CompleteMissionEvent(), InitiateMissionEvent(), Schedule(), ScheduleMission(), and UpdateMissionEvent().

◆ GetSpaceMover()

WsfSpaceMoverBase * wsf::space::OrbitalMissionSimulationContext::GetSpaceMover ( ) const
overridevirtual

Return the space mover to which this context refers.

Some OrbitalMissionContexts will be associtated with a space mover, typically because the context is on in which a space mover's state is actually being updated by the mission sequence.

Returns
The space mover to which this context refers, or nullptr.

Reimplemented from wsf::space::OrbitalMissionContext.

Referenced by CancelMissionEvent(), CompleteMissionEvent(), InitiateMissionEvent(), and UpdateMissionEvent().

◆ Initialize()

bool wsf::space::OrbitalMissionSimulationContext::Initialize ( const UtCalendar & aEpoch)
overridevirtual

Initialize the context at the given aEpoch.

Parameters
aEpochThe epoch at which this context is being initialized.
Returns
true if initialization was successful, false otherwise.

Implements wsf::space::OrbitalMissionContext.

References WsfOrbitalEvent::GetCurrentMissionEvent(), ok, and Schedule().

◆ InitiateMissionEvent()

void wsf::space::OrbitalMissionSimulationContext::InitiateMissionEvent ( const UtCalendar & aEpoch,
const WsfOrbitalEvent & aMissionEvent ) const
overridevirtual

Indicate that an orbital mission event was initiated.

This method offers a means for this context to take action whenever a mission event is initiated, such as triggering observers.

Parameters
aEpochThe epoch at which point a mission event was initiated.
aMissionEventThe mission event being initiated.

Reimplemented from wsf::space::OrbitalMissionContext.

References GetSimulation(), GetSpaceMover(), WsfObserver::OrbitalManeuverInitiated(), and simTime.

◆ Maneuver()

bool wsf::space::OrbitalMissionSimulationContext::Maneuver ( const UtCalendar & aEpoch,
const UtVec3d & aCommandedDeltaV,
UtVec3d & aActualDeltaV ) const
overridevirtual

Command a maneuver at the given epoch.

Indicate to the context that a maneuver should occur at the given aEpoch and there should be a change in ECI velocity of the given aCommandedDeltaV. The actual execution of the maneuver may be unable to achieve the commanded delta-v, so the actually achieved delta-v is returned via aActualDeltaV. If the maneuver was unsuccessful completely, false is returned.

Parameters
aEpochThe epoch at which the maneuver is to occur.
aCommandedDeltaVThe delta-v commanded for the maneuver.
aActualDeltaV[out] The actual delta-v that was possible.
Returns
true if the maneuver was successful, false otherwise.

Reimplemented from wsf::space::OrbitalMissionContext.

References WsfSpaceMoverBase::Maneuver().

◆ PerformStagingOperation()

bool wsf::space::OrbitalMissionSimulationContext::PerformStagingOperation ( ) const
overridevirtual

Perform a staging operation.

Reimplemented from wsf::space::OrbitalMissionContext.

◆ ProcessInput()

bool wsf::space::OrbitalMissionSimulationContext::ProcessInput ( UtInput & aInput)

This method will read in a mission sequence from input.

◆ Schedule()

void wsf::space::OrbitalMissionSimulationContext::Schedule ( WsfOrbitalEvent * aMissionEventPtr)

Schedule the given orbital event as a simulation event.

References WsfSimulation::AddEvent(), GetSimulation(), and WsfOrbitalEvent::GetStartTime().

Referenced by Initialize().

◆ ScheduleMission()

void wsf::space::OrbitalMissionSimulationContext::ScheduleMission ( const UtCalendar & aEpoch,
std::unique_ptr< WsfOrbitalMissionSequence > aMissionEventsPtr )

Set the MissionEvent sequence using an event that executes at the current simulation time (necessary because a scripted event can schedule a new sequence, thus potentially deleting itself). Then, initialize and schedule the first event in the new sequence.

Parameters
aEpochThe current epoch, to be used as the basis for scheduling mission.
aMissionEventsPtrThe new mission events sequence to be executed.

References WsfSimulation::AddEvent(), and GetSimulation().

◆ Update()

void wsf::space::OrbitalMissionSimulationContext::Update ( const UtCalendar & aEpoch)
overridevirtual

Update the MissionEvents state to the specified absolute time.

Implements wsf::space::OrbitalMissionContext.

References simTime.

◆ UpdateMissionEvent()

void wsf::space::OrbitalMissionSimulationContext::UpdateMissionEvent ( const UtCalendar & aEpoch,
const WsfOrbitalEvent & aMissionEvent ) const
overridevirtual

Indicate that an orbital mission event was updated.

This method offers a means for this context to take action whenever a mission event is updated, such as triggering observers.

Parameters
aEpochThe epoch at which point a mission event was updated.
aMissionEventThe mission event being updated.

Reimplemented from wsf::space::OrbitalMissionContext.

References GetSimulation(), GetSpaceMover(), WsfObserver::OrbitalManeuverUpdated(), and simTime.


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