DEIMOS
Earth Observation Mission CFI Software
Pointing Software User Manual
ESA

EECFI::Attitude Class Reference

Attitude data and configuration. More...

Inheritance diagram for EECFI::Attitude:
EECFI::CfiId EECFI::CfiClass

List of all members.

Public Member Functions

 Attitude ()
 Default constructor.
 Attitude (const Attitude &other)
 Attitude (const TimeCorrelation &timeId, const SatNomTransId &satNomTrId, const SatTransId &satTrId, const InstrTransId &instTrId)
 Constructor with satellite frame ids.
virtual ~Attitude () EXCEPT
 Class destructor.
void setTransformations (const TimeCorrelation &timeId, const SatNomTransId &satNomTrId, const SatTransId &satTrId, const InstrTransId &instTrId)
 Set the transformations in the attitutde Id..
void compute (const ModelId &modelId, const StateVector &stateVector, long targetFrame)
void userSet (const ModelId &modelId, const StateVector &stateVector, long targetFrame, const double matrix[3][3], const double matrixRate[3][3], const double matrixRateRate[3][3], const double offset[3])
 Assign user-defined attitude frame.
AttRec getAttitudeData (long dataType, long sourceRefType, long sourceRef) const
 Compute quaternions/angles equivalent to the transformation from sourceRef to the attitude target frame.
AttitudeData getData () const
 Get attitude id data.
void setData (const AttitudeData &attitudeData)
 Set attitude id data.
Coord changeFrame (const SatId &satId, const ModelId &modelId, long modeFlag, long frameFlagIn, long frameIdIn, long frameFlagOut, long frameIdOut, const StateVector &satStateVec, const Coord &statVecIn)
 Change the input vector/direction from a coordinate system to another ( including attitude frames ).
Attitudeoperator= (const Attitude &other)
SatId satId () const
 Return satellite id.

Protected Member Functions

void eraseObject ()
 Erase object and free memory.

Detailed Description

Attitude data and configuration.


Constructor & Destructor Documentation

EECFI::Attitude::Attitude (  ) 

Default constructor.

References EECFI::CfiId::status(), and EECFI::CfiClass::throwWarn.

EECFI::Attitude::Attitude ( const Attitude other  ) 

Copy constructor

Parameters:
other The Attitude to copy from
EECFI::Attitude::Attitude ( const TimeCorrelation timeId,
const SatNomTransId satNomTrId,
const SatTransId satTrId,
const InstrTransId instTrId 
)

Constructor with satellite frame ids.

Parameters:
timeId Time correlations.
satNomTrId Satellite nominal attitude.
satTrId Satellite attitude.
instTrId Instrument attitude.

References setTransformations(), and EECFI::CfiClass::throwWarn.

EECFI::Attitude::~Attitude (  )  [virtual]

Class destructor.

References eraseObject().


Member Function Documentation

Coord EECFI::Attitude::changeFrame ( const SatId satId,
const ModelId modelId,
long  modeFlag,
long  frameFlagIn,
long  frameIdIn,
long  frameFlagOut,
long  frameIdOut,
const StateVector satStateVec,
const Coord stateVec 
)

Change the input vector/direction from a coordinate system to another ( including attitude frames ).

This method changes the coordinate or attitude frame of a location or direction by keeping the location or direction in inertial space identical. Both all coordinate frames and all attitude frames are supported. When changing the frame for a location, the difference in origin of the frames is taken into account. While when changing the frame for a direction, the target is assumed to be at infinity.

Parameters:
satId Satellite id.
modelId Model id.
modeFlag Selection of location or direction calculus (ModeFlagPointingEnum).
frameFlagIn Selection of coordinate or Attitude frame on input (FrameFlagEnum).
frameIdIn Coordinate frame id or attitude frame id on input (AttFrEnum or CsRlEnum).
frameFlagOut Selection of coordinate or Attitude frame on output (FrameFlagEnum).
frameIdOut Coordinate frame id or attitude frame id on output (AttFrEnum or CsRlEnum).
satStateVec State vector with time, time reference, position, velocity and acceleration of satellite (Earth fixed CS).
stateVec Coordinates to be transformed in input frame (deriv indicates if pos, pos and vel or pos, vel and acc is to be calculated).
Returns:
Tranformed coordinates in ouput frame.

