Path: CubeSat/MissionPlanning
% Build an attitude profile consisting of multiple overlapping modes. The first mode listed is the nominal mode. The attitude is defined according to this pointing mode by default. Additional modes are optional. 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 alignment 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 = AttitudeProfileBuilder( 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 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 --------------------------------------------------------------------------
AerospaceUtils: Coord/ECIToEF AerospaceUtils: Coord/LLAToECEF AerospaceUtils: Coord/QAlign AerospaceUtils: Coord/QLVLH CubeSat: MissionPlanning/ObservationTimeWindows SC: BasicOrbit/RVFromKepler SC: Ephem/MoonV1 SC: Ephem/SunV1 Common: General/DeBlankAll Common: General/StringMatch Common: Quaternion/QTForm Common: Quaternion/U2Q Common: Time/Date2JD Common: Time/JD2T Math: Linear/Cross Math: Linear/DupVect Math: Linear/Unit
Back to the CubeSat Module page