Jump to content




GPS Deploy 1.1 **UPDATED** 04/01/2014


49 replies to this topic

#1 neonerz

  • Members
  • 4 posts

Posted 20 January 2013 - 10:39 AM

**UPDATED** 04/01/2014
- Made the computers fit inside one chunk (it's now 5x5 instead of 17x17)
- Works with No Fuel Mode servers (thanks happydude11209)
- Fixed bug in gps-deploy locate code (thanks kittykiller)
- Fixed bug where I call computers, monitors (thanks Mad_Professor)

If you label your computers and need support for that, check out KaosKlaus' edited version which includes support for labeled computers.

Here is a GPS Deployment script I made to add GPS hosts to your world. I'd love for comments, suggestions or bug reports.

This is the first application in a suite of GPS tools I have in the works.



Read script or watch video for detailed instructions.

Pastebin Install:

pastebin get qLthLak5 gps-deploy

TurtleScripts Market Install:

market get gjdh4o gps-deploy y
(I will try to keep the TurtleScripts Market copy always updated, but you could be 100% sure the pastebin version will always have the latest code)

When placing the turtle, it needs to be facing south(0). Please make sure the turtle has a clear view to the sky before deploying.

Turtle Slots:
  • Fuel
  • Minimum of 4 Computers
  • Minimum of 4 Modems
  • If Mining Turtle - Minimum of 1 Disk Drive | If Standard Turtle - Minimum of 4 Disk Drives
  • Disk

Usage:
gps-deploy <x> <y> <z> [height]
This command will deploy the GPS satellite at y=254 or y+[height] if [height] is specified. The x, and z coordinates need to be the absolute coordinates of the turtles starting place. A good way to get the coordinates is to place a turtle down, stand on it, and press F3. Since turtles are less than a block high, F3 will show you the Y coordinate of the turtle. The X, and Z are a bit trickier. While standing on the turtle you'll see a X coordinate of for example X = -6.412 (-7) then the X coordinate you'd enter into the script would be -7, not -6. This goes the same for the Z coordinate.

gps-deploy locate [height]
If you have a already working GPS system, you could use the locate command to automatically enter the x, y, z coordinates of the mining turtle. You could still specify a custom height if you don't want the satellite to be deployed at y=254</z></y></x>

Edited by neonerz, 14 April 2014 - 10:25 PM.


#2 BigSHinyToys

  • Members
  • 1,001 posts

Posted 20 January 2013 - 02:39 PM

well explained program good work added to GPS tutorial page.

#3 xInDiGo

  • Members
  • 105 posts

Posted 22 January 2013 - 08:39 PM

hey this worked great! now my turtles can get its coordinates! also, how about maybe setting up a relay computer while its up there for some long range rednet!

but what are some handy things i can do with a turtles gps coordinates?

#4 Rubbed

  • Members
  • 8 posts
  • LocationIowa

Posted 24 January 2013 - 01:12 PM

Here is the pastebin links if you want to save 60 seconds of your lives, I don't know why the poster didn't use pastebin, but idk what was going on in his head.
Turtlesender: RhWcgaNi
TurtleWG: Gs1KAhc1
There you go. :)

View PostRubbed, on 24 January 2013 - 01:11 PM, said:

Here is the pastebin links if you want to save 60 seconds of your lives, I don't know why the poster didn't use pastebin, but idk what was going on in his head. Turtlesender: RhWcgaNi TurtleWG: Gs1KAhc1 There you go. :)/>
LOL WRONG TAB!

Nvm wrong tab, Wrong person, wrong everything. disregard this comment.

#5 Rubbed

  • Members
  • 8 posts
  • LocationIowa

Posted 24 January 2013 - 08:06 PM

You should make it so it doesn't crash when attempting to run the program when turtles don't need fuel.

#6 kittykiller

  • Members
  • 2 posts

Posted 25 January 2013 - 01:08 PM

line 97 should be
xcord, ycord, zcord = gps.locate(5, false)

not
xcord, zcord, ycord = gps.locate(5, false)

When I was testing this out in creative I noticed when I tried gps-deploy locate the computers were giving out the wrong cords and when I looked at the code I noticed that they were backwards.

And when I changed it to X,Y,Z from X,Z,Y it worked fine :)

#7 vafo

  • Members
  • 10 posts

Posted 26 January 2013 - 01:55 PM

View Postkittykiller, on 25 January 2013 - 01:08 PM, said:

line 97 should be
xcord, ycord, zcord = gps.locate(5, false)

not
xcord, zcord, ycord = gps.locate(5, false)

When I was testing this out in creative I noticed when I tried gps-deploy locate the computers were giving out the wrong cords and when I looked at the code I noticed that they were backwards.

