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

GPS with one turtle

Started by JD_minecraft, 23 July 2013 - 06:35 PM
JD_minecraft #1
Posted 23 July 2013 - 08:35 PM
I was thinking about how to minimize the cost for a GPS system, which made me curious about if it could be done with just one turtle.
The turtle would be all 4 satelites (or maybe there is a possible different algorithm than triangulation), so it would first go to the first position, then the second etc.
At every position it would "ping" after which the computer that you need to know the geoposition of will save the distances and calculate its position.
Is this possible or is there something I left out.

Thanks in advance,

JD_minecraft
Lyqyd #2
Posted 24 July 2013 - 01:44 AM
Split into new topic.

Yes, this is possible, but unwise. Chunk/server unloads and reloads could interrupt the computer mid-routine, in which case, its position would be off from its tracked coordinates, without a lot of careful effort to ensure accurate location tracking. It is far easier to simply have the turtle deploy four computers to serve as permanent GPS stations than to try to use a single-turtle solution.
JD_minecraft #3
Posted 24 July 2013 - 04:33 AM
If you want to overcome those chunk issues, you can simply read and write to a file right?
albrat #4
Posted 24 July 2013 - 07:16 AM
in theory yes. But in practice it could happen that your move completes, your save starts But. the save does not finish.

You made the move and the save says you did not. > error on location now.

or

You make the move, the save completes. the chunk unloads. But the move was still in the stack / incomplete (fully). the save says you made the move but the turtle reset back to it's old position…

or your save starts, the chunk unloads as saving. the file is corrupted and you lose the location data… >> this is highly un-likely but possible.
apemanzilla #5
Posted 24 July 2013 - 01:40 PM
This is possible but it would be slow and finicky, and unless the turtle moves far enough there could be ambiguous position errors.