GPS坐标WGS84到东北天坐标系ENU

  • 简述
    • 一、从WGS-84坐标系到ECEF坐标系
      • 1.先将经纬度坐标转为弧度坐标
      • 2.转ECEF坐标
    • 二、 通过ECEF转换到参考点附近的ENU坐标系上
      • 1.在参考点P2=[lat,lon,height]P_2=[lat,lon,height]P2​=[lat,lon,height]附近的旋转矩阵RRR
      • 2.旋转到ENU上得到坐标N=[E,N,U]N=[E ,N ,U]N=[E,N,U]

简述

由于东北天坐标系是站心系,随着坐标原点,相对坐标在变化,因此需要确定站心的参考坐标值,即想要转换WGS-84坐标系P1P_1P1​到东北天坐标系时,需要给出东北天坐标系坐标原点所在的位置的WGS-84坐标值P2P_2P2​.
基本思路是首先将2个WGS84坐标系转换到地心地固坐标系ECEF中,计算两个参考坐标之间的差,而后在指定的参考点附近进行展开。

一、从WGS-84坐标系到ECEF坐标系

1.先将经纬度坐标转为弧度坐标

2.转ECEF坐标

WGS坐标为P=[lat,lon,height]P=[lat,lon,height]P=[lat,lon,height],ECEF坐标为E=[x,y,z]E=[x,y,z]E=[x,y,z]

x=a∗cos(lon)1+(1−e2)∗(tan(lat))2+height∗cos(lon)∗cos(lat)x=\frac{a*cos(lon)}{\sqrt{1+(1-e^2)*(tan(lat))^2}} +height*cos(lon)*cos(lat) x=1+(1−e2)∗(tan(lat))2​a∗cos(lon)​+height∗cos(lon)∗cos(lat)
y=a∗sin(lon)1+(1−e2)∗(tan(lat))2+height∗sin(lon)∗sin(lat)y=\frac{a*sin(lon)}{\sqrt{1+(1-e^2)*(tan(lat))^2}} +height*sin(lon)*sin(lat) y=1+(1−e2)∗(tan(lat))2​a∗sin(lon)​+height∗sin(lon)∗sin(lat)
z=a∗(1−e2)∗sin(lat)1−e2∗(sin(lat))2+height∗sin(lat)z=\frac{a*(1-e^2)*sin(lat)}{\sqrt{1-e^2*(sin(lat))^2}} +height*sin(lat) z=1−e2∗(sin(lat))2​a∗(1−e2)∗sin(lat)​+height∗sin(lat)

经过此步骤后获得地心地固坐标系下的坐标E1,E2E_1,E_2E1​,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/PIreturn result#  WGS84坐标系转换至ECEF坐标系,输入经纬高,输出ECEF坐标x,y,zdef 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 * etmpden = np.sqrt(1 + tmp * t2lat)tmp2 = np.sqrt(1 - e * e*slat*slat)x = (a*clon) / tmpden + height * clon*claty = (a*slon) / tmpden + height * slon*slatz = (a*tmp*slat) / tmp2 + height * slatreturn [x,y,z]

二、 通过ECEF转换到参考点附近的ENU坐标系上

使用ECEF坐标系下求解三维度距离,并在参考点附近进行转换

1.在参考点P2=[lat,lon,height]P_2=[lat,lon,height]P2​=[lat,lon,height]附近的旋转矩阵RRR

R=[−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)]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=[ENU]=R∗Δx=R∗[x1−x2y1−y2z1−z2]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​−x2​y1​−y2​z1​−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

