更新时间:2023-02-09 19:51:41
您可以计算East-North-Up矢量(x,y,z)
和之间的方位角和仰角(u,v,w)
使用以下内容:
You can calculate the azimuth and elevation angles between East-North-Up vectors (x,y,z)
and (u,v,w)
using the following:
(x,y,z)-(u,v,w)=(xu,yv,zw)=(x',y',z')
a = arctan(x'/y')= arctan((x-u)/(y-v))
e = arctan(z'/y')= arctan((z-w)/(y-v))
在Python中:
v1 = np.array([3,4,4])
v2 = np.array([1,2,6])
v = v1 - v2
a = np.degrees(np.arctan(v[0]/v[1]))
e = np.degrees(np.arctan(v[2]/v[1]))
print('azimuth = '+str(a)+', elevation = '+str(e))
输出:
azimuth = 45.0, elevation = -45.0