Path: Orbit/OrbitCoord
% Compute the initial quaternion and body rates for a circular orbit, such that a body vector stays aligned with a Hills frame vector. -------------------------------------------------------------------------- Form: [qEB, wB] = InitialOrientation( r, v, uB, uH ) -------------------------------------------------------------------------- ------ Inputs ------ r (3,:) ECI position v (3,:) ECI velocity uB (3,:) Body vector to align uH (3,:) Reference Hills frame vector to stay aligned with ------- Outputs ------- qEB (4,:) ECI to Body Quaternion wB (3,:) Body rate --------------------------------------------------------------------------