日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

GNSS学习笔记-坐标转换

發布時間:2024/8/26 综合教程 40 生活家
生活随笔 收集整理的這篇文章主要介紹了 GNSS学习笔记-坐标转换 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

GNSS 坐標轉換

GNSS計算主要涉及三個坐標系,地心地固坐標系地理坐標系站心坐標系。這里主要介紹一下三個坐標的含義和轉換公式。

地心地固坐標系如圖X,Y,Z表示 (ECEF坐標系),以地心O為坐標原點,Z軸指向協議地球北極,X軸指向參考子午面與地球赤道的交點,也叫地球坐標系。一般GNSS坐標計算都在地心地固坐標系下進行的。由于地球是橢圓形,有WGS-84和CGC2000等多種標準

地理坐標系則通過經度(longitude),緯度(latitude)和高度(altitude)來表示地球的位置,也叫經緯高坐標系(LLA坐標系)。

站心坐標系以用戶所在位置P為坐標原點,三個軸分別指向東向,北向和天向,也叫東北天坐標系(enu坐標系)。站心坐標系的天向方向和地理坐標系的高度方向是一致的。站心坐標系用在慣性導航和衛星俯仰角計算中較多。

參數 WGS-84 CGC200
基準橢球體的長半徑a 6378137.0 m 6378137.0 m
基準橢球體的極扁率f 1/298.257223565 1/298.257223563
地球自轉角速度We 7.2921151467*1e-5 7.2921151467*1e-5
地球引力和地球質量的乘積GM 3986004.418*1e8 3986004.418*1e8
光速 2.99792458*1e8 m/s 2.99792458*1e8 m/s


LLA坐標系轉ECEF坐標系

LLA坐標系下的(lon,lat,alt)轉換為ECEF坐標系下點(X,Y,Z)

[egin{cases}
X=(N+alt)cos(lat)cos(lon)\
Y=(N+alt)cos(lat)sin(lon)\
Z=(N(1-e^2)+alt)sin(lat)
end{cases}]

其中e為橢球偏心率,N為基準橢球體的曲率半徑

[egin{cases}
e^2=frac{a^2-b^2}{a^2}\
N=frac{a}{sqrt{1-e^2sin^2lat}}
end{cases}]

由于WGS-84下極扁率(f=frac{a-b}{a}),偏心率e和極扁率f之間的關系:

[e^2=f(2-f)
]

坐標轉換公式也可以為

[egin{cases}
X=(N+alt)cos(lat)cos(lon)\
Y=(N+alt)cos(lat)sin(lon)\
Z=(N(1-f)^2+alt)sin(lat)
end{cases}]

[N=frac{a}{sqrt{1-f(2-f)sin^2lat}}
]

python實現

def lla2ecef(lat,lon,alt):
    WGS84_A = 6378137.0
    WGS84_f = 1/298.257223565
    WGS84_E2 = WGS84_f*(2-WGS84_f)
    deg2rad = math.pi/180.0
    rad2deg = 180.0/math.pi
    lat *= deg2rad
    lon *= deg2rad
    N = WGS84_A/(math.sqrt(1-WGS84_E2*math.sin(lat)*math.sin(lat)))
    x = (N+alt)*math.cos(lat)*math.cos(lon)
    y = (N+alt)*math.cos(lat)*math.sin(lon)
    z = (N*(1-WGS84_f)*(1-WGS84_f)+alt)*math.sin(lat)
    return [x,y,z]

ECEF坐標系轉LLA坐標系

ECEF坐標系下點(X,Y,Z)轉換為LLA坐標系下的(lon,lat,alt)

[lon=arctan(frac{y}{x})
]

[alt=frac{p}{cos(lat)-N}
]

[lat=arctanigg[frac{z}{p}igg(1-e^2frac{N}{N+alt}igg)^{-1}igg]
]

[p=sqrt{x^2+y^2}
]

一開始lon是未知的,可以假設為0,經過幾次迭代之后就能收斂

ECEF坐標系轉enu坐標系

用戶所在坐標點(P_0=(x_0,y_0,z_0)),,計算點(P=(x,y,z))在以點(P_{0})為坐標原點的enu坐標系位置((e,n,u))這里需要用到LLA坐標系的數據,(P_0)的LLA坐標點為(LLA_0=(lon_0,lat_0,alt_0))

[egin{gathered}
left[ egin{array}{ccc}
Delta{x}\Delta{y}\Delta{z}
end{array}
ight]=
left[ egin{array}{ccc}
x\y\zend{array}ight]-
left[ egin{array}{ccc}
x_0\y_0\z_0end{array}ight]
end{gathered}
]

[egin{gathered}
left[ egin{array}{ccc}
e\n\u
end{array}
ight]=Scdot
left[ egin{array}{ccc}
Delta{x}\Delta{y}\Delta{z}
end{array}
ight]
end{gathered}=
left[ egin{array}{ccc}
-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{array} ight]cdot
left[ egin{array}{ccc}
Delta{x}\Delta{y}\Delta{z}
end{array}
ight]
]

即坐標變換矩陣(S=left[ egin{array}{ccc}
-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{array} ight])

enu坐標系轉ECEF坐標系

(S)為單位正交矩陣

[mathbf{S}^{-1}=mathbf{S}^mathrm{T}
]

反之

[egin{gathered}
left[ egin{array}{ccc}
Delta{x}\Delta{y}\Delta{z}end{array}
ight]=S^{-1}cdotleft[ egin{array}{ccc}
e\n\uend{array} ight]=
mathbf{S}^mathrm{T}cdotleft[ egin{array}{ccc}
e\n\uend{array} ight]
end{gathered}
]

LLA坐標系轉enu坐標系

上述可以看到,從LLA坐標系轉換到enu坐標系有較多計算量,在考慮地球偏心率(e)很小的前提下,可以做一定的近似公式計算

[left[ egin{array}{ccc}
Delta e\ Delta n \ Delta u
end{array}
ight]=
left[egin{array}{ccc}
acdot cos(lat)cdot Delta lon & 0 & 0 \
0 & a cdot Delta lat & 0 \
0 & 0 & Delta alt
end{array}
ight]
]

總結

以上是生活随笔為你收集整理的GNSS学习笔记-坐标转换的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。