And when I changed it to X,Y,Z from X,Z,Y it worked fine :)
Pastebin for updated code to above comment:
http://pastebin.com/PsH9RvKV

#8 xInDiGo

  • Members
  • 105 posts

Posted 26 February 2013 - 12:53 PM

::edit::

never mind

#9 solidmoose

  • Members
  • 8 posts

Posted 09 March 2013 - 07:06 PM

how would I run this when my server has unlimited fuel set for the turtles? it crashes every time :s

#10 subzero22

  • Members
  • 97 posts

Posted 16 March 2013 - 09:17 AM

This has worked great except for when the first time I was facing north and had my cords backwards lol. Well anyway there is one small problem. If the turtle has no fuel in it already and put put a stack of fuel for it to do it's job. Then set the height to 100 when it comes back to return it will only be a couple spaces down from the gps and run out of fuel. It will just give the finished prompt and sit there. You should make it so that when coming back down it checks if it has enough fuel to do so.

#11 crimsonknight3

  • Members
  • 39 posts

Posted 21 April 2013 - 03:27 PM

There is a command built in to computer craft that can get it's direction *digs through his brain* your running ftb, which *should* have misc peripherals you can add this to your turtle that deploys the satellite. Not sure how you would do it with your mining turtles though as they cant have more than the mining + wireless upgrades....

Compass Upgrade
Craft a Compass alongside a turtle to get a Compass Turtle.
Exposes a single function, getFacing() which returns the turtle's facing - 0-3, same as the f: value in the F3 screen.

#12 Vorg

  • Members
  • 48 posts

Posted 10 May 2013 - 12:01 PM

View Postcrimsonknight3, on 21 April 2013 - 03:27 PM, said:

There is a command built in to computer craft that can get it's direction *digs through his brain* your running ftb, which *should* have misc peripherals you can add this to your turtle that deploys the satellite. Not sure how you would do it with your mining turtles though as they cant have more than the mining + wireless upgrades....

Compass Upgrade
Craft a Compass alongside a turtle to get a Compass Turtle.
Exposes a single function, getFacing() which returns the turtle's facing - 0-3, same as the f: value in the F3 screen.

He needs a mining turtle to remove the disk drive. So the deployment turtle would have to forgo the modem and all gps functions for the compass. Or it would need to drop a mining turtle to remove the drives. then it would have to know to follow the deploy turtle as it could not be picked back up.

#13 Ampix0

  • Members
  • 21 posts

Posted 12 May 2013 - 12:26 AM

Very cool. Right now I simply track the height change of the turtle. I am looking for an enclosed way to track the entire path. Right now I am not sure it is possible (I mean totally enclosed)

#14 CupricWolf

  • Members
  • 86 posts
  • LocationColorado, USA

Posted 03 June 2013 - 07:22 PM

This code assumes that the turtles use fuel and don't gracefully handle turtle.getFuelLevel() returning a string. I edited it and it will now ignore all fuel if the game is in no fuel mode. it is here --> XHk0u2DG

#15 CupricWolf

  • Members
  • 86 posts
  • LocationColorado, USA

Posted 03 June 2013 - 07:43 PM

View Postsolidmoose, on 09 March 2013 - 07:06 PM, said:

how would I run this when my server has unlimited fuel set for the turtles? it crashes every time :s
I fixed that! :) XHK0u2DG

#16 Conan1981m

  • Members
  • 28 posts

Posted 07 June 2013 - 10:23 AM

Really good work ;-)
I was wondering where the gps would be before i watched the video ..
placing them so high is quite a good idea as well ;-)

#17 logwet

  • Members
  • 11 posts

Posted 14 July 2013 - 12:55 AM

Wow! this worked great! thanks for making this, it's been a great help for me! :D

#18 Elrond1369

  • Members
  • 34 posts
  • LocationUnited States

Posted 24 July 2013 - 10:22 AM

Here is my code for controlling a gps satellite
Spoiler


#19 cheetah

  • Members
  • 11 posts

Posted 25 July 2013 - 01:15 AM

View Postsubzero22, on 16 March 2013 - 09:17 AM, said:

This has worked great except for when the first time I was facing north and had my cords backwards lol. Well anyway there is one small problem. If the turtle has no fuel in it already and put put a stack of fuel for it to do it's job. Then set the height to 100 when it comes back to return it will only be a couple spaces down from the gps and run out of fuel. It will just give the finished prompt and sit there. You should make it so that when coming back down it checks if it has enough fuel to do so.

If you somehow find a stack of coal is not enough - use coke coal instead.

#20 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 09 August 2013 - 02:30 AM

Brilliant program :D

Will definitely use this later :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users