xmtransf.m

来自「GPS software toolbox for GPS receiver de」· M 代码 · 共 393 行 · 第 1/2 页

M
393
字号
      fprintf(f2,'      longitude (rad.)       = %20.12f\n',lon);
      fprintf(f2,'      wander azimuth (rad.)  = %20.12f\n',waz);
      fprintf(f2,'\n*****   ECEF to INS transformation matrix   *****\n');
      for k = 1:3
         fprintf(f2,'%20.7f  %20.7f  %20.7f\n',...
                     moutput(k,1),moutput(k,2),moutput(k,3));
      end
      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');

   elseif (select == 6)                     % INS to ECEF Transformation

      lat = input('Enter latitude  in radians      --> ');   
      lon = input('Enter longitude in radians      --> ');   
      waz = input('Wander azimuth angle in radians --> ');

%  Determine transformation matrix

      moutput = minsecef(lat,lon,waz);

%  Save the results if the output file is specified or display on screen

      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');
      fprintf(f2,'\n*****   Input data   *****\n');
      fprintf(f2,'      latitude  (rad.)       = %20.12f\n',lat);
      fprintf(f2,'      longitude (rad.)       = %20.12f\n',lon);
      fprintf(f2,'      wander azimuth (rad.)  = %20.12f\n',waz);
      fprintf(f2,'\n*****   INS to ECEF transformation matrix   *****\n');
      for k = 1:3
         fprintf(f2,'%20.7f  %20.7f  %20.7f\n',...
                     moutput(k,1),moutput(k,2),moutput(k,3));
      end
      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');

   elseif (select == 7)                     % ENU to LLWA Transformation

      waz = input('Wander azimuth angle in radians --> ');

%  Determine transformation matrix

      moutput = menullw(waz);

%  Save the results if the output file is specified or display on screen

      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');
      fprintf(f2,'\n*****   Input data   *****\n');
      fprintf(f2,'      wander azimuth (rad.)  = %20.12f\n',waz);
      fprintf(f2,'\n*****   ENU to LLWA transformation matrix   *****\n');
      for k = 1:3
         fprintf(f2,'%20.7f  %20.7f  %20.7f\n',...
                     moutput(k,1),moutput(k,2),moutput(k,3));
      end
      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');

   elseif (select == 8)                     % LLWA to ENU Transformation

      waz = input('Wander azimuth angle in radians --> ');

%  Determine transformation matrix

      moutput = mllwenu(waz);

%  Save the results if the output file is specified or display on screen

      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');
      fprintf(f2,'\n*****   Input data   *****\n');
      fprintf(f2,'      wander azimuth (rad.)  = %20.12f\n',waz);
      fprintf(f2,'\n*****   LLWA to ENU transformation matrix   *****\n');
      for k = 1:3
         fprintf(f2,'%20.7f  %20.7f  %20.7f\n',...
                     moutput(k,1),moutput(k,2),moutput(k,3));
      end
      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');

   elseif (select == 9)                     % LLWA to GPS body Transformation

      yaw   = input('Enter yaw angle in radians   --> ');
      pitch = input('Enter pitch angle in radians --> ');
      roll  = input('Enter roll angle in radians  --> ');

%  Determine transformation matrix

      moutput = mllwb(yaw,pitch,roll);

%  Save the results if the output file is specified or display on screen

      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');
      fprintf(f2,'\n*****   Input data   *****\n');
      fprintf(f2,'      yaw   (rad.)  = %20.12f\n',yaw);
      fprintf(f2,'      pitch (rad.)  = %20.12f\n',pitch);
      fprintf(f2,'      roll  (rad.)  = %20.12f\n',roll);
      fprintf(f2,'\n*****   LLWA to GPS body transformation matrix   *****\n');
      for k = 1:3
         fprintf(f2,'%20.7f  %20.7f  %20.7f\n',...
                     moutput(k,1),moutput(k,2),moutput(k,3));
      end
      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');

   elseif (select == 10)                    % GPS body to LLWA Transformation

      yaw   = input('Enter yaw angle in radians   --> ');
      pitch = input('Enter pitch angle in radians --> ');
      roll  = input('Enter roll angle in radians  --> ');

%  Determine transformation matrix

      moutput = mbllw(yaw,pitch,roll);

%  Save the results if the output file is specified or display on screen

      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');
      fprintf(f2,'\n*****   Input data   *****\n');
      fprintf(f2,'      yaw   (rad.)  = %20.12f\n',yaw);
      fprintf(f2,'      pitch (rad.)  = %20.12f\n',pitch);
      fprintf(f2,'      roll  (rad.)  = %20.12f\n',roll);
      fprintf(f2,'\n*****   GPS body to LLWA transformation matrix   *****\n');
      for k = 1:3
         fprintf(f2,'%20.7f  %20.7f  %20.7f\n',...
                     moutput(k,1),moutput(k,2),moutput(k,3));
      end
      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');
      
 
   elseif (select == 11)                     % ECEF to ECI Transformation

      dtime = input('Enter time elapsed since reference time (sec) --> ');   

%  Determine transformation matrix

      moutput = mecefeci(dtime);

%  Save the results if the output file is specified or display on screen

      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');
      fprintf(f2,'\n*****   Input data   *****\n');
      fprintf(f2,'      time elapsed  (sec.)       = %20.12f\n',dtime);
      fprintf(f2,'\n*****   ECEF to ECI transformation matrix   *****\n');
      for k = 1:3
         fprintf(f2,'%20.7f  %20.7f  %20.7f\n',...
                     moutput(k,1),moutput(k,2),moutput(k,3));
      end
      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');

   elseif (select == 12)                     % ECI to ECEF Transformation

      dtime = input('Enter time elapsed since reference time (sec) --> ');   

%  Determine transformation matrix

      moutput = meciecef(dtime);

%  Save the results if the output file is specified or display on screen

      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');
      fprintf(f2,'\n*****   Input data   *****\n');
      fprintf(f2,'      time elapsed  (sec.)       = %20.12f\n',dtime);
      fprintf(f2,'\n*****   ECI to ECEF transformation matrix   *****\n');
      for k = 1:3
         fprintf(f2,'%20.7f  %20.7f  %20.7f\n',...
                     moutput(k,1),moutput(k,2),moutput(k,3));
      end
      fprintf(f2,'\n**************************************************');
      fprintf(f2,'******************************\n');     
      
   else

      disp(' ');
      disp('Selection is not in the designated range');
      disp(' ');

   end

%  Select another computation, if desired

   disp('  ');
   answer = input('Do you want another computation? (y/n)[n]  ','s');
  disp(' ');

end

disp('End of the program  XMTRANSF');
disp(' ');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?