References EECFI::Coord::acc, EECFI::StateVector::coord, EECFI::Coord::cs, EECFI::Coord::deriv, EECFI::SatId::getSatellite(), EECFI::Coord::pos, EECFI::Time::ref, EECFI::CfiClass::throwWarn, EECFI::Time::time, EECFI::StateVector::time, and EECFI::Coord::vel.

void EECFI::Attitude::compute ( const ModelId modelId,
const StateVector stateVector,
long  targetFrame 
)

Compute attitude matrix.

Note: it can be internally applied a correction to computations in order to compensate for the travel time of light from the Sun to the Earth and the satellites orbiting it. To activate this compensation, the Sun model in xl_model_id must be initialized with the enum XL_MODEL_SUN_TRAVEL_TIME using the function xl_model_init (see [LIBSUM]).

This method calculates the Attitude Frame for a given S/C state vector.

Parameters:
modelId Model Id.
stateVector State vector which contains time reference, time, position, velocity and acceleration needed for computation. Coordinates must be in Earth Fixed reference frame.
targetFrame Attitude frame (AttFrEnum).

References EECFI::Coord::acc, EECFI::CfiError::addMsg(), EECFI::StateVector::coord, EECFI::Coord::cs, EECFI::Coord::pos, EECFI::Time::ref, EECFI::CfiClass::throwWarn, EECFI::Time::time, EECFI::StateVector::time, and EECFI::Coord::vel.

void EECFI::Attitude::eraseObject (  )  [protected]

Erase object and free memory.

References EECFI::CfiError::addMsg(), EECFI::CfiId::status(), and EECFI::CfiClass::throwWarn.

Referenced by operator=(), and ~Attitude().

AttRec EECFI::Attitude::getAttitudeData ( long  dataType,
long  sourceRefType,
long  sourceRef 
) const

Compute quaternions/angles equivalent to the transformation from sourceRef to the attitude target frame.

This method computes the quaternions or Euler angles that returns the transformation between the sourceRef frame and the target frame defined in the attitude object

Parameters:
dataType requested data type: quaternions or angles
sourceRefType Source reference frame type: external or satellite
sourceRef Source reference frame
Returns:
Attitude record with the time and quaternions or angles.

References EECFI::CfiClass::throwWarn.

Attitude & EECFI::Attitude::operator= ( const Attitude other  ) 

Copy assignment operator.

Parameters:
other The Attitude to copy/assign from

References EECFI::CfiError::addMsg(), eraseObject(), and EECFI::CfiClass::throwWarn.

SatId EECFI::Attitude::satId (  )  const

Return satellite id.

Returns:
Satellite id.
void EECFI::Attitude::setTransformations ( const TimeCorrelation timeId,
const SatNomTransId satNomTrId,
const SatTransId satTrId,
const InstrTransId instTrId 
)

Set the transformations in the attitutde Id..

Parameters:
timeId Time correlations.
satNomTrId Satellite nominal attitude.
satTrId Satellite attitude.
instTrId Instrument attitude.

Referenced by Attitude().

void EECFI::Attitude::userSet ( const ModelId modelId,
const StateVector stateVector,
long  targetFrame,
const double  matrix[3][3],
const double  matrixRate[3][3],
const double  matrixRateRate[3][3],
const double  offset[3] 
)

Assign user-defined attitude frame.

Parameters:
modelId Model Id.
stateVector State vector with time, time reference, position, velocity and acceleration needed for computation.
targetFrame Attitude frame ID (AttFrEnum).
matrix Matrix represeting the transformation from ToD to targetFrame.
matrixRate Matrix represeting the transformation rate from ToD to targetFrame.
matrixRateRate Matrix represeting the transformation rate rate from ToD to targetFrame.
offset Offset in the reference frame origin.

References EECFI::Coord::acc, EECFI::StateVector::coord, EECFI::Coord::pos, EECFI::Time::ref, EECFI::CfiClass::throwWarn, EECFI::Time::time, EECFI::StateVector::time, and EECFI::Coord::vel.


Generated on Mon Dec 11 2023 13:28:30 for by doxygen 1.7.1