function [qdot] = qdotCalc(q,omega)
%qdotCalc Calculate the qdot quaternion from Eq 31
%   Calculate the qdot quaternion using Equation 31
%   from the aircraft quaternions paper.
%   omega and qdot are assumed to be column vectors.
Qmat=[-q(2) -q(3) -q(4); q(1) -q(4) q(3); q(3) q(1) -q(2); -q(3) q(2) q(1)];
qdot = 0.5*Qmat*(omega);
end

