⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ecef2llh.m

📁 GPSINS组合定位的MATLAB程序,GPS/INS组合的MATLAB程序
💻 M
字号:
function [lat, lon, h] = ecef2llh(x, y, z)%function [lat, lon, h] = ecef2llh(x, y, z)%%Converts ECEF coordinates to latitude, longitude, height%%Input coordinates in meters. Output angles in degrees, height in meters.%a=6378137.0; %mb=6356752.3142; %mf=(a-b)/a;e=sqrt(2*f-f^2);lon=atan2(y,x)*180/pi;h=0;N=a;hold=100;while(hold ~= h)   hold=h;   sinphi=z/(N*(1-e^2)+h);   phi=atan((z+e^2*N*sinphi)/(sqrt(x^2+y^2)));   N=a/sqrt(1-e^2*sin(phi)^2);   hN=sqrt(x^2+y^2)/cos(phi);   h=(hN-N);   %txt=sprintf('phi= %0.3f; h= %0.3f',phi,h);   %disp(txt);endh;lat=phi*180/pi;

⌨️ 快捷键说明

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