mirror of
https://github.com/osmarks/random-stuff
synced 2026-07-03 18:12:44 +00:00
Fix GPS trilaterator
This commit is contained in:
@@ -138,7 +138,7 @@ while true do
|
||||
local p1, p2 = trilaterate(fixes[1], fixes[2], fixes[3])
|
||||
if p1 and p2 then
|
||||
local pos = narrow(p1, p2, fixes[4])
|
||||
if channel == gps.CHANNEL_GPS then
|
||||
if channel == gps.CHANNEL_GPS and message == "LOCATE" then
|
||||
write_to("gps", timestamp(), ("%d: %.0f %.0f %.0f"):format(reply_channel, pos.x, pos.y, pos.z))
|
||||
elseif channel == 999 then
|
||||
local status, label = "?", "?"
|
||||
@@ -151,4 +151,5 @@ while true do
|
||||
fixes = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user