function [ve, vn] = rotadv(vx,vy, hdg) % ROTADV - Rotates xy adv data into east north using the heading data. % [ve, vn] = rotadv(vx,vy, hdg) % % This is a 2-D rotation only, assumes no pitch or roll. hdgrad = 2*pi*hdg/360; ve = vx.*sin(hdgrad) - vy.*cos(hdgrad); vn = vx.*cos(hdgrad) + vy.*sin(hdgrad);