WSF
wsf::space::Orientation Class Referenceabstract

#include <WsfSpaceOrientation.hpp>

Inheritance diagram for wsf::space::Orientation:
Collaboration diagram for wsf::space::Orientation:

Public Member Functions

 Orientation (bool aIsDefaultX_Aligned)
 Orientation (const Orientation &aSrc)=default
 ~Orientation () override=default
OrientationClone () const override=0
const char * GetScriptClassName () const override
void SetAttitudeController (const WsfAttitudeController &aController)
 Set the automatic orientation to be used with the propagator.
bool ProcessInput (UtInput &aInput) override
virtual bool IsValid () const
virtual bool Calculate (double &aPsi, double &aTheta, double &aPhi) const =0
void CalculateAligned (const UtVec3d &aPointingAxisOrientationECI, const UtVec3d &aConstraintAxisOrientationECI, double &aPsi, double &aTheta, double &aPhi) const
void SetDefaultX_Aligned (bool aIsDefaultX_Aligned)
bool GetDefaultX_Aligned () 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 Member Functions

static std::unique_ptr< OrientationFactory (const std::string &aOrientation)
static void CalculateGeneral (double aYawECS, double aPitchECS, double aRollECS, const UtVec3d &aX_AxisOrientationECI, const UtVec3d &aZ_AxisConstraintECI, double &aPsi, double &aTheta, double &aPhi)
static void CalculateX_Aligned (const UtVec3d &aX_AxisOrientationECI, const UtVec3d &aZ_AxisConstraintECI, double &aPsi, double &aTheta, double &aPhi)
static void CalculateZ_Aligned (const UtVec3d &aZ_AxisOrientationECI, const UtVec3d &aX_AxisConstraintECI, double &aPsi, double &aTheta, double &aPhi)
static void CalculatePCS_DirectionCosines (const UtVec3d &aX_AxisOrientationECI, const UtVec3d &aZ_AxisConstraintECI, UtVec3d &aX_DC, UtVec3d &aY_DC, UtVec3d &aZ_DC)

Protected Member Functions

UtVec3d Nadir () const
UtVec3d Solar () const
UtVec3d VelocityECI () const
UtVec3d VelocityECEF () const
UtVec3d OrbitPlaneConstraint (const UtVec3d &aAlignVector) const
void HandleException (const UtException &aException) const
 Generic exception handler for exceptions encountered in derived classes.
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Protected Attributes

bool mIssueErrorMessage {true}
bool mDefaultX_Aligned
const WsfAttitudeControllermControllerPtr {nullptr}

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Detailed Description

A class hierarchy encapsulating various options for satellite attitude profiles: The profiles are as follows:

  • ECI velocity with nadir constraint:
    The satellite's x-axis is pointing along the satellite's velocity vector, the z axis is constrained perpendicular to x and in the plane of the x-axis and the nadir vector.
  • ECI velocity with solar constraint:
    The satellite's x-axis is pointing along the satellite's velocity vector, the z axis is constrained perpendicular to x and in the plane of the x-axis and the sun vector.
  • Nadir pointing with ECI Velocity Constraint:
    The satellite's z-axis is pointing to the earth's center, the x axis is constrained perpendicular to z and in the plane of the z-axis and the ECI velocity vector.
  • Nadir pointing with ECEF Velocity Constraint:
    The satellite's z-axis is pointing to the earth's center, the x axis is constrained perpendicular to z and in the plane of the z-axis and the ECI velocity vector.
  • Solar pointing with nadir constraint:
    The satellite's negative z-axis is pointing to the sun, the x axis is constrained perpendicular to z and in the plane of the z-axis and the nadir.
  • Nadir pointing with solar constraint:
    The satellite's negative z-axis is pointing to the nadir, the x axis is constrained perpendicular to z and in the plane of the z-axis and the sun vector.
  • Entity (Resident Space Object) pointing with solar constraint:
    The satellite's x-axis points at the Entity, the z axis is constrained perpendicular to x and in the plane of the x-axis and the solar vector.
  • Entity (Resident Space Object) pointing with nadir constraint:
    The satellite's x-axis points at the Entity, the z axis is constrained perpendicular to x and in the plane of the x-axis and the nadir vector.
  • Entity (Resident Space Object) pointing with orbit constraint:
    The satellite's x-axis points at the Entity, the z axis is constrained perpendicular to x and in the orbital plane.
  • Orientation point pointing with orbit constraint:
    The satellite's x-axis points at a geo-point (WsfGeoPoint), the z axis is constrained perpendicular to x and in the orbital plane.

