Path: SCPro/ProAttitude
% Generate a reference quaternion for a variety of targets. There are six types of target 'latlon' - point a spacecraft vector at a specific latitude and longitude of the earth. The angle about the vector is ignored 'sun' - point a spacecraft vector at the sun. The angle about the vector is ignored 'lvlh' - align the spacecraft with LVLH 'eci' - align with respect to ECI 'ulvlh' - align with a unit vector defined in the lvlh frame 'ueci' - align with a unit vector defined in the eci frame 'target' - align with a target spacecraft The output is the target qECIToBody. -------------------------------------------------------------------------- Form: qTarget = AttitudeTarget( type, d, t ) -------------------------------------------------------------------------- ------ Inputs ------ type (1,:) Type of target 'latlon' 'sun' 'lvlh' d (1,1) Data structure with spacecraft information .qECIToBody (4,1) Current quaternion .rECI (3,1) ECI position vector .vECI (3,1) ECI velocity vector .jD (1,1) Julian date t (1,1) Data structure with target information .latitude (1,1) Geodetic latitude (rad) .longitude (1,1) Longitude (rad) .u (3,1) Unit vector in the body frame .qOffset (4,1) Offset quaternion (lvlh and eci only) .uTarget (3,1) Target vector in the reference frame .rTarget (3,1) Target ECI position vector ------- Outputs ------- qTarget (4,1) Target qECIToBody --------------------------------------------------------------------------
AerospaceUtils: Coord/LatLonToR AerospaceUtils: Coord/QLVLH Common: General/DeBlankLT Common: Quaternion/QForm Common: Quaternion/QMult Common: Quaternion/QTForm Common: Quaternion/U2Q Common: Time/JD2T Math: Linear/Unit SC: Ephem/SunV1 SC: Ephem/TruEarth
Back to the SCPro Module page