CL_rot_rotVect — Rotation(defined by a quaternion) of a vector
w = CL_rot_rotVect(q,v)
If q is an attitude quaternion, then w gives the coordinates (in satellite frame) of vector v (v expressed on reference frame).
q=CL_rot_defQuat(rand(4,2)); q=q./norm(q); M1=CL_rot_quat2matrix(q(1)); v=[1;2;3]; w1=M1*v w1=CL_rot_rotVect(q(1),v) M2=CL_rot_quat2matrix(q(2)); w2=[w1 M2*v] qq=CL_rot_matrix2quat(M2*M1); qqq=q(1)*q(2); w3=CL_rot_rotVect(qq,v) w3=CL_rot_rotVect(qqq,v) //R is a reference frame. S is a frame obtained with a rotation of 10 deg on the Z axis of R ang = CL_deg2rad(10) q = CL_rot_eul2quat(0,0,ang) w = [1;0;0] //X axis of R expressed on R reference frame v = [cos(ang);sin(ang);0] //vector w rotated 10 deg on Z axis (X axis of S frame expressed on R frame) w = CL_rot_rotVect(q,v) //w = vector v (which was expressed on R) expressed on S