GPS坐标WGS84到东北天坐标系ENU
简述
由于东北天坐标系是站心系,随着坐标原点,相对坐标在变化,因此需要确定站心的参考坐标值,即想要转换WGS-84坐标系 P 1 P_1 P1到东北天坐标系时,需要给出东北天坐标系坐标原点所在的位置的WGS-84坐标值 P 2 P_2 P2.
基本思路是首先将2个WGS84坐标系转换到地心地固坐标系ECEF中,计算两个参考坐标之间的差,而后在指定的参考点附近进行展开。
一、从WGS-84坐标系到ECEF坐标系
1.先将经纬度坐标转为弧度坐标
2.转ECEF坐标
WGS坐标为 P = [ l a t , l o n , h e i g h t ] P=[lat,lon,height] P=[lat,lon,height],ECEF坐标为 E = [ x , y , z ] E=[x,y,z] E=[x,y,z]
则
x = a ∗ c o s ( l o n ) 1 + ( 1 − e 2 ) ∗ ( t a n ( l a t ) ) 2 + h e i g h t ∗ c o s ( l o n ) ∗ c o s ( l a t ) x=\frac{a*cos(lon)}{\sqrt{1+(1-e^2)*(tan(lat))^2}} +height*cos(lon)*cos(lat) x=1+(1−e2)∗(tan(lat))2a∗cos(lon)+height∗cos(lon)∗cos(lat)
y = a ∗ s i n ( l o n ) 1 + ( 1 − e 2 ) ∗ ( t a n ( l a t ) ) 2 + h e i g h t ∗ s i n ( l o n ) ∗ s i n ( l a t ) y=\frac{a*sin(lon)}{\sqrt{1+(1-e^2)*(tan(lat))^2}} +height*sin(lon)*sin(lat) y=1+