WSF
WsfOrbitalManeuvering Class Referenceabstract

#include <WsfOrbitalManeuvering.hpp>

Inheritance diagram for WsfOrbitalManeuvering:
Collaboration diagram for WsfOrbitalManeuvering:

Public Member Functions

 WsfOrbitalManeuvering ()=default
 WsfOrbitalManeuvering (const WsfOrbitalManeuvering &aSrc)=default
WsfOrbitalManeuveringoperator= (const WsfOrbitalManeuvering &)=delete
 ~WsfOrbitalManeuvering () override=default
WsfOrbitalManeuveringClone () const override=0
bool ProcessInput (UtInput &aInput) override
virtual bool Initialize (const UtCalendar &aEpoch)
virtual void SetPlatformAttributes (WsfPlatform *aPlatform) const
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 Attributes

static constexpr double cINFINITE_DELTA_V = std::numeric_limits<double>::max()
 Constant value representing infinite delta-V; used to compare against values computed for maneuvers.
static constexpr double cINFINITE_DURATION = std::numeric_limits<double>::max()
 Constant value representing infinite maneuver duration; used to compare against values computed for maneuvers.

Utility methods that are optionally supported in derived classes.

bool mDebug {false}
UtCalendar mUpdateTime {}
virtual double GetAvailableDeltaV () const
virtual double GetAvailableDuration () const
 Return the available duration corresponding with the available delta-v.
virtual bool ReduceAvailableDeltaV_By (double aDeltaV)
virtual bool Maneuver (const UtCalendar &aEpoch, const WsfOrbitalManeuver &aManeuver, const UtVec3d &aCommandedDeltaV, UtVec3d &aActualDeltaV)
virtual bool PerformStagingOperation ()
 Default method returns false (see WsfRocketOrbitalManeuvering).
virtual double GetRequiredDuration (double aDeltaV) const =0
 Given a delta-v, return the required time to complete the maneuver.
virtual double GetRequiredDeltaV (double aDuration) const =0
 Given a maneuver duration, return the necessary delta-v.
const UtCalendar & GetUpdateTime () const
double GetManeuverDuration (const UtCalendar &aEpoch, const WsfOrbitalManeuver &aManeuver, double aDeltaV) const

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Detailed Description

Base class for orbital maneuvering functions. It serves both to execute a WsfManeuverSequence and is used by the WsfSpaceMoverBase as well as in a standalone role external to the simulation. In this latter capacity that the maneuver sequence can be verified using only a compatible UtOrbitalPropagatorBase derived class (typically UtOrbitalPropagator).

Constructor & Destructor Documentation

◆ WsfOrbitalManeuvering() [1/2]

◆ WsfOrbitalManeuvering() [2/2]

WsfOrbitalManeuvering::WsfOrbitalManeuvering ( const WsfOrbitalManeuvering & aSrc)
default

◆ ~WsfOrbitalManeuvering()

WsfOrbitalManeuvering::~WsfOrbitalManeuvering ( )
overridedefault

Member Function Documentation

◆ Clone()

WsfOrbitalManeuvering * WsfOrbitalManeuvering::Clone ( ) const
overridepure virtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements WsfObject.

Implemented in WsfRocketOrbitalManeuvering, and WsfSimpleOrbitalManeuvering.

References Initialize(), and WsfOrbitalManeuvering().

◆ GetAvailableDeltaV()

double WsfOrbitalManeuvering::GetAvailableDeltaV ( ) const
virtual

Return the remaining delta-V available. The value is allowed to go negative for verification purposes. Any negative value indicates no more delta-v is available.

Reimplemented in WsfRocketOrbitalManeuvering, and WsfSimpleOrbitalManeuvering.

References cINFINITE_DELTA_V.

Referenced by Initialize(), and Maneuver().

◆ GetAvailableDuration()

double WsfOrbitalManeuvering::GetAvailableDuration ( ) const
virtual

Return the available duration corresponding with the available delta-v.

Reimplemented in WsfRocketOrbitalManeuvering.

References cINFINITE_DURATION.

◆ GetManeuverDuration()

double WsfOrbitalManeuvering::GetManeuverDuration ( const UtCalendar & aEpoch,
const WsfOrbitalManeuver & aManeuver,
double aDeltaV ) const

Get the duration of the current maneuver for the given delta-v. If a duration was specified for the maneuver, that duration will be returned if it exceeds the value calculated by the model.

Parameters
aEpochThe absolute time of execution of the maneuver.
aManeuverThe maneuver to evaluate.
aDeltaVThe delta-v to be expended in the maneuver.
Returns
The expected total duration of the maneuver.
Note
This method assumes sufficient delta-v is available (GetAvailableDeltaV() >= aDeltaV).

