-
2020-09-07 20:03:43
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+(1−e2)∗(tan(lat))2a∗sin(lon)+height∗sin(lon)∗sin(lat)
z = a ∗ ( 1 − e 2 ) ∗ s i n ( l a t ) 1 − e 2 ∗ ( s i n ( l a t ) ) 2 + h e i g h t ∗ s i n ( l a t ) z=\frac{a*(1-e^2)*sin(lat)}{\sqrt{1-e^2*(sin(lat))^2}} +height*sin(lat) z=1−e2∗(sin(lat))2a∗(1−e2)∗sin(lat)+height∗sin(lat)经过此步骤后获得地心地固坐标系下的坐标 E 1 , E 2 E_1,E_2 E1,E2
# ENU坐标系转换至WGS84坐标系,输入ENU坐标x,y,z和参考点经纬高,输出WGS84坐标 def enu2llh( enu, orgllh): for item in range(2): orgllh[item]=orgllh[item]*PI/180 xyz=enu2xyz(enu, orgllh) result=xyz2llh(xyz) for item in range(2): result[item]=result[item]*180/PI return result # WGS84坐标系转换至ECEF坐标系,输入经纬高,输出ECEF坐标x,y,z def llh2xyz(llh): lat = llh[0] lon = llh[1] height = llh[2] slat = np.sin(lat) clat = np.cos(lat) slon = np.sin(lon) clon = np.cos(lon) t2lat = (np.tan(lat))*(np.tan(lat)) tmp = 1 - e * e tmpden = np.sqrt(1 + tmp * t2lat) tmp2 = np.sqrt(1 - e * e*slat*slat) x = (a*clon) / tmpden + height * clon*clat y = (a*slon) / tmpden + height * slon*slat z = (a*tmp*slat) / tmp2 + height * slat return [x,y,z]
二、 通过ECEF转换到参考点附近的ENU坐标系上
使用ECEF坐标系下求解三维度距离,并在参考点附近进行转换
1.在参考点 P 2 = [ l a t , l o n , h e i g h t ] P_2=[lat,lon,height] P2=[lat,lon,height]附近的旋转矩阵 R R R
R = [ − s i n ( l o n ) , c o s ( l o n ) , 0 − s i n ( l a t ) ∗ c o s ( l o n ) , − s i n ( l a t ) ∗ s i n ( l o n ) , c o s ( l a t ) c o ( l a t ) ∗ c o s ( l o n ) , c o s ( l a t ) s i n ( l o n ) , s i n ( l a t ) ] R=\begin{bmatrix} &-sin(lon) ,& cos(lon),&0 & \\ &-sin(lat)*cos(lon) ,&-sin(lat)*sin(lon) ,&cos(lat) & \\ & co(lat)*cos(lon) ,&cos(lat)sin(lon), &sin(lat) & \end{bmatrix} R=⎣⎡−sin(lon),−sin(lat)∗cos(lon),co(lat)∗cos(lon),cos(lon),−sin(lat)∗sin(lon),cos(lat)sin(lon),0cos(lat)sin(lat)⎦⎤
2.旋转到ENU上得到坐标 N = [ E , N , U ] N=[E ,N ,U] N=[E,N,U]
N = [ E N U ] = R ∗ Δ x = R ∗ [ x 1 − x 2 y 1 − y 2 z 1 − z 2 ] N=\begin{bmatrix} &E &\\ &N&\\ &U & \end{bmatrix}=R* \Delta x=R*\begin{bmatrix} &x_1-x_2 &\\ &y_1-y_2 &\\ &z_1-z_2 & \end{bmatrix} N=⎣⎡ENU⎦⎤=R∗Δx=R∗⎣⎡x1−x2y1−y2z1−z2⎦⎤
# ECEF坐标系转换至ENU坐标系,输入ECEF坐标x,y,z和参考点经纬高,输出ENU坐标 def xyz2enu( xyz, orgllh): lat = orgllh[0] lon = orgllh[1] height = orgllh[2] slat = np.sin(lat) clat = np.cos(lat) slon = np.sin(lon) clon = np.cos(lon) tmpxyz=[0,0,0] orgxyz=[0,0,0] tmporg=[0,0,0] difxyz= [0,0,0] enu=[0,0,0] orgxyz=llh2xyz(orgllh) for i in range(3): tmpxyz[i] = xyz[i] tmporg[i] = orgxyz[i] difxyz[i] = tmpxyz[i] - tmporg[i] R_list = [[-slon,clon,0] , [-slat * clon,-slat * slon,clat ], [clat*clon,clat*slon,slat ] ] for i in range(3): enu[0] = enu[0] + R_list[0][i] * difxyz[i] enu[1] = enu[1] + R_list[1][i] * difxyz[i] enu[2] = enu[2] + R_list[2][i] * difxyz[i] return enu
更多相关内容 -
matlab GPS定位多普勒测速 XYZ坐标转换经纬高坐标转换东北天坐标
2019-04-18 12:00:19matlab定位,多普勒多普勒测速 ,XYZ坐标转换经纬高坐标 转换东北天坐标,速度转换成东北天坐标,速度测方位角 -
matlab 经纬度 东北天 直角坐标系转换代码
2017-11-16 10:23:48本Matlab代码提供了地理坐标丰富的转换功能:涵盖了经纬度坐标转东北天坐标;经纬度坐标转地心直角坐标;地心直角坐标转东北天;地心直角坐标转经纬度的功能;代码简洁易懂,高效 -
东北天坐标系转载体坐标系
2021-02-08 13:46:08基本概念1.1欧拉角1.2左乘右乘1.3东北天坐标系1.4载体坐标系1.5捷联惯性导航系统2. 通过ECEF转换到参考点附近的ENU坐标系上3. 东北天坐标系到载体坐标系 1. 基本概念 1.1欧拉角 欧拉旋转定理指出:任何一个旋转都...1. 基本概念
1.1欧拉角
欧拉旋转定理指出:任何一个旋转都可以用三个旋转的参数来表示。
- 三个旋转角的组合方式(是xyz还是yzx还是zxy)
为了方便,我们用x指代只绕x轴的旋转,用y指代只绕y轴进行的旋转。在描述欧拉角的时候可以有以下方式:xyz, yzx,zxy 或者是反向顺序 zyx xzy yxz,共六种。
- 旋转角度的参考坐标系统(旋转是相对于固定的坐标系还是相对于自身的坐标系)
在描述这3个旋转角的时候,可以是相对于某个固定的坐标系统(称为extrinsic rotations),也可以是相对于物体自身的坐标系统(称为intrinsic rotations)
- 使用旋转角度是左手系还是右手系
旋转角度是正还是负,如果是右手系,那么符合右手定则决定正负,左手系则符合左手定则决定正负。
- 三个旋转角的记法
图 旋转的记法
1.2左乘右乘
左乘还是右乘
左乘——相对于固定坐标系进行变换,(固定坐标系—我们上面提到的固定x轴旋转……,这里的固定,其实我们已经暗暗地定义了一个坐标系,这个坐标系我们潜意识认为它是不变的,这也就是世界坐标系。除了平时我们假设了固定坐标系就是我们认识的世界坐标系,其他情况是我们需要将坐标系1变换到坐标系2,这时,我们的坐标系2可以设为该固定坐标系)
V’ = R * V = Rz * Ry * Rx V,变换顺序是先绕x转,再绕y转,最后绕z转。
右乘——相对于自身坐标系进行变换,每变一次下一次需要以新坐标系为标准进行变换。比如第一次变换后,原x轴的位置变为y轴,那么下一次绕y轴的变换,就会绕之前的x轴变换。
参考 https://blog.csdn.net/silence1214/article/details/8634664
https://blog.csdn.net/a6333230/article/details/88343282?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control
1.3东北天坐标系
-
姿态角范围
(1) 俯仰角(-90 ~ 90deg);
(2) 横滚角(-180 ~ 180deg);
(3) 航向角(-180 ~ 180deg,可转换为0~360deg); -
轴向
X轴向东:绕此轴旋转决定俯仰角;
Y轴向北:绕此轴旋转决定横滚角;
Z轴向上:绕此轴旋转决定航向角。
1.4载体坐标系
右手坐标系(正负符合右手定则):X轴向右:绕此轴旋转决定俯仰角; Y轴向前,速度的方向:绕此轴旋转决定横滚角; Z轴向上:绕此轴旋转决定航向角。
1.5捷联惯性导航系统
捷联惯性导航系统(Strap-down Inertial Navigation System)是把惯性仪表直接固连在载体上,用计算机来完成导航平台功能的惯性导航系统。
将惯性测量器件直接固连在载体上,再将其输出通过数学平台(又称捷联矩阵之转换到导航坐标系的参量),进行导航解算。系统的惯性测量器件为角速率陀螺仪和加速度计,它们固连在载体上,测得的都是载体坐标系下的物理量。
2. 通过ECEF转换到参考点附近的ENU坐标系上
推导过程参考:导航中坐标系及坐标转换
使用ECEF坐标系下求解三维度距离,并在参考点附近进行转换
- 1.参考点P=[lat,lon,height],经纬度
图转换过程
3. 东北天坐标系到载体坐标系
- 使用右手定则确定正负
- 转换使用右乘矩阵(矩阵左乘)的方式,即旋转时是绕载体自己的轴进行旋转,动态
- 旋转顺序为 Z -> X -> Y ,第一次绕 Z 轴旋转,称为航向角 Yaw,第二次 X 绕 轴旋转,称为俯仰角 Pitch,
第三次绕 Y 轴旋转,称为翻滚角 Roll
各轴正向的旋转矩阵,如下图所示:
图 旋转矩阵因为偏航角的正方向与定义的方向相反,故矩阵有所变化,指导过程如下,以下为手写计算图:
图推导过程 -
GPS经纬度坐标WGS84到东北天坐标系ENU的转换
2021-09-13 13:43:47GPS经纬度坐标WGS84到东北天坐标系ENU的转换常用坐标系介绍地理坐标系 (Geographic Coordinate System, GCS)地心地固坐标系 (ECEF)当地东、北、上 (ENU) 坐标基坐标相互转化地理坐标系到地心地固坐标系 (GCS to ECEF...GPS经纬度坐标WGS84到东北天坐标系ENU的转换
常用坐标系介绍
地理坐标系 (Geographic Coordinate System, GCS)
可以说是最为广泛应用的一个地球坐标系,它给出一点的大地纬度、大地经度和大地高程而更加直观地告诉我们该点在地球中的位置,故又被称作纬经高坐标系。WGS-84坐标系的X轴指向BIH(国际时间服务机构)1984.0定义的零子午面(Greenwich)和协议地球极(CTP)赤道的交点。Z轴指向CTP方向。Y轴与X、Z轴构成右手坐标系。
一句话解释就是:把前面提到的ECEF坐标系用在GPS中,就是WGS-84坐标系。
其中:
(1):大地纬度是过用户点P的基准椭球面法线与赤道面的夹角。纬度值在-90°到+90°之间。北半球为正,南半球为负。
(2):大地经度是过用户点P的子午面与本初子午线之间的夹角。经度值在-180°到+180°之间。
(3):大地高度h是过用户点P到基准椭球面的法线距离,基准椭球面以内为负,以外为正。
参考资料:地理信息系统中常用坐标系地心地固坐标系 (ECEF)
在GPS中使用的被称为地球中心,地球固定(ECEF)。ECEF使用三维XYZ坐标(以米为单位)来描述GPS用户或卫星。“地球”这个词来自于坐标轴的原点(0,0,0)位于质心处(通过多年的跟踪卫星确定轨迹)。“地球固定”这个词意味着坐标轴相对于地球是固定的(也就是说,它们随地球旋转)。其 x 轴延伸通过本初子午线(经度 0 度)和赤道(0度纬度)。z 轴延伸穿过真正的北极(即与地球自转轴重合)。y 轴完成右手坐标系,穿过赤道和 90 度经度,如图 1所示
图1 ECEF直角坐标系当地东、北、上 (ENU) 坐标
站心坐标系也叫东北天坐标系 ENU,用于表示以观察者为中心的其他物体
的运动规律。以站心为坐标系原点,z 轴与椭球法线重合,向上为正,y 与椭球
短半轴重合(北向),x 轴与椭球长半轴重合(东向)
基坐标相互转化
地理坐标系到地心地固坐标系 (GCS to ECEF)
这里因为地球近似为一个椭球,所以沿着椭球表面的法线方向不在 O e O_{e} Oe与 M M M的连线方向,首先我们假设它的椭球表面的法线方向的反向延长线交 Z Z Z轴与于点 M ′ M{'} M′,设 ∣ P Q ∣ = N , ∣ P M ∣ = h |PQ|= N,|PM| = h ∣PQ∣=N,∣PM∣=h, 在 X E C E F − E C E F − E C E F 在X_{ECEF}-_{ECEF}-_{ECEF} 在XECEF−ECEF−ECEF基坐标系下,根据几何关系,M的坐标为
( ( N + h ) cos ( φ ) cos ( λ ) , ( N + h ) cos ( φ ) sin ( λ ) , ( N + h ) sin ( φ ) ) − O Q ) \left((N+h)\cos \left(\varphi\right) \cos (\lambda), (N+h) \cos \left(\varphi\right) \sin (\lambda), (N+h) \sin \left(\varphi\right)\right)-OQ) ((N+h)cos(φ)cos(λ),(N+h)cos(φ)sin(λ),(N+h)sin(φ))−OQ)
然后我们将 M M M点所在的子午圈椭圆投影到一个二维的平面上,如下图所示,(gps的高度h不是与地心在一条直线上)
首先设p点所在的子午圈的方程设为
x 2 R e 2 + z 2 R p 2 = 1 ① \tag*{①}\frac{x^{2}}{R_{e}^{2}}+\frac{z^{2}}{R_{p}^{2}}=1 Re2x2+Rp2z2=1① 椭圆的扁率定义为
f = R e − R p R e f=\frac{R_{e}-R_{p}}{R_{e}} f=ReRe−Rp 椭圆的离心率定义为
e = R e 2 − R p 2 R e ② e=\tag*{②}\frac{\sqrt{R_{e}^{2}-R_{p}^{2}}}{R_{e}} e=ReRe2−Rp2②由②式可得 R p = R e 1 − e 2 ③ \tag*{③}\ R_{p}=Re \sqrt{1-e^{2}}\, Rp=Re1−e2③
将椭圆方程①两边同时对 x x\, x求导,并结合③式,可得 2 x R e 2 + 2 z d z / d x R e 2 ( 1 − e 2 ) = 0 \frac{2 x}{R_{e}^{2}}+\frac{2 z \mathrm{~d} z / \mathrm{d} x}{R_{e}^{2}\left(1-e^{2}\right)}=0 Re22x+Re2(1−e2)2z dz/dx=0移项整理得 d z d x = − ( 1 − e 2 ) x z \frac{\mathrm{d} z}{\mathrm{~d} x}=-\left(1-e^{2}\right) \frac{x}{z} dxdz=−(1−e2)zx式中 d z d x \frac{\mathrm{d} z}{\mathrm{~d} x} dxdz表示椭圆在P点的切线的斜率,显然切线PE ⊥ \bot \, ⊥法线PQ,所以 K P E K P Q = − 1 K_{PE} K_{PQ}=-1\, KPEKPQ=−1,因为 P Q PQ PQ的斜率为 tan φ \tan \varphi \, tanφ,则
d z d x tan φ = − ( 1 − e 2 ) x z tan φ = − 1 \frac{\mathrm{d} z}{\mathrm{~d} x} \tan \varphi =-\left(1-e^{2}\right) \frac{x}{z} \tan \varphi =-1\, dxdztanφ=−(1−e2)zxtanφ=−1
整理可得 z = x ( 1 − e 2 ) tan φ ④ \tag*{④}z=x\left(1-e^{2}\right) \tan \varphi z=x(1−e2)tanφ④
结合③④带入椭圆方程①中,可得到以地理纬度 φ \varphi \, φ的椭圆的参数方程 x = R e 1 − e 2 sin 2 φ cos φ z = R e ( 1 − e 2 ) 1 − e 2 sin 2 φ sin φ } ⑤ \tag*{⑤}\left.\begin{array}{l} x=\frac{R_{e}}{\sqrt{1-e^{2} \sin ^{2} \varphi}} \cos \varphi \\ z=\frac{R_{e}\left(1-e^{2}\right)}{\sqrt{1-e^{2} \sin ^{2} \varphi}} \sin \varphi \end{array}\right\} x=1−e2sin2φRecosφz=1−e2sin2φRe(1−e2)sinφ⎭⎬⎫⑤
根据子午圈投影的图可得 x = N c o s φ ⑥ \tag*{⑥} x =N cos \varphi x=Ncosφ⑥ 将⑤中的 x x\, x带入⑥式中 N = R e 1 − e 2 sin 2 φ N =\frac{R_{e}}{\sqrt{1-e^{2} \sin ^{2} \varphi}} N=1−e2sin2φRe
因此参数方程可以简写为 x = N cos φ z = N ( 1 − e 2 ) sin φ } ⑥ \tag*{⑥}\left.\begin{array}{l} x=N\cos \varphi \\ z=N\left(1-e^{2}\right) \sin \varphi \end{array}\right\} x=Ncosφz=N(1−e2)sinφ}⑥
通过上面的椭圆参数方程⑥,结合投影到 2 D 平 面 上 的 Z 轴 与 E C E F 的 Z 轴 2D平面上的Z轴与ECEF的Z轴 2D平面上的Z轴与ECEF的Z轴是同一个可得 M M M点的坐标系 z M = N ( 1 − e 2 ) sin φ + h s i n φ = ( z_{M}=N\left(1-e^{2}\right) \sin \varphi + hsin \varphi =( zM=N(1−e2)sinφ+hsinφ=(,结合之前所说的{ECEF坐标系下 P P P的坐标系为 ( ( N + h ) cos ( φ ) cos ( λ ) , ( N + h ) cos ( φ ) sin ( λ ) , ( N + h ) sin ( φ ) ) − O Q ) \left((N+h)\cos \left(\varphi\right) \cos (\lambda), (N+h) \cos \left(\varphi\right) \sin (\lambda), (N+h) \sin \left(\varphi\right)\right)-OQ) ((N+h)cos(φ)cos(λ),(N+h)cos(φ)sin(λ),(N+h)sin(φ))−OQ)
可以得出
x M = ( N + h ) c o s ( φ ) c o s ( λ ) x_{M} = (N+h)cos(φ)cos(λ) xM=(N+h)cos(φ)cos(λ)
y M = ( N + h ) c o s ( φ ) s i n ( λ ) y_{M} = (N+h)cos(φ)sin(λ) yM=(N+h)cos(φ)sin(λ)
z M = ( b 2 a 2 N + h ) sin φ z_{M} =\left(\frac{b^{2}}{a^{2}} N+h\right) \sin \varphi zM=(a2b2N+h)sinφ附上各参数的含义
φ = l a t i t u d e \varphi = latitude φ=latitude
λ = l o n g i t u d e \lambda = longitude λ=longitude
h = h e i g h t a b o v e e l l i p s o i d ( m e t e r s ) h = height above ellipsoid (meters) h=heightaboveellipsoid(meters)
N = R a d i u s o f C u r v a t u r e ( m e t e r s ) , d e f i n e d a s : a 1 − e 2 sin 2 φ N = Radius of Curvature (meters), defined as:\frac{a}{\sqrt{1-e^{2} \sin ^{2} \varphi}} N=RadiusofCurvature(meters),definedas:1−e2sin2φa,这里的a就是我们上面推导公式的 R e R_{e} Re,详细的参考 ⑥ ⑥ ⑥下面的推导.WGS84 Parameters
a = 6378137 a = 6378137 a=6378137(椭圆的长半轴)这里表示赤道椭圆的长半轴
b = a ( 1 − f ) = 6356752.31424518 b = a (1 -f ) = 6356752.31424518 b=a(1−f)=6356752.31424518
f = 1 298.257223563 f =\frac{1}{298.257223563}\, f=298.2572235631
e = a 2 − b 2 a 2 e=\frac{\sqrt{a^{2}-b^{2}}}{a^{2}} e=a2a2−b2详细含义参照②我们把 M M M点放大,来说说gps的高度
高度 h , h \,, h,gps , 的 的 的altitude,(从上面图中可知gps的测量高度是GPS天线与参考椭球面的垂直距离,WGS84椭球面在世界范围内近似大地水准面),地球的长半轴 a a a与短半轴 b b b是已知的,然后地理纬度 φ \varphi \, φ也是已知的,所以M点在 E C E F ECEF ECEF坐标系下已知.地心地固坐标系到东北天、站心坐标系 ECEF to ENU
这里采用几何意义的方式来讲这个转化关系,这里为了直观,我们在p点画ENU坐标系
因为 E a s t ( x L o c a l ) East(x Local) East(xLocal)的方向与M点所在的子午线(P点子午线)垂直,所以我们首先把绕着 Z E C E F Z_{ECEF} ZECEF旋转至 X E C E F X_{ECEF} XECEF与 E a s t ( x L o c a l ) East(x Local) East(xLocal)的方向一致① E C E F 坐 标 系 ECEF坐标系 ECEF坐标系绕着 Z E C E F Z_{ECEF} ZECEF逆时针旋转 ( π 2 + λ ) (\frac{π}{2} + \lambda) (2π+λ),然后绕着 X E C E F X_{ECEF} XECEF旋转至 Z E C E F Z_{ECEF} ZECEF与 U p ( Z L o c a l ) Up(Z Local) Up(ZLocal)方向一致②绕着 X E C E F X_{ECEF} XECEF逆时针旋转 ( π 2 − φ ) (\frac{π}{2} - \varphi) (2π−φ)③平移的部分就是之前LLA转到ECEF坐标系下的 M M M的坐标
R z e c e f [ ( π 2 + λ ) ] = ( cos [ ( π 2 + λ ) ] sin [ ( π 2 + λ ) ] 0 − sin [ ( π 2 + λ ) ] cos [ ( π 2 + λ ) ] 0 0 0 1 ) R_{z_{ecef}}[(\frac{π}{2} + \lambda)]=\left(\begin{array}{ccc}\cos [(\frac{π}{2} + \lambda)] & \sin [(\frac{π}{2} + \lambda)] & 0 \\ -\sin [(\frac{π}{2} + \lambda)] & \cos [(\frac{π}{2} + \lambda)] & 0 \\ 0 & 0 & 1 \end{array}\right) Rzecef[(2π+λ)]=⎝⎛cos[(2π+λ)]−sin[(2π+λ)]0sin[(2π+λ)]cos[(2π+λ)]0001⎠⎞R x e c e f [ ( π 2 − φ ) ] = [ 1 0 0 0 cos [ ( π 2 − φ ) ] sin [ ( π 2 − φ ) ] 0 − sin [ ( π 2 − φ ) ] cos [ ( π 2 − φ ) ] ] R_{x_{ecef}}[(\frac{π}{2} - \varphi)]=\left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \cos [(\frac{π}{2} - \varphi)] & \sin [(\frac{π}{2} - \varphi)] \\ 0 & -\sin [(\frac{π}{2} - \varphi)] & \cos [(\frac{π}{2} - \varphi)] \end{array}\right] Rxecef[(2π−φ)]=⎣⎡1000cos[(2π−φ)]−sin[(2π−φ)]0sin[(2π−φ)]cos[(2π−φ)]⎦⎤
R x e c e f [ ( π 2 − φ ) ] R z e c e f [ ( π 2 + λ ) ] = ( − sin λ cos λ 0 − cos λ sin φ − sin λ sin φ cos φ cos λ cos φ sin λ cos φ sin φ ) R_{x_{ecef}}[(\frac{π}{2} - \varphi)] \, R_{z_{ecef}}[(\frac{π}{2} + \lambda)] = \left(\begin{array}{ccc} -\sin \lambda & \cos \lambda & 0 \\ -\cos \lambda \sin \varphi & -\sin \lambda \sin \varphi & \cos \varphi \\ \cos \lambda \cos \varphi & \sin \lambda \cos \varphi & \sin \varphi \end{array}\right) Rxecef[(2π−φ)]Rzecef[(2π+λ)]=⎝⎛−sinλ−cosλsinφcosλcosφcosλ−sinλsinφsinλcosφ0cosφsinφ⎠⎞
在车辆运动中,我们一般车辆启动假设gps天线的初始位置在 { X r , Y r , Z r } \left\{X_{r}, Y_{r}, Z_{r}\right\} {Xr,Yr,Zr},车辆运动的位置为 { X p , Y p , Z p } \left\{X_{p}, Y_{p}, Z_{p}\right\} {Xp,Yp,Zp},则基于启动为原点的ENU的坐标为:
[ x y z ] = [ − sin λ cos λ 0 − cos λ sin φ − sin λ sin φ cos φ cos λ cos φ sin λ cos φ sin φ ] [ X p − X r Y p − Y r Z p − Z r ] \left[\begin{array}{l} x \\ y \\ z \end{array}\right]=\left[\begin{array}{ccc} -\sin \lambda & \cos \lambda & 0 \\ -\cos \lambda \sin \varphi & -\sin \lambda \sin \varphi & \cos \varphi \\ \cos \lambda \cos \varphi & \sin \lambda \cos \varphi & \sin \varphi \end{array}\right]\left[\begin{array}{c} X_{p}-X_{r} \\ Y_{p}-Y_{r} \\ Z_{p}-Z_{r} \end{array}\right] ⎣⎡xyz⎦⎤=⎣⎡−sinλ−cosλsinφcosλcosφcosλ−sinλsinφsinλcosφ0cosφsinφ⎦⎤⎣⎡Xp−XrYp−YrZp−Zr⎦⎤
这里讲的也很好地理坐标系到东北天、站心坐标系(GCS to ENU)
GCS和ENU之间的坐标系转换通过先转换为ECEF实现。
代码有时间再放上来吧 -
LLA(经纬高)坐标转换成ENU(东北天)坐标的详细推导
2021-05-18 12:55:26参考资料: ... ECEF坐标系和ENU坐标系之间的关系如上图所示...ENU坐标:东北天坐标系下的坐标,该坐标系的原点需要指定,原点向东为x轴,原点向北为y轴,原点指向天为z轴,构成右手直角坐标系,该系下的坐标表示都是米制这是一篇经纬高(LLA)坐标转东北天坐标(ENU)的详细推导,并给出近似转换的过程和结果
参考资料:
https://blog.csdn.net/qq_34213260/article/details/109133847
ECEF坐标系和ENU坐标系之间的关系如上图所示,各坐标系的定义在此不再赘述。LLA坐标:Lat、Lon、Alt坐标,表示在ECEF坐标系下,其中Lat和Lon用角度( 。 ^。 。)或弧度(rad)表示,Alt用米(m)表示;
ENU坐标:东北天坐标系下的坐标,该坐标系的原点需要指定,原点向东为x轴,原点向北为y轴,原点指向天为z轴,构成右手直角坐标系,该系下的坐标表示都是米制单位;LLA坐标转换成ENU坐标的过程主要分为两步:LLA->ECEF->ENU
其中主要参数的定义如下:
b = 6356752.3142 b=6356752.3142 b=6356752.3142
e 2 = f ( 2 − f ) e^2=f(2-f) e2=f(2−f)
N = a 1 − e 2 s i n 2 ( l a t ) N=\frac{a}{\sqrt{1-e^2sin^2(lat)}} N=1−e2sin2(lat)a
其中b为椭球短半径,e为椭球偏心率(1)LLA->ECEF:(无需给定起点,一对一转换)
从最上面一幅图中可以轻易得到同一点在这两个坐标系之间的转换关系,如下:
X e c e f = ( N + a l t ) c o s ( l a t ) c o s ( l o n ) X_{ecef}=(N+alt)cos(lat)cos(lon) Xecef=(N+alt)cos(lat)cos(lon)
Y e c e f = ( N + a l t ) c o s ( l a t ) s i n ( l o n ) Y_{ecef}=(N+alt)cos(lat)sin(lon) Yecef=(N+alt)cos(lat)sin(lon)
Z e c e f = ( N ( 1 − e 2 ) + a l t ) s i n ( l a t ) Z_{ecef}=(N(1-e^2)+alt)sin(lat) Zecef=(N(1−e2)+alt)sin(lat)
(2)ECEF->ENU:(需要给定起点)
假设ENU坐标系的坐标原点对应的ECEF坐标和LLA坐标分别为:
O e c e f = ( X 0 , Y 0 , Z 0 ) O_{ecef}=(X_0,Y_0,Z_0) Oecef=(X0,Y0,Z0)
O l l a = ( l a t 0 , l o n 0 , a l t 0 ) O_{lla}=(lat_0,lon_0,alt_0) Olla=(lat0,lon0,alt0)
假设空间中有另一点P,且:
P e c e f = ( X , Y , Z ) P_{ecef}=(X,Y,Z) Pecef=(X,Y,Z)
则P在ENU系下的坐标为:
P e n u = R E C E F E N U ( P e c e f − O e c e f ) (1) P_{enu}=R_{ECEF}^{ENU}(P_{ecef}-O_{ecef})\tag{1} Penu=RECEFENU(Pecef−Oecef)(1)
其中只有 R E C E F E N U R_{ECEF}^{ENU} RECEFENU是未知的,下面对其进行推导:R E C E F E N U R_{ECEF}^{ENU} RECEFENU可以分解为如下三个旋转过程:ECEF–>绕 Z e c e f Z_{ecef} Zecef轴逆时针旋转 λ \lambda λ(经度)–>绕 Y e c e f ′ Y_{ecef}^{'} Yecef′轴逆时针旋转( 90 − ϕ 90-\phi 90−ϕ)( ϕ : \phi: ϕ:纬度)–>绕 Z e c e f ′ ′ Z_{ecef}^{''} Zecef′′逆时针旋转90–>ENU
上述问题是典型的空间中点不动,坐标系转动的问题,按顺序记三次旋转分别为 R 1 、 R 2 、 R 3 R_1、R_2、R_3 R1、R2、R3,则:
R 1 = [ c o s ( λ ) s i n ( λ ) 0 − s i n ( λ ) c o s ( λ ) 0 0 0 1 ] R_1= \begin{bmatrix} cos(\lambda) & sin(\lambda) & 0 \\ -sin(\lambda) & cos(\lambda) & 0 \\ 0 & 0 & 1 \end{bmatrix} R1=⎣⎡cos(λ)−sin(λ)0sin(λ)cos(λ)0001⎦⎤
R 2 = [ s i n ( ϕ ) 0 − c o s ( ϕ ) 0 1 0 c o s ( ϕ ) 0 s i n ( ϕ ) ] R_2= \begin{bmatrix} sin(\phi) & 0 & -cos(\phi) \\ 0 & 1 & 0 \\ cos(\phi) & 0 & sin(\phi) \end{bmatrix} R2=⎣⎡sin(ϕ)0cos(ϕ)010−cos(ϕ)0sin(ϕ)⎦⎤
R 3 = [ 0 1 0 − 1 0 0 0 0 1 ] R_3= \begin{bmatrix} 0 & 1 & 0 \\ -1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} R3=⎣⎡0−10100001⎦⎤
则:
R E C E F E N U = R 3 ∗ R 2 ∗ R 1 = [ − s i n ( λ ) c o s ( λ ) 0 − s i n ( ϕ ) c o s ( λ ) − s i n ( ϕ ) s i n ( λ ) c o s ( ϕ ) c o s ( ϕ ) c o s ( λ ) c o s ( ϕ ) s i n ( λ ) s i n ( ϕ ) ] R_{ECEF}^{ENU}=R_3*R_2*R_1= \begin{bmatrix} -sin(\lambda) & cos(\lambda) & 0 \\ -sin(\phi)cos(\lambda) & -sin(\phi)sin(\lambda) & cos(\phi) \\ cos(\phi)cos(\lambda) & cos(\phi)sin(\lambda) & sin(\phi) \end{bmatrix} RECEFENU=R3∗R2∗R1=⎣⎡−sin(λ)−sin(ϕ)cos(λ)cos(ϕ)cos(λ)cos(λ)−sin(ϕ)sin(λ)cos(ϕ)sin(λ)0cos(ϕ)sin(ϕ)⎦⎤
将上式带入到公式(1)中可以得到:
P e n u = R E C E F E N U ( P e c e f − O e c e f ) = [ − s i n ( l o n 0 ) c o s ( l o n 0 ) 0 − s i n ( l a t 0 ) c o s ( l o n 0 ) − s i n ( l a t 0 ) s i n ( l o n 0 ) c o s ( l a t 0 ) c o s ( l a t 0 ) c o s ( l o n 0 ) c o s ( l a t 0 ) s i n ( l o n 0 ) s i n ( l a t 0 ) ] ∗ [ X − X 0 Y − Y 0 Z − Z 0 ] (2) P_{enu}=R_{ECEF}^{ENU}(P_{ecef}-O_{ecef})= \begin{bmatrix} -sin(lon_0) & cos(lon_0) & 0 \\ -sin(lat_0)cos(lon_0) & -sin(lat_0)sin(lon_0) & cos(lat_0) \\ cos(lat_0)cos(lon_0) & cos(lat_0)sin(lon_0) & sin(lat_0) \end{bmatrix}* \begin{bmatrix} X-X_0 \\ Y-Y_0 \\ Z-Z_0 \end{bmatrix}\tag{2} Penu=RECEFENU(Pecef−Oecef)=⎣⎡−sin(lon0)−sin(lat0)cos(lon0)cos(lat0)cos(lon0)cos(lon0)−sin(lat0)sin(lon0)cos(lat0)sin(lon0)0cos(lat0)sin(lat0)⎦⎤∗⎣⎡X−X0Y−Y0Z−Z0⎦⎤(2)
至此完成了LLA坐标到ENU坐标的转换,且无近似,下面对公式(2)进行近似推导
由于
X = ( N + a l t ) c o s ( l a t ) c o s ( l o n ) X=(N+alt)cos(lat)cos(lon) X=(N+alt)cos(lat)cos(lon)
Y = ( N + a l t ) c o s ( l a t ) s i n ( l o n ) Y=(N+alt)cos(lat)sin(lon) Y=(N+alt)cos(lat)sin(lon)
Z = ( N ( 1 − e 2 ) + a l t ) s i n ( l a t ) Z=(N(1-e^2)+alt)sin(lat) Z=(N(1−e2)+alt)sin(lat)
X 0 = ( N 0 + a l t 0 ) c o s ( l a t 0 ) c o s ( l o n 0 ) X_0=(N_0+alt_0)cos(lat_0)cos(lon_0) X0=(N0+alt0)cos(lat0)cos(lon0)
Y 0 = ( N 0 + a l t 0 ) c o s ( l a t 0 ) s i n ( l o n 0 ) Y_0=(N_0+alt_0)cos(lat_0)sin(lon_0) Y0=(N0+alt0)cos(lat0)sin(lon0)
Z 0 = ( N 0 ( 1 − e 2 ) + a l t 0 ) s i n ( l a t 0 ) Z_0=(N_0(1-e^2)+alt_0)sin(lat_0) Z0=(N0(1−e2)+alt0)sin(lat0)
所以
X − X 0 = ( N + a l t ) c o s ( l a t ) c o s ( l o n ) − ( N 0 + a l t 0 ) c o s ( l a t 0 ) c o s ( l o n 0 ) = ( N + a l t ) c o s ( l a t ) c o s ( l o n ) − ( N + a l t 0 ) c o s ( l a t 0 ) c o s ( l o n 0 ) = ( N + a l t 0 + δ a l t ) c o s ( l a t 0 + δ l a t ) c o s ( l o n 0 + δ l o n ) − ( N + a l t 0 ) c o s ( l a t 0 ) c o s ( l o n 0 ) = ( N + a l t 0 ) c o s ( l a t 0 + δ l a t ) c o s ( l o n 0 + δ l o n ) − ( N + a l t 0 ) c o s ( l a t 0 ) c o s ( l o n 0 ) + δ a l t c o s ( l a t 0 + δ l a t ) c o s ( l o n 0 + δ l o n ) = ( N + a l t 0 ) [ c o s ( l a t 0 + δ l a t ) c o s ( l o n 0 + δ l o n ) − c o s ( l a t 0 ) c o s ( l o n 0 ) ] + δ a l t c o s ( l a t 0 + δ l a t ) c o s ( l o n 0 + δ l o n ) = ( N + a l t 0 ) [ ( c o s ( l a t 0 ) c o s ( δ l a t ) − s i n ( l a t 0 ) s i n ( δ l a t ) ) ( c o s ( l o n 0 ) c o s ( δ l o n ) − s i n ( l o n 0 ) s i n ( δ l o n ) ) − c o s ( l a t 0 ) c o s ( l o n 0 ) ] + δ a l t c o s ( l a t 0 + δ l a t ) c o s ( l o n 0 + δ l o n ) = ( N + a l t 0 ) ( − c o s ( l a t 0 ) s i n ( l o n 0 ) c o s ( δ l a t ) s i n ( δ l o n ) − s i n ( l a t 0 ) c o s ( l o n 0 ) s i n ( δ l a t ) c o s ( δ l o n ) ) + δ a l t c o s ( l a t 0 + δ l a t ) c o s ( l o n 0 + δ l o n ) = ( N + a l t 0 ) ( − c o s ( l a t 0 ) s i n ( l o n 0 ) ∗ δ l o n − s i n ( l a t 0 ) c o s ( l o n 0 ) ∗ δ l a t ) + δ a l t c o s ( l a t 0 + δ l a t ) c o s ( l o n 0 + δ l o n ) = ( N + a l t 0 ) ( − c o s ( l a t 0 ) s i n ( l o n 0 ) ∗ δ l o n − s i n ( l a t 0 ) c o s ( l o n 0 ) ∗ δ l a t ) + δ a l t [ ( c o s ( l a t 0 ) − s i n ( l a t 0 ) ∗ δ l a t ) ( c o s ( l o n 0 ) − s i n ( l o n 0 ) ∗ δ l o n ) ] = ( N + a l t 0 ) ( − c o s ( l a t 0 ) s i n ( l o n 0 ) ∗ δ l o n − s i n ( l a t 0 ) c o s ( l o n 0 ) ∗ δ l a t ) + δ a l t [ c o s ( l a t 0 ) c o s ( l o n 0 ) − c o s ( l a t 0 ) s i n ( l o n 0 ) ∗ δ l o n − c o s ( l o n 0 ) s i n ( l a t 0 ) ∗ δ l a t ] = ( N + a l t 0 ) ( − c o s ( l a t 0 ) s i n ( l o n 0 ) ∗ δ l o n − s i n ( l a t 0 ) c o s ( l o n 0 ) ∗ δ l a t ) + δ a l t c o s ( l a t 0 ) c o s ( l o n 0 ) \begin{aligned} X-X_0 &= (N+alt)cos(lat)cos(lon)-(N_0+alt_0)cos(lat_0)cos(lon_0)\\ &= (N+alt)cos(lat)cos(lon)-(N+alt_0)cos(lat_0)cos(lon_0)\\ &= (N+alt_0+\delta{alt})cos(lat_0+\delta{lat})cos(lon_0+\delta{lon})-(N+alt_0)cos(lat_0)cos(lon_0)\\ &= (N+alt_0)cos(lat_0+\delta{lat})cos(lon_0+\delta{lon})-(N+alt_0)cos(lat_0)cos(lon_0)+\delta{alt}cos(lat_0+\delta{lat})cos(lon_0+\delta{lon})\\ &= (N+alt_0)\left[cos(lat_0+\delta{lat})cos(lon_0+\delta{lon})-cos(lat_0)cos(lon_0) \right]+\delta{alt}cos(lat_0+\delta{lat})cos(lon_0+\delta{lon})\\ &= (N+alt_0)\left[(cos(lat_0)cos(\delta{lat})-sin(lat_0)sin(\delta{lat}))(cos(lon_0)cos(\delta{lon})-sin(lon_0)sin(\delta{lon}))-cos(lat_0)cos(lon_0) \right]+\delta{alt}cos(lat_0+\delta{lat})cos(lon_0+\delta{lon})\\ &= (N+alt_0)(-cos(lat_0)sin(lon_0)cos(\delta{lat})sin(\delta{lon})-sin(lat_0)cos(lon_0)sin(\delta{lat})cos(\delta{lon}))+\delta{alt}cos(lat_0+\delta{lat})cos(lon_0+\delta{lon})\\ &= (N+alt_0)(-cos(lat_0)sin(lon_0)*\delta{lon}-sin(lat_0)cos(lon_0)*\delta{lat})+\delta{alt}cos(lat_0+\delta{lat})cos(lon_0+\delta{lon})\\ &= (N+alt_0)(-cos(lat_0)sin(lon_0)*\delta{lon}-sin(lat_0)cos(lon_0)*\delta{lat})+\delta{alt}\left[(cos(lat_0)-sin(lat_0)*\delta{lat})(cos(lon_0)-sin(lon_0)*\delta{lon})\right]\\ &= (N+alt_0)(-cos(lat_0)sin(lon_0)*\delta{lon}-sin(lat_0)cos(lon_0)*\delta{lat})+\delta{alt}\left[cos(lat_0)cos(lon_0)-cos(lat_0)sin(lon_0)*\delta{lon}-cos(lon_0)sin(lat_0)*\delta{lat} \right]\\ &= (N+alt_0)(-cos(lat_0)sin(lon_0)*\delta{lon}-sin(lat_0)cos(lon_0)*\delta{lat})+\delta{alt}cos(lat_0)cos(lon_0) \end{aligned} X−X0=(N+alt)cos(lat)cos(lon)−(N0+alt0)cos(lat0)cos(lon0)=(N+alt)cos(lat)cos(lon)−(N+alt0)cos(lat0)cos(lon0)=(N+alt0+δalt)cos(lat0+δlat)cos(lon0+δlon)−(N+alt0)cos(lat0)cos(lon0)=(N+alt0)cos(lat0+δlat)cos(lon0+δlon)−(N+alt0)cos(lat0)cos(lon0)+δaltcos(lat0+δlat)cos(lon0+δlon)=(N+alt0)[cos(lat0+δlat)cos(lon0+δlon)−cos(lat0)cos(lon0)]+δaltcos(lat0+δlat)cos(lon0+δlon)=(N+alt0)[(cos(lat0)cos(δlat)−sin(lat0)sin(δlat))(cos(lon0)cos(δlon)−sin(lon0)sin(δlon))−cos(lat0)cos(lon0)]+δaltcos(lat0+δlat)cos(lon0+δlon)=(N+alt0)(−cos(lat0)sin(lon0)cos(δlat)sin(δlon)−sin(lat0)cos(lon0)sin(δlat)cos(δlon))+δaltcos(lat0+δlat)cos(lon0+δlon)=(N+alt0)(−cos(lat0)sin(lon0)∗δlon−sin(lat0)cos(lon0)∗δlat)+δaltcos(lat0+δlat)cos(lon0+δlon)=(N+alt0)(−cos(lat0)sin(lon0)∗δlon−sin(lat0)cos(lon0)∗δlat)+δalt[(cos(lat0)−sin(lat0)∗δlat)(cos(lon0)−sin(lon0)∗δlon)]=(N+alt0)(−cos(lat0)sin(lon0)∗δlon−sin(lat0)cos(lon0)∗δlat)+δalt[cos(lat0)cos(lon0)−cos(lat0)sin(lon0)∗δlon−cos(lon0)sin(lat0)∗δlat]=(N+alt0)(−cos(lat0)sin(lon0)∗δlon−sin(lat0)cos(lon0)∗δlat)+δaltcos(lat0)cos(lon0)
同理,有
Y − Y 0 = ( N + a l t 0 ) ( δ l o n c o s ( l a t 0 ) c o s ( l o n 0 ) − δ l a t s i n ( l a t 0 ) s i n ( l o n 0 ) ) + δ a l t c o s ( l a t 0 ) s i n ( l o n 0 ) Y-Y_0=(N+alt_0)(\delta{lon}cos(lat_0)cos(lon_0)-\delta{lat}sin(lat_0)sin(lon_0))+\delta{alt}cos(lat_0)sin(lon_0) Y−Y0=(N+alt0)(δloncos(lat0)cos(lon0)−δlatsin(lat0)sin(lon0))+δaltcos(lat0)sin(lon0)
将以上两式带入到(2)中可以得到点P在ENU系下的东向坐标:
e = − s i n ( l o n 0 ) ∗ ( X − X 0 ) + c o s ( l o n 0 ) ∗ ( Y − Y 0 ) = − s i n ( l o n 0 ) ( ( N + a l t 0 ) ( − c o s ( l a t 0 ) s i n ( l o n 0 ) ∗ δ l o n − s i n ( l a t 0 ) c o s ( l o n 0 ) ∗ δ l a t ) + δ a l t c o s ( l a t 0 ) c o s ( l o n 0 ) ) + c o s ( l o n 0 ) ( ( N + a l t 0 ) ( δ l o n c o s ( l a t 0 ) c o s ( l o n 0 ) − δ l a t s i n ( l a t 0 ) s i n ( l o n 0 ) ) + δ a l t c o s ( l a t 0 ) s i n ( l o n 0 ) ) = ( N + a l t 0 ) ( s i n ( l o n 0 ) c o s ( l a t 0 ) s i n ( l o n 0 ) ∗ δ l o n ) + ( N + a l t 0 ) ( c o s ( l a t 0 ) c o s 2 ( l o n 0 ) ∗ δ l o n ) = ( N + a l t 0 ) ∗ δ l o n c o s ( l a t 0 ) ( s i n 2 ( l o n 0 ) + c o s 2 ( l o n 0 ) ) = ( N + a l t 0 ) ∗ δ l o n c o s ( l a t 0 ) ≈ a ∗ δ l o n c o s ( l a t 0 ) \begin{aligned} e &= -sin(lon_0)*(X-X_0)+cos(lon_0)*(Y-Y_0)\\ &= -sin(lon_0)((N+alt_0)(-cos(lat_0)sin(lon_0)*\delta{lon}-sin(lat_0)cos(lon_0)*\delta{lat})+\delta{alt}cos(lat_0)cos(lon_0))+cos(lon_0)((N+alt_0)(\delta{lon}cos(lat_0)cos(lon_0)-\delta{lat}sin(lat_0)sin(lon_0))+\delta{alt}cos(lat_0)sin(lon_0))\\ &= (N+alt_0)(sin(lon_0)cos(lat_0)sin(lon_0)*\delta{lon})+(N+alt_0)(cos(lat_0)cos^2(lon_0)*\delta{lon})\\ &= (N+alt_0)*\delta{lon}cos(lat_0)(sin^2(lon_0)+cos^2(lon_0))\\ &= (N+alt_0)*\delta{lon}cos(lat_0)\\ &\approx a*\delta{lon}cos(lat_0) \end{aligned} e=−sin(lon0)∗(X−X0)+cos(lon0)∗(Y−Y0)=−sin(lon0)((N+alt0)(−cos(lat0)sin(lon0)∗δlon−sin(lat0)cos(lon0)∗δlat)+δaltcos(lat0)cos(lon0))+cos(lon0)((N+alt0)(δloncos(lat0)cos(lon0)−δlatsin(lat0)sin(lon0))+δaltcos(lat0)sin(lon0))=(N+alt0)(sin(lon0)cos(lat0)sin(lon0)∗δlon)+(N+alt0)(cos(lat0)cos2(lon0)∗δlon)=(N+alt0)∗δloncos(lat0)(sin2(lon0)+cos2(lon0))=(N+alt0)∗δloncos(lat0)≈a∗δloncos(lat0)
类似的,可以得到n、u坐标,最终得到如下的近似结果:
P e n u = [ e n u ] = [ a ∗ δ l o n c o s ( l a t 0 ) a ∗ δ l a t δ a l t ] P_{enu}= \begin{bmatrix} e\\n\\u \end{bmatrix}= \begin{bmatrix} a*\delta{lon}cos(lat_0)\\a*\delta{lat}\\\delta{alt} \end{bmatrix} Penu=⎣⎡enu⎦⎤=⎣⎡a∗δloncos(lat0)a∗δlatδalt⎦⎤ -
大地坐标系(WGS-84)、地心地固坐标系(ECEF)与东北天坐标系(ENU)的相互转换C语言代码分享
2020-12-19 12:53:41} //ECEF ---> ENU //pcc为ECEF坐标系结构体指针,center为东北天坐标原点的指针,pct为东北天坐标系结构体指针 //坐标原点center要用GPS采到的第一个点的数据 void ECEFToENU(PECEF pcc, PWGS center, PENU pct) {... -
北东地/东北天两种导航坐标系与姿态转换
2021-05-19 06:02:35导航坐标系常用的导航坐标系有北东地和东北天两种。两种坐标系的指向分别定义如下:1.1 北东地坐标系X轴:指北;Y轴:指东;Z轴:指地。1. 2 东北天坐标系X轴:指东;Y轴:指北;Z轴:指天。2. 载体坐标系与导航坐标系... -
Cesium:地心地固坐标(ECEF)转东北天坐标(ENU)
2022-03-05 10:17:09Cesium中地心地固坐标(ECEF)转东北天坐标(ENU) Cesium 中常用的坐标是以椭球中心为原点的地心地固坐标系,在地学问题中,我们常常使用的坐标系为三个坐标轴分别指向东方、北方、地表垂直向上方向的东北天坐标系... -
经纬高坐标系转到东北天坐标系
2020-10-22 12:14:58经纬高坐标系转到东北天坐标系 基本思路:首先把经纬高(大地坐标系、lla、llh)转到直角坐标系(地心地固直角坐标系(ECEF)、xyz),然后再转为局部坐标系下(东北天坐标系、以第一点作为东北天坐标系的原点) 比较... -
东北天坐标系(ENU);地心地固坐标系(ECEF);大地坐标系(Geodetic);经纬度对应圆弧距离
2020-10-28 16:20:18文章目录 旋转矩阵 三角恒等式 Trigonometric identities 二维旋转矩阵 三维旋转矩阵 Euler Rotations matlab 微分旋转矩阵 “偏航-俯仰-滚转”(yaw-pitch-roll) 东北天、站心坐标系 Matlab Geodetic and ECEF ... -
飞控东北天下的欧拉角旋转矩阵四元数和加速度计磁力计之间的关系
2020-12-17 16:42:11文档描述了,在东北天下的欧拉角,旋转矩阵,四元数,之间的转换关系,以及加速度计,磁力计的转换关系,有助于姿态解算时的推导。 -
GNSS学习笔记-坐标转换
2021-01-14 10:59:27站心坐标系以用户所在位置P为坐标原点,三个轴分别指向东向,北向和天向,也叫东北天坐标系(enu坐标系)。站心坐标系的天向方向和地理坐标系的高度方向是一致的。站心坐标系用在惯性导航和卫星俯仰角计算中较多。 ... -
固定模糊度的精密单点定位几何定轨方法及结果分析 (2013年)
2021-05-09 10:37:47传统的基于PPP(precise point positioning)模式的定轨方法采用浮点解,导致其定轨精度及可靠性较双差固定解稍差。...实验结果表明:与GFZ提供的事后精密轨道相比,GRACE-A卫星单天轨道固定解的精度为R方向2~3 cm -
经纬高(LBH)坐标与北天东坐标转换程序
2021-01-28 18:04:57经纬高(LBH)坐标与北天东坐标转换程序,仅用于学习交流,请勿用于商业用途和其他用途。如需用于非学习交流用途,请先私信联系我。 -
一文搞定经纬度与高斯坐标相互转换,经纬度转ECEF坐标,ECEF转东北高,经纬高与东北高相互转换c++算法
2019-07-09 10:31:04最后可以做下经纬度与高斯坐标之间变化的测试 ---------------------------------------------------------------------------------------------------------------------------- 更新 经纬高与东北天的相互转换 #... -
经纬度坐标系转换
2020-12-19 12:54:15各种坐标体系之间如何转换?到底有哪些坐标体系?什么是火星坐标?为什么我的坐标,在地图上显示会有偏移?本工具可以转换国测局坐标(火星坐标,比如高德地图在用),百度坐标,wgs84坐标(谷歌国外以及绝大部分国外在线... -
20210105-东北证券-速冻品行业深度报告:“速”食主义,别有“冻”天.pdf
2021-04-08 17:25:2820210105-东北证券-速冻品行业深度报告:“速”食主义,别有“冻”天.pdf -
python读取组合惯导数据,并进行坐标转换到北东天、utm坐标系
2021-11-17 16:31:34本文主要实现的是利用python的serial库,通过串口读取组合惯导的相关数据并解析,然后将经纬度高程坐标转换为当地的北东天坐标系和utm坐标系。 组合惯导简介 组合惯导融合了卫星定位系统和基于陀螺仪的定位定向... -
地心直角坐标系与大地坐标系之间的转换
2019-01-08 15:26:44matlab编写的两个代码,是两个坐标系之间的相互转换,是自己写的,和网上其他代码相比更为精简,容易理解 -
自动驾驶中使用到的坐标转换
2022-02-07 15:34:33一、简介 ...1.3 东北天坐标系(ENU) 二、坐标系间的转换 2.1 LLA坐标系转ECEF坐标系 2.2 ECEF坐标系转LLA坐标系 2.3 ECEF坐标系转ENU坐标系 2.4 ENU坐标系转ECEF坐标系 2.5 LLA坐标系直接转ENU坐标系 -
常用坐标系转换实现
2020-12-04 17:09:16地心坐标系转东北天坐标系 这里涉及到原点的设置,orgxyz参数表示的是将orgxyz这个地心坐标作为东北天坐标系的原点位置 function enu = xyz2enu(xyz,orgxyz) %XYZ2ENU Convert from WGS-84 ECEF cartesian ... -
1.1 坐标系转换关系
2021-08-05 09:41:531 东北天坐标系(ENU) 东北天坐标系是以观测站(传感器)为中心,x轴指向当地的东方向,y轴指向当地的地理北,z轴竖直向上(椭球法向)建立的笛卡尔坐标系,是一种局部坐标系。 ENU转换到ECEF的公式: 推导过程:... -
XYZ与BLH的转换.rar
2019-06-28 15:22:31此程序采用C#编写,功能为XYZ和BLH的相互转换,可执行文件在bin目录下,可直接使用 -
飞控算法-姿态解算之互补滤波
2020-04-03 16:24:09这里采用东北天坐标系下的Z-X-Y旋转 接着上四元数下的旋转矩阵: 罗德里格旋转 接着根据矩阵相等,就可以反解出欧拉角 送上代码: /* * 四元数转欧拉角 * * * */ Vector3f quaternion_2_euler_angle(float q0, ...