For all orientation types, the y-axis is perpendicular to x and z in a right-handed coordinate system.

Constructor & Destructor Documentation

◆ Orientation() [1/2]

◆ Orientation() [2/2]

wsf::space::Orientation::Orientation ( const Orientation & aSrc)
default

References Orientation().

◆ ~Orientation()

wsf::space::Orientation::~Orientation ( )
overridedefault

References Factory().

Member Function Documentation

◆ Calculate()

virtual bool wsf::space::Orientation::Calculate ( double & aPsi,
double & aTheta,
double & aPhi ) const
pure virtual

◆ CalculateAligned()

void wsf::space::Orientation::CalculateAligned ( const UtVec3d & aPointingAxisOrientationECI,
const UtVec3d & aConstraintAxisOrientationECI,
double & aPsi,
double & aTheta,
double & aPhi ) const

Calculate a spacecraft orientation such that either the ECS X-axis or Z-axis is aligned with the aPointingAxisOrientationECI vector, and the ECS Z-axis constrained by the aConstraintAxisOrientationECI vector.

Parameters
aPointingAxisOrientationECIThe direction along which the ECS "aligned" axis is to point.
aConstraintAxisOrientationECIThe direction that, along with the ECS "aligned" axis, defines the plane within which the ECS z-axis is constrained to point.
aPsiThe ECI-referenced yaw of the platform.
aThetaThe ECI-referenced pitch of the platform.
aPhiThe ECI-referenced roll of the platform.

References CalculateX_Aligned(), CalculateZ_Aligned(), and mDefaultX_Aligned.

Referenced by Calculate(), wsf::space::OrientationECI_VelocityNadir::Calculate(), wsf::space::OrientationECI_VelocitySolar::Calculate(), wsf::space::OrientationEntityNadir::Calculate(), wsf::space::OrientationEntityOrbitPlane::Calculate(), wsf::space::OrientationEntitySolar::Calculate(), wsf::space::OrientationNadirECEF_Velocity::Calculate(), wsf::space::OrientationNadirECI_Velocity::Calculate(), wsf::space::OrientationNadirSolar::Calculate(), and wsf::space::OrientationSolarNadir::Calculate().

◆ CalculateGeneral()

void wsf::space::Orientation::CalculateGeneral ( double aYawECS,
double aPitchECS,
double aRollECS,
const UtVec3d & aX_AxisOrientationECI,
const UtVec3d & aZ_AxisConstraintECI,
double & aPsi,
double & aTheta,
double & aPhi )
static

Calculate a generalized ECI-referenced orientation. Provided yaw, pitch, and roll correspond with an orientation with respect to the platform's ECS (e.g., of a WsfArticulatedPart, defining a PCS). The provided x-axis orientation corresponds with a vector pointing along the PCS x-axis to a target (e.g., another platform, nadir, the sun, etc.), referenced in ECI coordinates. A second vector provides a PCS z-axis constraint, such that the z-axis will lie in the same plane as the PCS x-axis and the constraint vector.

Parameters
aYawECSThe yaw angle of the PCS with respect to the ECS.
aPitchECSThe pitch angle of the PCS with respect to the ECS.
aRollECSThe roll angle of the PCS with respect to the ECS.
aX_AxisOrientationECIThe direction along which the PCS x-axis is to point.
aZ_AxisConstraintECIThe direction that, along with the PCS x-axis, defines the plane within which the PCS z-axis is constrained to point.
aPsiThe ECI-referenced yaw of the platform.
aThetaThe ECI-referenced pitch of the platform.
aPhiThe ECI-referenced roll of the platform.

References CalculatePCS_DirectionCosines().

Referenced by Calculate().

◆ CalculatePCS_DirectionCosines()

void wsf::space::Orientation::CalculatePCS_DirectionCosines ( const UtVec3d & aX_AxisOrientationECI,
const UtVec3d & aZ_AxisConstraintECI,
UtVec3d & aX_DC,
UtVec3d & aY_DC,
UtVec3d & aZ_DC )
static

Calculate the direction cosines associated with the rotation of a platform part to point to a given orientation. The provided x-axis orientation corresponds with a vector pointing along the PCS x-axis to a target (e.g., another platform, nadir, the sun, etc.), referenced in ECI coordinates. A second vector provides a PCS z-axis constraint, such that the PCS z-axis will lie in the same plane as the PCS x-axis and the constraint vector.

