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

[Question] Turtle and GPS Coordinates

Started by Bandus, 04 April 2012 - 02:55 AM
Bandus #1
Posted 04 April 2012 - 04:55 AM
The more I mess with this mod the more I find myself enjoying it, however I also run into these issues where I can't really conceptualize how to translate something I want to do into code.

Is there any easy way, via an API that is included or one that someone has made to instruct a turtle to go to a specific GPS coordinate, assuming it can communicate with enough GPS servers to know its own coordinates?

And if this is possible, I'd appreciate any suggestions (and short snippets of code examples if you're feeling generous) on how to start with something like this.

Thanks!
Luanub #2
Posted 04 April 2012 - 05:10 AM
It's not that hard, you just need a way for the turtle to know its current coordinate. Then from there make your own movement functions which will update the coordinates as you move. Then simply take starting coordinates and subtract them from the coordinate that you want to goto and then make the needed movements.

Take a look at Liraal's magicTurtle API, it should accomplish this and much more for you. It can be found here..