GPS坐标WGS84到东北天坐标系ENU相关推荐

  1. GPS经纬度坐标WGS84到东北天坐标系ENU的转换

    GPS经纬度坐标WGS84到东北天坐标系ENU的转换 常用坐标系介绍 地理坐标系 (Geographic Coordinate System, GCS) 地心地固坐标系 (ECEF) 当地东.北.上 ...

  2. 经纬度坐标系转东北天_大地坐标系(WGS-84)、地心地固坐标系(ECEF)与东北天坐标系(ENU)的相互转换C语言代码分享...

    //ECEF ---> WGS84 //pcg为WGS-84坐标系结构体指针,pcc为ECEF坐标系结构体指针 void ECEFToWGS(PWGS pcg, PECEF pcc) { dou ...

  3. 三维旋转矩阵;东北天坐标系(ENU);地心地固坐标系(ECEF);大地坐标系(Geodetic);经纬度对应圆弧距离

    关注即可了解更多相关知识. 欢迎转发.收藏.友善交流. 文章目录 旋转矩阵 三角恒等式 Trigonometric identities 二维旋转矩阵 三维旋转矩阵 Euler Rotations m ...

  4. 东北天坐标系转载体坐标系

    文章目录 1. 基本概念 1.1欧拉角 1.2左乘右乘 1.3东北天坐标系 1.4载体坐标系 1.5捷联惯性导航系统 2. 通过ECEF转换到参考点附近的ENU坐标系上 3. 东北天坐标系到载体坐标系 ...

  5. 四旋翼利用mavros进行GPS坐标指点飞行

    先介绍一般px4飞控的xyz坐标指点飞行: 利用mavros的 /mavros/setpoint_raw/local 话题可以发送东北天(ENU)坐标给px4飞控进行指点飞行.ENU坐标原点在起飞点, ...

  6. GPS坐标系转换(标准坐标系WGS84转GCJ-02火星坐标系)

    GPS坐标系转换(标准坐标系WGS84转GCJ-02火星坐标系) 坐标系简介 WGS-84 标准坐标系 GCJ-02 - 国测局坐标 BD-09 - 百度坐标系 干货前的说明 WGS84转GCJ-02 ...

  7. 坐标计算距离公式 火星坐标系_根据经纬度计算距离的公式、百度坐标转换成GPS坐标(PHP版)...

    //百度坐标转换成GPS坐标 $lnglat = '121.437518,31.224665'; function FromBaiduToGpsXY($lnglat){ // 经度,纬度 $lngla ...

  8. WGS84(GPS坐标) BD09坐标(百度坐标)GCJ02(国测局坐标) 的相互转换

    关于三种坐标系的介绍 WGS84:一种大地坐标系,也是目前广泛使用的GPS全球卫星定位系统使用的坐标系. GCJ02:由中国国家测绘局制订的地理信息系统的坐标系统,是由WGS84坐标系经过加密后的坐标 ...

  9. GPS坐标互转:WGS-84(GPS)、GCJ-02(Google地图)、BD-09(百度地图)

    GPS坐标互转:WGS-84(GPS).GCJ-02(Google地图).BD-09(百度地图) WGS-84:是国际标准,GPS坐标(Google Earth使用.或者GPS模块) GCJ-02:中 ...

最新文章

  1. nodejs 打印返回的json
  2. windows下 VScode+CMake+Linux远程调试
  3. Processing 字体变形
  4. 【细节拉满】Hadoop课程设计项目,使用idea编写基于MapReduce的学生成绩分析系统(附带源码、项目文件下载地址)
  5. 电脑硬盘数据线_这40种电脑故障的排除技巧你都掌握了吗?
  6. vmware 虚拟机三种网络模式: 桥接、 NAT、 仅主机 区别
  7. 洛谷——P1507 NASA的食物计划
  8. Python中Selenium设置无界面访问
  9. 基础级拆机-神舟战神GX8CP5s1上8700发现较为鸡肋-仿CP7s2
  10. epc项目设计流程图_EPC工程总承包管理流程图解。
  11. PTGUI 全景图批量拼接
  12. HTTP协议概述 基本概念说明
  13. torch.max使用示例
  14. 交换机软件测试,交换机性能测试方法
  15. Unity 入门教程:贪吃射(1) —— Unity 安装和项目创建
  16. 免费的可直接运行的简单易懂的C++学生信息管理系统
  17. 脚本引流的震撼效果是真的么?脚本引流的话术真的重要?
  18. Linux系列教程虚拟机安装虚拟化开启
  19. Linux命令学习笔记(一)目录操作
  20. html里用js实现随机抽奖,js实现简单随机抽奖的方法

热门文章

  1. 程序化生成雪花、滑雪运动数字盲盒
  2. python2的print和python3的print()
  3. gm怎么刷东西 rust_决战常用GM刷物品命令
  4. dancing links x(舞蹈链算法)详解
  5. P1022 计算器的改良(落谷)
  6. 硬件基础知识---电阻的用法
  7. sublime3如何配置SublimeCodeIntel
  8. Java语法——String
  9. 深入Android 【二】 —— 架构和学习
  10. davinci-0.3.0安装部署