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 --------------------------------------------------------------------------
AerospaceUtils: Coord/ECIToEF AerospaceUtils: Coord/LLAToECEF AerospaceUtils: Coord/QAlign AerospaceUtils: Coord/QLVLH Common: General/DeBlankAll Common: Quaternion/QTForm Common: Quaternion/U2Q Common: Time/Date2JD Common: Time/JD2T CubeSat: MissionPlanning/ObservationTimeWindows Math: Linear/Cross Math: Linear/DupVect Math: Linear/Unit SC: BasicOrbit/RVFromKepler SC: Ephem/MoonV1 SC: Ephem/SunV1 SCPro: ProAttitude/QAlignWithCon
Back to the SCPro Module page