mirror of https://github.com/kepler155c/opus
gps.lua: Added nil and nan checks
This commit is contained in:
parent
9e3cf50ccc
commit
cc80e08407
|
@ -98,7 +98,7 @@ function GPS.trilaterate(tFixes)
|
|||
if pos2 then
|
||||
pos1, pos2 = narrow(pos1, pos2, tFixes[1])
|
||||
end
|
||||
if not pos2 then
|
||||
if not pos2 and pos1 and not (pos1.x ~= pos1.x) then
|
||||
return pos1, attemps
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue