?? xyz2ell3.m
字號:
function [lat,lon,h]=xyz2ell3(X,Y,Z,a,b,e2)% XYZ2ELL3 Converts cartesian coordinates to ellipsoidal.% Uses direct algorithm in B.R. Bowring, "The accuracy of% geodetic latitude and height equations", Survey% Review, v28 #218, October 1985, pp.202-206. Vectorized.% See also XYZ2ELL, XYZ2ELL2.% Version: 18 Jan 96% Useage: [lat,lon,h]=xyz2ell3(X,Y,Z,a,b,e2)% Input: X \% Y > vectors of cartesian coordinates in CT system (m)% Z /% a - ref. ellipsoid major semi-axis (m)% b - ref. ellipsoid minor 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)lon=atan2(Y,X);e=e2*(a/b)^2;p=sqrt(X.*X+Y.*Y);r=sqrt(p.*p+Z.*Z);u=atan(b.*Z.*(1+e.*b./r)./(a.*p));lat=atan((Z+e.*b.*sin(u).^3)./(p-e2.*a.*cos(u).^3));v=a./sqrt(1-e2.*sin(lat).^2);h=p.*cos(lat)+Z.*sin(lat)-a*a./v;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -