【论文】直角坐标系与WGS-84大地坐标系的转换

WGS-84大地坐标系转换为直角坐标系:

function [ x,y,z ] = WGS_84(L,B,H)  
%WGS_84坐标系下的(L,B,H)转化为直角坐标系下的(x,y,z) 
BR = B*pi/180; %将角度转换为值
LR = L*pi/180; %将角度转换为值
e = 0.00669437999013; 
a = 6378137;%单位为m 
N = a ./sqrt(1 - e .^2.* sin(BR) .* sin(BR)); 
x = (N + H) .* cos(BR) .* cos(LR); 
y = (N + H) .* cos(BR) .* sin(LR); 
z = (N .* (1 - e.^2) + H ) .* sin(BR); 
end

直角坐标系转换为WGS-84大地坐标系:

function [ L,B,H] = re_WGS_84( x,y,z ) 
e = 0.00669437999013; 
a = 6378137;%单位为m 
L = (atan (y/x))*180/pi+180
B = (atan( z/ (sqrt(x^2 + y^2)*((1 - e^2)))))*180/pi
H = sqrt(x^2+y^2+z^2/(1-e^2)^2)-a
end

验证:

[x,y,z] = WGS_84(123.375 , 24.565 , 8e6 )
x =

  -7.1938e+06
y =

   1.0920e+07
z =

   5.9772e+06
[L,B,H] = re_WGS_84(7.1938e+06,1.0920e+07,5.9772e+06)
L =

  123.3758
B =

   24.5657
H =

   7.9999e+06
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 酷酷鲨 设计师:CSDN官方博客 返回首页