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

GPS Go to x y z

Started by DisableMe, 05 September 2012 - 01:40 AM
DisableMe #1
Posted 05 September 2012 - 03:40 AM
hello everyone, I only made an account just to clarify this problem, I wouldn't even call it a problem, more of a learning experience.
So I want a turtle (I guess more suitably a mining turtle) to move to an x y z coordinate I give it using the new GPS system.
Now I already know that I need to calculate the difference between the current coordinates of the turtle, but how do I manipulate those mathematically to accommodate the new coordinates?
Any help is appreciated as I am only trying to learn.
Luanub #2
Posted 05 September 2012 - 04:29 AM
What I did was set the position I wanted to go to and then did some quick math to figure out the distance in each direction I needed to go to reach that position.

You will have to create custom turtle movement functions that you can use to keep track of your movements.

You will probably also want to setup a var and add it to your turtle turn function and use it to keep track of the direction that the turtle is facing.

There are some scripts in the turtle program section that have GPS functions. I would recommend taking a look at those.
DisableMe #3
Posted 05 September 2012 - 04:47 AM
alright thank you for the information. Any other suggestions or should I just dive in to testing?
Luanub #4
Posted 05 September 2012 - 08:09 AM
I personally would dive into it. If you have any questions let me know.