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

GPS Locate help

Started by YaYaBinks3, 27 July 2012 - 04:56 PM
YaYaBinks3 #1
Posted 27 July 2012 - 06:56 PM
Hi. I need help with gos locate.
I run this code:

shell.run("gps","locate")

But it gives me a load of clutter like computer 3 is at whatsoever.
I just want to find the x y z, how can I do this?
lieudusty #2
Posted 27 July 2012 - 07:29 PM
Hi. I need help with gos locate.
I run this code:

shell.run("gps","locate")

But it gives me a load of clutter like computer 3 is at whatsoever.
I just want to find the x y z, how can I do this?
First you need to set up GPS servers using gps host. After that you can use gps locate to find your location.
OmegaVest #3
Posted 27 July 2012 - 07:51 PM
Okay, so if you are trying to find the x, y, and z, you don't use the program gps, but rather the GPS API.

For the sake of simplicity, I will give you the code for this. However, you should go to the wiki and look it up yourself as well.


x, y, z = gps.locate(5)