DFFAttitudeTarget:

Path: FormationFlying/IntegratedSim

% 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 = FSWAttitudeTarget( type, d, t )
------------------------------------------------------------------------

   ------
   Inputs
   ------
   type    (1,:)     Type of target
                   
   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
    INVALID:         .rTarget       (3,1) Target ECI position vector

   -------
   Outputs
   -------
   qTarget (4,1)     Target qECIToBody

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

Children:

AC: ACData/ACTConstants
AerospaceUtils: Coord/LatLonToR
AerospaceUtils: Coord/QLVLH
SC: Ephem/EOfE
SC: Ephem/EarthNut
SC: Ephem/EarthPre
SC: Ephem/EarthRot
SC: Ephem/GMSTime
SC: Ephem/MSidDay
SC: Ephem/NutDelta
SC: Ephem/ObOfE
SC: Ephem/SunV1
SC: Ephem/TruEarth
SC: SCData/sCTConstants
Common: CommonData/Constants
Common: CommonData/SwooshWatermark
Common: CommonData/xSplashSmall
Common: Database/Constant
Common: General/CellToMat
Common: General/DeBlankLT
Common: General/DeleteCell
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/Axis3D
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/PltStyle
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Common: Graphics/ZLabelS
Common: Quaternion/Mat2Q
Common: Quaternion/QForm
Common: Quaternion/QMult
Common: Quaternion/QTForm
Common: Quaternion/U2Q
Common: Time/DTSToDTA
Common: Time/Date2JD
Common: Time/JD2000
Common: Time/JD2T
Common: Time/JDToMidnight
Math: Geometry/Perpendicular
Math: Linear/Cross
Math: Linear/Dot
Math: Linear/DupVect
Math: Linear/Mag
Math: Linear/Unit
Math: MathUtils/R2P5
Math: Trigonometry/CosD
Math: Trigonometry/SinD

Back to the FormationFlying Module page