Parameters
aX_AxisOrientationECIThe direction along which the PCS x-axis is to point.
aZ_AxisConstraintECIThe direction that, along with the PCS x-axis, defines the plane within which the PCS z-axis is constrained to point.
aX_DCThe x direction cosine vector.
aY_DCThe y direction cosine vector.
aZ_DCThe z direction cosine vector.

Referenced by Calculate(), CalculateGeneral(), CalculateX_Aligned(), and CalculateZ_Aligned().

◆ CalculateX_Aligned()

void wsf::space::Orientation::CalculateX_Aligned ( const UtVec3d & aX_AxisOrientationECI,
const UtVec3d & aZ_AxisConstraintECI,
double & aPsi,
double & aTheta,
double & aPhi )
static

Calculate a spacecraft orientation such that the ECS X-axis is aligned with the aX_AxisOrientation vector, and the ECS Z-axis constrained by the aZ_AxisConstraint vector.

Parameters
aX_AxisOrientationECIThe direction along which the ECS x-axis is to point.
aZ_AxisConstraintECIThe direction that, along with the ECS x-axis, defines the plane within which the ECS z-axis is constrained to point.
aPsiThe ECI-referenced yaw of the platform.
aThetaThe ECI-referenced pitch of the platform.
aPhiThe ECI-referenced roll of the platform.

References CalculatePCS_DirectionCosines().

Referenced by Calculate(), and CalculateAligned().

◆ CalculateZ_Aligned()

void wsf::space::Orientation::CalculateZ_Aligned ( const UtVec3d & aZ_AxisOrientationECI,
const UtVec3d & aX_AxisConstraintECI,
double & aPsi,
double & aTheta,
double & aPhi )
static

Calculate a spacecraft orientation such that the ECS X-axis is aligned with the aX_AxisOrientation vector, and the ECS Z-axis constrained by the aZ_AxisConstraint vector.

Parameters
aZ_AxisOrientationECIThe direction along which the ECS z-axis is to point.
aX_AxisConstraintECIThe direction that, along with the ECS z-axis, defines the plane within which the ECS x-axis is constrained to point.
aPsiThe ECI-referenced yaw of the platform.
aThetaThe ECI-referenced pitch of the platform.
aPhiThe ECI-referenced roll of the platform.

References CalculatePCS_DirectionCosines().

Referenced by Calculate(), and CalculateAligned().

◆ Clone()

◆ Factory()

◆ GetDefaultX_Aligned()

bool wsf::space::Orientation::GetDefaultX_Aligned ( ) const
inline

References mDefaultX_Aligned.

◆ GetScriptClassName()

const char * wsf::space::Orientation::GetScriptClassName ( ) const
override

Referenced by Clone().

◆ HandleException()

void wsf::space::Orientation::HandleException ( const UtException & aException) const
protected

◆ IsValid()

virtual bool wsf::space::Orientation::IsValid ( ) const
inlinevirtual

Return whether the pointing and/or constraint lines-of-sight vectors are valid.

Note
This method returns false if an object being pointed at (e.g., another platform) does not or no longer exists.

Reimplemented in wsf::space::OrientationEntity, and wsf::space::OrientationGeoPoint.

◆ Nadir()

◆ OrbitPlaneConstraint()

UtVec3d wsf::space::Orientation::OrbitPlaneConstraint ( const UtVec3d & aAlignVector) const
protected

Compute the orbit plane constraint vector, lying in the orbit plane and perpendicular to the aAlignVector. aAlignVector The vector used as the basis for computing the plane constraint vector.

References mControllerPtr.

Referenced by wsf::space::OrientationEntityOrbitPlane::Calculate().

◆ ProcessInput()

bool wsf::space::Orientation::ProcessInput ( UtInput & aInput)
inlineoverridevirtual

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 wsf::space::OrientationEntity, and wsf::space::OrientationGeoPoint.

◆ SetAttitudeController()

void wsf::space::Orientation::SetAttitudeController ( const WsfAttitudeController & aController)
inline

Set the automatic orientation to be used with the propagator.

References mControllerPtr.

◆ SetDefaultX_Aligned()

void wsf::space::Orientation::SetDefaultX_Aligned ( bool aIsDefaultX_Aligned)
inline

References mDefaultX_Aligned.

◆ Solar()

◆ VelocityECEF()

UtVec3d wsf::space::Orientation::VelocityECEF ( ) const
protected

◆ VelocityECI()

Member Data Documentation

◆ mControllerPtr

◆ mDefaultX_Aligned

bool wsf::space::Orientation::mDefaultX_Aligned
protected

◆ mIssueErrorMessage

bool wsf::space::Orientation::mIssueErrorMessage {true}
mutableprotected

Referenced by HandleException().


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