东北天(ENU)转经纬高(LLA)

经纬高分别为lon ,lat, alt  度数为弧度

东北天xyz为enupoint.x,enupoint.y,enupoint.z

地心地固直角坐标系(ECEF)xyz为ecefpoint.x,ecefpoint.y,ecefpoint.z

1、东北天(ENU)转地心地固直角坐标系(ECEF)

double cosLat,sinLat,cosLon,sinLon;    

cosLat = cos(lat);

sinLat = sin(lat);
cosLon = cos(lon);
sinLon = sin(lon);
ecefpoint.x=-sinLon*enupoint.x-sinLat*cosLon*enupoint.y+cosLat*cosLon*enupoint.z;
 ecefpoint.y=cosLon*enupoint.x-sinLat*sinLon*enupoint.y+cosLat*sinLon*enupoint.z;
  ecefpoint.z=cosLat*enupoint.y+sinLat*enupoint.z;

2、地心地固直角坐标系(ECEF)转经纬高(LLA)

double WGS84_A = 6378137.0;      // major axis
    double WGS84_E = 0.081819190842622;   // first eccentricity

    double b = sqrt(WGS84_A * WGS84_A * (1 - WGS84_E * WGS84_E));
    double ep = sqrt((WGS84_A * WGS84_A - b * b) / (b * b));
    double p = hypot(coord.x, coord.y);
    double th = atan2(WGS84_A * coord.z, b * p);
    double lon = atan2(coord.y, coord.x);
    double lat = atan2((coord.z + ep * ep * b * pow(sin(th), 3)), (p - WGS84_E * WGS84_E * WGS84_A * pow(cos(th), 3)));
    double N = WGS84_A / sqrt(1 - WGS84_E * WGS84_E * sin(lat) * sin(lat));
    double alt = p / cos(lat) - N;
    latitude=lat*180/PI;
    longitude=lon*180/PI;
    height=alt;

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用和引用的内容,可以得出ENU坐标系LLA坐标系的算法如下: 1. 将ENU坐标系换为地心地固坐标系(ECEF)。 2. 根据ECEF坐标系计算经纬度和度。 3. 将经纬换为LLA坐标系。 具体的换公式如下: 1. ENU坐标系ECEF坐标系: $$ \begin{bmatrix} x\\ y\\ z \end{bmatrix}_{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} e\\ n\\ u \end{bmatrix} + \begin{bmatrix} x_0\\ y_0\\ z_0 \end{bmatrix}_{ECEF} $$ 其中,$lon_0$和$lat_0$分别为$P_0$的经度和纬度,$x_0$、$y_0$、$z_0$分别为$P_0$的ECEF坐标。 2. ECEF坐标系经纬度和度: $$ \begin{aligned} &\text{计算参数:}\\ &a&\text{——}&\text{地球长半轴(单位:m)}\\ &b&\text{——}&\text{地球短半轴(单位:m)}\\ &e&\text{——}&\text{第一偏心率}\\ &e'&\text{——}&\text{第二偏心率}\\ &\rho&\text{——}&\text{子午圈半径}\\ &N&\text{——}&\text{卯酉圈半径}\\ &h&\text{——}&\text{度(单位:m)}\\ &\phi&\text{——}&\text{纬度(单位:弧度)}\\ &\lambda&\text{——}&\text{经度(单位:弧度)}\\ &\text{计算公式:}\\ &e^2&=&1-\frac{b^2}{a^2}\\ &e'^2&=&\frac{a^2}{b^2}-1\\ \rho&=&\sqrt{x^2+y^2}\\ \phi&=&\arctan\frac{z}{\rho\cdot(1-e^2)}\\ N&=&\frac{a}{\sqrt{1-e^2\cdot\sin^2\phi}}\\ h&=&\rho\cdot\cos\phi+N\cdot(1-e^2)\\ \lambda&=&\arctan\frac{y}{x} \end{aligned} $$ 其中,$x$、$y$、$z$分别为ECEF坐标系下的坐标。 3. 经纬LLA坐标系: $$ \begin{bmatrix} lat\\ lon\\ alt \end{bmatrix}_{LLA}= \begin{bmatrix} \phi\\ \lambda\\ h \end{bmatrix} $$
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值