function magheading = true2mag(true_heading,mag_decl);
% magheading = true2mag(true_heading,mag_decl);
%all in degrees

magheading = true_heading - mag_decl;


