fix error in surface position with reference
This commit is contained in:
parent
220b8e9716
commit
b9c6db6f65
@ -427,9 +427,9 @@ def surface_position_with_ref(msg, lat_ref, lon_ref):
|
||||
ni = _cprNL(lat) - i
|
||||
|
||||
if ni > 0:
|
||||
d_lon = 360.0 / ni
|
||||
d_lon = 90.0 / ni
|
||||
else:
|
||||
d_lon = 360.0
|
||||
d_lon = 90.0
|
||||
|
||||
m = util.floor(lon_ref / d_lon) \
|
||||
+ util.floor(0.5 + ((lon_ref % d_lon) / d_lon) - cprlon)
|
||||
|
@ -32,9 +32,9 @@ def test_adsb_airborne_position_with_ref():
|
||||
|
||||
|
||||
def test_adsb_surface_position_with_ref():
|
||||
pos = adsb.surface_position_with_ref("8FC8200A3AB8F5F893096B22B4A8",
|
||||
pos = adsb.surface_position_with_ref("8FC8200A3AB8F5F893096B000000",
|
||||
-43.5, 172.5)
|
||||
assert pos == (-43.48564, 175.87195)
|
||||
assert pos == (-43.48564, 172.53942)
|
||||
|
||||
|
||||
def test_adsb_surface_position():
|
||||
|
Loading…
Reference in New Issue
Block a user