This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Kenzo's profile picture

Anway to make GPS faster?

Started by Kenzo, 28 March 2016 - 07:04 PM
Kenzo #1
Posted 28 March 2016 - 09:04 PM
like the title says, is there anyway to make the gps faster to respond? because it has a delay.
SquidDev #2
Posted 28 March 2016 - 09:35 PM
The gps.locate method takes a timeout parameter:


local x, y, z = gps.locate(1) -- 1 second instead

Be warned: If you make it too small not all modems may respond in time
Anavrins #3
Posted 28 March 2016 - 10:08 PM
gps.locate should even return earlier than your set timeout if it receives at least 3 replies.
If you experience any noticeable delay, it may mean you set up your gps array incorrectly.
Edited on 28 March 2016 - 08:09 PM
Kenzo #4
Posted 29 March 2016 - 08:59 PM
thanks <3