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

📄 xyz2ell.m

📁 Geodetic tools to be used in navigation analysis
💻 M
字号:
function [lat,lon,h]=xyz2ell(X,Y,Z,a,e2)% XYZ2ELL  Converts cartesian coordinates to ellipsoidal.%   Uses iterative alogithm.  Vectorized.  See also XYZ2ELL2,%   XYZ2ELL3.% Version: 25 Oct 96% Useage:  [lat,lon,h]=xyz2ell(X,Y,Z,a,e2)% Input:   X \%          Y  > vectors of cartesian coordinates in CT system (m)%          Z /%          a   - ref. ellipsoid major semi-axis (m)%          e2  - ref. ellipsoid eccentricity squared% Output:  lat - vector of ellipsoidal latitudes (radians)%          lon - vector of ellipsoidal longitudes (radians)%          h   - vector of ellipsoidal heights (m)elat=1.e-12;eht=1.e-5;p=sqrt(X.*X+Y.*Y);lat=atan2(Z,p./(1-e2));h=0;dh=1;dlat=1;while sum(dlat>elat) | sum(dh>eht)  lat0=lat;  h0=h;  v=a./sqrt(1-e2.*sin(lat).*sin(lat));  h=p./cos(lat)-v;  lat=atan2(Z, p.*(1-e2.*v./(v+h)));  dlat=abs(lat-lat0);  dh=abs(h-h0);endlon=atan2(Y,X);

⌨️ 快捷键说明

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