AttitudeProfileWithCon:

Path: SCPro/ProAttitude

% Build a constrained attitude profile consisting of multiple overlapping modes.
 Each mode defines the ECI-to-Body quaternion through the combination of
 primary and secondary alignments. The primary alignment directly aligns
 a body vector with an inertial target. The secondary alginment rotates
 about that primary body vector to align a second body vector with a
 second inertial vector as closely as possible.

 Each alignment can be defined as one of the following types, with the
 associated target data.

   #  Alignment type      Target data
   ====================================================================
   1    'sun'                -
   2    'nadir'              -
   3    'orbitnormal'        -
   4    'latlon'             [lat;lon]   Target latitude and longitude
   5    'lvlh'               [x;y;z]     Target LVLH direction
   6    'ueci'               [x;y;z]     Target ECI direction
   7    'reci'               [x;y;z]     Target ECI point
--------------------------------------------------------------------------
   Form:
   d = AttitudeProfileWithCon( d, mode1, mode2, mode3, ... );
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   d       (.)   Data structure with orbit and time information
                    .jD0        (1,1)    Epoch Julian date
                    .t          (1,:)    Time vector from jD0 (sec)
                    .r          (3,:)    ECI position  (km)
                    .v          (3,:)    ECI velocity (km/s)
                 
   mode1   (.)   Nominal Attitude Mode with fields:
                    .type1      '...'    Primary alignment type
                    .body1      (3,1)    Primary body vector to align
                    .target1    (:,1)    Primary Target
                    .type2      '...'    Secondary alignment type
                    .body2      (3,1)    Secondary body vector to align
                    .target2    (:,1)    Secondary target
                    .nCon       (1,1)
                    .typeCon    '...'    Constraint type
                    .bodyCon    (3,:,N)
                    .targetCon  (3,N)
                    .minSepCon

   mode2   (.)   Same as nominal mode but with additional field:
                    .window     (:,2)    Time windows to use this mode
   mode3
   mode4
    ...                    

   -------
   Outputs
   -------
   d       (.)   Data structure with added quaternion, and alignment info
                    .jD0        (1,1)    Epoch Julian date
                    .t          (1,:)    Time vector from jD0 (sec)
                    .r          (3,:)    ECI position  (km)
                    .v          (3,:)    ECI velocity (km/s)
                    .el         (1,6)    Initial orbital elements
                    .q          (4,:)    ECI-to-body quaternion
                    .type1      (1,:)    # for primary alignment type
                    .type2      (1,:)    # for secondary alignment type
                    .rot        (1,:)    Rotation angle about primary body axis
                    .sep        (1,:)    Separation angle from secondary target

--------------------------------------------------------------------------
  See also: AttitudeProfileConstraintsDemo, AttitudeProfile, QAlignWithCon
--------------------------------------------------------------------------

Children:

AerospaceUtils: Coord/ECIToEF
AerospaceUtils: Coord/LLAToECEF
AerospaceUtils: Coord/QAlign
AerospaceUtils: Coord/QLVLH
AerospaceUtils: Coord/QRotateToAlign
AerospaceUtils: Coord/R2LatLon
CubeSat: MissionPlanning/FindTimeWindows
CubeSat: MissionPlanning/ObservationTimeWindows
CubeSat: MissionPlanning/ObservationTimeWindowsPlot
CubeSat: Utilities/LatLonPlot
CubeSat: Utilities/WrapSegments
Orbit: OrbitCoord/ENUToECEF
Orbit: OrbitCoord/RAzToLatLon
SC: BasicOrbit/E2M
SC: BasicOrbit/Nu2E
SC: BasicOrbit/Nu2M
SC: BasicOrbit/OrbRate
SC: BasicOrbit/RV2El
SC: BasicOrbit/RVFromKepler
SC: Ephem/MoonV1
SC: Ephem/SunV1
SCPro: ProAttitude/QAlignWithCon
SCPro: ProAttitude/QRotateToAlignWithCon
Common: CommonData/SwooshWatermark
Common: General/CellToMat
Common: General/DeBlankAll
Common: General/DeBlankLT
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/Axis3D
Common: Graphics/Coordinates
Common: Graphics/Ellipsd
Common: Graphics/Map
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/Plot3D
Common: Graphics/PlotAngleRange
Common: Graphics/PltStyle
Common: Graphics/TimeLabl
Common: Graphics/TitleS
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Common: Graphics/ZLabelS
Common: Quaternion/Mat2Q
Common: Quaternion/QForm
Common: Quaternion/QMult
Common: Quaternion/QPose
Common: Quaternion/QTForm
Common: Quaternion/U2Q
Common: Time/DTSToDTA
Common: Time/Date2JD
Common: Time/JD2000
Common: Time/JD2T
Common: Time/T2JD
Math: Geometry/AngleSepFromRotation
Math: Geometry/FindValidAngleRange
Math: Geometry/InsideAngleRange
Math: Geometry/MergeAngleRange
Math: Geometry/Perpendicular
Math: Linear/Cross
Math: Linear/Dot
Math: Linear/DupVect
Math: Linear/Mag
Math: Linear/Unit
Math: Trigonometry/CosD
Math: Trigonometry/LinearSinCosToQuadCos
Math: Trigonometry/SinD
Math: Trigonometry/SolveLinearSinCos

Back to the SCPro Module page