CubeSatAttitude:

Path: CubeSat/Utilities

--------------------------------------------------------------------------
   Returns the CubeSat attitude quaternion from ECI to body.

   There are two options. One is ECI in which case it just passes out
   d.qECIToBody. For LVLH frame the routine computes the ECI to LVLH
   quaternion from the entered r and v and multiplies that times
   qLVLHToBody, to produce the qECIToBody.

   This function is used when you don't want to simulate attitude
   dynamics. There is an option to retrieve the default data structure. %
   This sets both qLVLHToBody and qECIToBody to [1;0;0;0].
   
   Since version 8.
--------------------------------------------------------------------------
   Form:
   q = CubeSatAttitude( d, r, v )
   d = CubeSatAttitude
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   d         (.)    Data structure
                    .type        (1,:) 'eci' or 'lvlh'
                    .qLVLHToBody (4,1) Quaternion from LVLHToBody
                    .qECIToBody  (4,1) Quaternion from ECI to body frame
   r        (3,1)   ECI position vector
   v        (3,1)   ECI velocity vector


   -------
   Outputs
   -------
   q        (4,1)   qECIToBody

--------------------------------------------------------------------------

Children:

AeroUtils: Coord/QLVLH
Common: Quaternion/QMult

Back to the CubeSat Module page