GDOP计算方法(几何精度因子)
假设一共有 个基站,定义 为每使用k个基站解算出的标签的位置, 表示第k个基站的坐标, 表示标签到第K个基站的测量距离。
GDOP 通过下式得出:
是距离测量值相对于位置量的偏导数构成的矩阵(Jacobian)
代码如下:
def get_toa_gdop(bs_list, xyz):
"""
compute the gdop of the toa
:param bs_list: the base station coordinate
:param xyz: the location coordinate of the tag
:return: the gdop value
"""
bs_n = len(bs_list)
if bs_n < 3:
return None
h1 = np.mat(np.zeros((bs_n, 3)))
for i in range(0, len(bs_list)):
ri = np.sqrt((bs_list[i][0] - xyz[0]) ** 2 +
(bs_list[i][1] - xyz[1]) ** 2)
if ri == 0:
h1[i, 0] = 0
h1[i, 1] = 0
h1[i, 2] = 1
else:
h1[i, 0] = (bs_list[i][0] - xyz[0]) / ri
h1[i, 1] = (bs_list[i][1] - xyz[1]) / ri
h1[i, 2] = 1
m_tmp = h1.T * h1
gdop_value = None
try:
g = m_tmp.I
gdop_value = np.sqrt(g[0, 0] + g[1, 1])
finally:
return gdop_value
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架