References WsfOrbitalEvent::GetDuration(), GetRequiredDuration(), and WsfOrbitalEvent::GetStartTime().

Referenced by Maneuver().

◆ GetRequiredDeltaV()

virtual double WsfOrbitalManeuvering::GetRequiredDeltaV ( double aDuration) const
pure virtual

Given a maneuver duration, return the necessary delta-v.

Implemented in WsfRocketOrbitalManeuvering, and WsfSimpleOrbitalManeuvering.

◆ GetRequiredDuration()

virtual double WsfOrbitalManeuvering::GetRequiredDuration ( double aDeltaV) const
pure virtual

Given a delta-v, return the required time to complete the maneuver.

Implemented in WsfRocketOrbitalManeuvering, and WsfSimpleOrbitalManeuvering.

Referenced by GetManeuverDuration(), and Initialize().

◆ GetUpdateTime()

const UtCalendar & WsfOrbitalManeuvering::GetUpdateTime ( ) const
inline

References mUpdateTime.

◆ Initialize()

◆ Maneuver()

bool WsfOrbitalManeuvering::Maneuver ( const UtCalendar & aEpoch,
const WsfOrbitalManeuver & aManeuver,
const UtVec3d & aCommandedDeltaV,
UtVec3d & aActualDeltaV )
virtual

Apply a delta-v over a specified period of time.

Parameters
aEpochThe absolute time to which we update the maneuver.
aManeuverThe maneuver that is being executed.
aCommandedDeltaVThe total delta-v needed to complete the maneuver at the given time.
aActualDeltaVThe actual delta-v that can be produced by the mover in the given delta-t.
Returns
Whether the maneuver successfully executed.
Note
Derived classes should override this method to provide a higher-fidelity maneuver implementation.

References cINFINITE_DURATION, GetAvailableDeltaV(), GetManeuverDuration(), WsfOrbitalEvent::GetStartTime(), WsfObject::GetType(), WsfOrbitalEvent::HasExecuted(), WsfOrbitalEvent::IsFinite(), mUpdateTime, and ReduceAvailableDeltaV_By().

◆ operator=()

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

◆ PerformStagingOperation()

bool WsfOrbitalManeuvering::PerformStagingOperation ( )
virtual

Default method returns false (see WsfRocketOrbitalManeuvering).

Reimplemented in WsfRocketOrbitalManeuvering.

References WsfObject::GetType().

◆ ProcessInput()

bool WsfOrbitalManeuvering::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.

Reimplemented in WsfRocketOrbitalManeuvering, and WsfSimpleOrbitalManeuvering.

References mDebug.

Referenced by WsfRocketOrbitalManeuvering::ProcessInput(), and WsfSimpleOrbitalManeuvering::ProcessInput().

◆ ReduceAvailableDeltaV_By()

bool WsfOrbitalManeuvering::ReduceAvailableDeltaV_By ( double aDeltaV)
virtual

Remove available delta V if it is being monitored. Change any internal state as appropriate.

Returns
true if the delta-v could be removed; false otherwise.

Reimplemented in WsfRocketOrbitalManeuvering, and WsfSimpleOrbitalManeuvering.

Referenced by Maneuver().

◆ SetPlatformAttributes()

virtual void WsfOrbitalManeuvering::SetPlatformAttributes ( WsfPlatform * aPlatform) const
inlinevirtual

Reimplemented in WsfRocketOrbitalManeuvering.

Member Data Documentation

◆ cINFINITE_DELTA_V

double WsfOrbitalManeuvering::cINFINITE_DELTA_V = std::numeric_limits<double>::max()
staticconstexpr

Constant value representing infinite delta-V; used to compare against values computed for maneuvers.

Referenced by GetAvailableDeltaV(), and WsfRocketOrbitalManeuvering::Rocket::GetDeltaV().

◆ cINFINITE_DURATION

double WsfOrbitalManeuvering::cINFINITE_DURATION = std::numeric_limits<double>::max()
staticconstexpr

Constant value representing infinite maneuver duration; used to compare against values computed for maneuvers.

Referenced by GetAvailableDuration(), WsfRocketOrbitalManeuvering::Rocket::GetDuration(), and Maneuver().

◆ mDebug

bool WsfOrbitalManeuvering::mDebug {false}
protected

◆ mUpdateTime

UtCalendar WsfOrbitalManeuvering::mUpdateTime {}
protected

Referenced by GetUpdateTime(), Initialize(), and Maneuver().


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