DEIMOS
Earth Observation Mission CFI Software
Lib Software User Manual
ESA

EECFI::LibFunc Namespace Reference

Namespace for functions that do not belong to any Lib class. More...

Functions

XL_DECL void eulerToMatrix (double eulerAngles[3], double matrix[3][3])
 Get rotation matrix from Euler angles.
XL_DECL void matrixToEuler (double matrix[3][3], double eulerAngles[3])
 Get Euler angles from rotation matrix.
XL_DECL void getRotationAngles (double xsInit[3], double ysInit[3], double zsInit[3], double xsFin[3], double ysFin[3], double zsFin[3], double angle[3])
 Get rotation angles between two sets of orthonormal right-handed unit vectors.
XL_DECL void getRotatedVectors (double xsInit[3], double ysInit[3], double zsInit[3], double angle[3], double xsFin[3], double ysFin[3], double zsFin[3])
 Rotate a set of unit angle vectors.
XL_DECL void quaternionsToVectors (double quaternions[4], double uxVec[3], double uyVec[3], double uzVec[3])
 Change from quaternions to vectors.
XL_DECL void vectorsToQuaternions (double uxVec[3], double uyVec[3], double uzVec[3], double quaternions[4])
 Change form vectors to quaternions.
XL_DECL void quaternionsInterpol (const QuaternionsInterpolationCfg &cfg, double time_1, double q1[4], double time_2, double q2[4], double time_out, double q_out[4])
 The method performs, given 2 input quaternions q1 and q2, an interpolation for the requested time, obtaining the interpolated quaternion as output.
XL_DECL void setVerbose ()
 Activate verbosity for Lib library.
XL_DECL void setSilent ()
 Deactivate verbosity for Lib library.

Detailed Description

Namespace for functions that do not belong to any Lib class.


Function Documentation

void EECFI::LibFunc::eulerToMatrix ( double  eulerAngles[3],
double  matrix[3][3] 
)

Get rotation matrix from Euler angles.

Parameters:
eulerAngles Euler angles.
matrix [OUTPUT] Rotation matrix.
void EECFI::LibFunc::getRotatedVectors ( double  xsInit[3],
double  ysInit[3],
double  zsInit[3],
double  angle[3],
double  xsFin[3],
double  ysFin[3],
double  zsFin[3] 
)

Rotate a set of unit angle vectors.

Parameters:
xsInit Unitary direction vector along the X-axes of the initial attitude frame.
ysInit Unitary direction vector along the Y-axes of the initial attitude frame.
zsInit Unitary direction vector along the Z-axes of the initial attitude frame.
angle Angles (pitch, roll and yaw) between initial and final Attitude Frames (deg [-180,180)).
xsFin [OUTPUT] Unitary direction vector along the X-axes of the final attitude frame.
ysFin [OUTPUT] Unitary direction vector along the Y-axes of the final attitude frame.
zsFin [OUTPUT] Unitary direction vector along the Z-axes of the final attitude frame.
void EECFI::LibFunc::getRotationAngles ( double  xsInit[3],
double  ysInit[3],
double  zsInit[3],
double  xsFin[3],
double  ysFin[3],
double  zsFin[3],
double  angle[3] 
)

Get rotation angles between two sets of orthonormal right-handed unit vectors.

Parameters:
xsInit Unitary direction vector along the X-axes of the initial attitude frame.
ysInit Unitary direction vector along the Y-axes of the initial attitude frame.
zsInit Unitary direction vector along the Z-axes of the initial attitude frame.
xsFin Unitary direction vector along the X-axes of the final attitude frame.
ysFin Unitary direction vector along the Y-axes of the final attitude frame.
zsFin Unitary direction vector along the Z-axes of the final attitude frame.
angle [OUTPUT] Angles (pitch, roll and yaw) between initial and final Attitude Frames (deg [-180,180)).
void EECFI::LibFunc::matrixToEuler ( double  matrix[3][3],
double  eulerAngles[3] 
)

Get Euler angles from rotation matrix.

Parameters:
matrix Rotation matrix.
eulerAngles [OUTPUT] Euler angles.
void EECFI::LibFunc::quaternionsInterpol ( const QuaternionsInterpolationCfg cfg,
double  time_1,
double  q1[4],
double  time_2,
double  q2[4],
double  time_out,
double  q_out[4] 
)

The method performs, given 2 input quaternions q1 and q2, an interpolation for the requested time, obtaining the interpolated quaternion as output.

Notes:
  • The algorithm to be used for interpolation is given as input in QuaternionsInterpolationCfg structure.
  • Currently the supported algorithms are:
    • Slerp (see details: Slerp)
  • If the requested time is out of the interval defined by the input quaternions, then extrapolation is used and a warning is raised. The extrapolation degrades with the distance to the interval defined by input quaternions. In the following table the degradation for some time distances are shown:
    Time out of interval [seconds] Error in rotation angles [deg]
    (Quaternions time step 1 second)
    Error in rotation angles [deg]
    (Quaternions time step 10 seconds)
    1 0.000005 0.00005
    10 0.0003 0.0005
    100 0.06 0.07
    500 0.96 0.95
    1000 2.3 2.3
Parameters:
cfg Configuration parameters used by interpolation.
t1 Time for quaternion q1.
q1 First quaternion (for time t1).
t2 Time for quaternion q2.
q2 Second quaternion (for time t2).
t Time interpolation parameter.
q [OUTPUT] Result of quaternion interpolation.

References EECFI::QuaternionsInterpolationCfg::algo.

void EECFI::LibFunc::quaternionsToVectors ( double  quaternions[4],
double  uxVec[3],
double  uyVec[3],
double  uzVec[3] 
)

Change from quaternions to vectors.

Parameters:
quaternions Input quaternion vector.
uxVec [OUTPUT] Unitary direction vector along the X-axes.
uyVec [OUTPUT] Unitary direction vector along the Y-axes.
uzVec [OUTPUT] Unitary direction vector along the Z-axes.
void EECFI::LibFunc::setSilent (  ) 

Deactivate verbosity for Lib library.

void EECFI::LibFunc::setVerbose (  ) 

Activate verbosity for Lib library.

void EECFI::LibFunc::vectorsToQuaternions ( double  uxVec[3],
double  uyVec[3],
double  uzVec[3],
double  quaternions[4] 
)

Change form vectors to quaternions.

Parameters:
uxVec Unitary direction vector along the X-axes.
uyVec Unitary direction vector along the Y-axes.
uzVec Unitary direction vector along the Z-axes.
quaternions [OUTPUT] Input quaternion vector.

Generated on Mon Dec 11 2023 13:27:31 for by doxygen 1.7.1