From d8b4e446c1b9d18fdc82ee0a8b7ed0f767c5d29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Roth?= Date: Fri, 12 Jul 2019 15:20:29 +0200 Subject: [PATCH] Update libgps.lua fix narrow function in libgps by correcting the attribute names from vPosition and nDistance to position and distance --- gps/libgps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gps/libgps.lua b/gps/libgps.lua index 66cab5f..3106fcf 100644 --- a/gps/libgps.lua +++ b/gps/libgps.lua @@ -47,8 +47,8 @@ local function trilaterate( A, B, C ) end local function narrow( p1, p2, fix ) - local dist1 = math.abs( (p1 - fix.vPosition):length() - fix.nDistance ) - local dist2 = math.abs( (p2 - fix.vPosition):length() - fix.nDistance ) + local dist1 = math.abs( (p1 - fix.position):length() - fix.distance ) + local dist2 = math.abs( (p2 - fix.position):length() - fix.distance ) if math.abs(dist1 - dist2) < 0.01 then return p1, p2