function [inc_iwrap_a]=track2aircraft( inc_iwrap, az_t, pitch, roll, drift, track1)
inc_t=180- inc_iwrap;

sinpitch = sin(deg2rad(pitch));
cospitch = cos(deg2rad(pitch));
sinroll  = sin(deg2rad(roll));
cosroll  = cos(deg2rad(roll));
sindrift = sin(deg2rad(drift));
cosdrift = cos(deg2rad(drift));
cosinc = cos(deg2rad(inc_t));
sininc = sin(deg2rad(inc_t));
cosAzimuth = cos(deg2rad(az_t));
sinAzimuth = sin(deg2rad(az_t)); 



M = [(cosdrift*cosroll-sindrift*sinpitch*sinroll) (sindrift*cosroll+sinroll*sinpitch*cosdrift) (-cospitch*sinroll);...
            (-sindrift*cospitch) (cosdrift*cospitch) (sinpitch);...
            (sinroll*cosdrift+cosroll*sinpitch*sindrift) (sinroll*sindrift-cosroll*sinpitch*cosdrift) (cospitch*cosroll)];
    
    Xt_over_r = [sininc*cosAzimuth;sininc*sinAzimuth;cosinc];
    
    
    
    Xa_over_r = M*Xt_over_r;
    
    inc_a=acos((Xa_over_r(3)));
    inc_a=rad2deg(inc_a)
    inc_iwrap_a=180-inc_a;
%     az_t(rg,azi)=atan2(Xt_over_r(2),Xt_over_r(1));
%     az_t(rg,azi)=rad2deg(az_t(rg,azi));
%     az_tt(rg,azi)=90 - az_t(rg,azi);
%     az_N(rg,azi)=az_tt(rg,azi) + track1(rg,azi);