direct.m

来自「GPS相关工具」· M 代码 · 共 29 行

M
29
字号
function [lat2,lon2,h2]=direct(lat1,lon1,h1,az,va,d,a,e2)% DIRECT  Computes direct (forward) geodetic problem.%   Determines coordinates of 2nd stations given%   coordinates of and azimuth, vertical angle and%   distance from 1st station.  If az,va are local%   astronomic, lat,lon must be astronomic.  If az,va%   are local geodetic, lat,lon must be geodetic.%   Non-vectorized. See also INVERSE.% Version: 10 Oct 96% Useage:  [lat2,lon2,h2]=direct(lat1,lon1,h1,az,va,d,a,e2)% Input:   lat1 - ellipsoidal latitude of 1st station (rads)%          lon1 - ellipsoidal longitude of 1st station (rads)%          h1   - ellipsoidal ht. of 1st station (m)%          az   - azimuth from station 1 to 2 (rads)%          va   - vertical angle from 1 to 2 (rads)%          d    - distance from 1 to 2 (m)%          a    - major semi-axis of ref. ell. (m)%          e2   - eccentricity squared of ref. ell.% Output:  lat2 - ellipsoidal latitude of 2nd station (rads)%          lon2 - ellipsoidal longitude of 2nd station (rads)%          h2   - ellipsoidal ht. of 2nd station (m)[X1,Y1,Z1]=ell2xyz(lat1,lon1,h1,a,e2);[dx,dy,dz]=sph2xyz(az,va,d);[dX,dY,dZ]=lg2ct(dx,dy,dz,lat1,lon1);X2=X1+dX;Y2=Y1+dY;Z2=Z1+dZ;[lat2,lon2,h2]=xyz2ell(X2,Y2,Z2,a,e2);

⌨️ 快捷键说明

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