How do horizontal and vertical errors become planar distances?
hypot computes the hypotenuse element by element, turning two orthogonal components into Euclidean lengths.
numpy.hypot in practice
Offsets (3,4) and (5,12) meters have lengths five and thirteen meters. Latitude and longitude in degrees require an appropriate geographic distance model first.
import numpy as np
np.hypot([3,5],[4,12])Result [5.0, 13.0]
中文
怎样把每个目标的横纵误差换成平面距离?
hypot 对应直角三角形斜边,逐项计算两个分量的欧氏长度。
numpy.hypot 算例
两次定位偏差分别为 (3,4) 和 (5,12) 米,总误差为 5 和 13 米。经纬度以角度计量,须先选合适的距离模型。
import numpy as np
np.hypot([3,5],[4,12])结果 [5.0, 13.0]