Jump to content




repeat


  • You cannot reply to this topic
7 replies to this topic

#1 pofferman

  • Members
  • 37 posts

Posted 20 December 2015 - 05:47 PM

Why doesnt the program "reapeat" support gps.locate() ?

Its really anoying. Help appreciated. Thanks

#2 Yevano

  • Members
  • 376 posts
  • LocationUSA

Posted 20 December 2015 - 06:08 PM

View Postpofferman, on 20 December 2015 - 05:47 PM, said:

Why doesnt the program "reapeat" support gps.locate() ?

Its really anoying. Help appreciated. Thanks

The gps API works by bouncing a signal directly off of 3 other computers and receiving their distances from you. That information is then used to triangulate your position in the world. Therefore, I'm guessing gps.locate just uses the wireless modem peripheral directly without going through the rednet protocol. This means that it won't try to have the signal pass through repeaters or even receive data from repeaters. As well, there wouldn't be much point of repeating your gps requests until you find the gps computers, because then the triangulated position would be that of the repeater which ends up sending the signal to the gps computers, and not your own computer.

#3 pofferman

  • Members
  • 37 posts

Posted 20 December 2015 - 09:19 PM

i guess your right :/
tanks tho

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 21 December 2015 - 12:25 AM

Remember that if you're using advanced computers, it's fairly easy to have them run both the repeat and gps scripts at the same time. Create a startup script along these lines:

shell.run("bg repeat")
shell.run("gps host <x> <y> <z>")


#5 Lupus590

  • Members
  • 2,028 posts
  • LocationUK

Posted 21 December 2015 - 12:29 AM

View PostBomb Bloke, on 21 December 2015 - 12:25 AM, said:

Remember that if you're using advanced computers, it's fairly easy to have them run both the repeat and gps scripts at the same time. Create a startup script along these lines:

shell.run("bg repeat")
shell.run("gps host <x> <y> <z>")

Can't you also use the parallel API?

#6 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 21 December 2015 - 12:42 AM

The display output would be a bit garbled, but for these scripts, I suppose that doesn't matter:

parallel.waitForAny(function() shell.run("repeat") end, function() shell.run("gps host <x> <y> <z>") end)


#7 pofferman

  • Members
  • 37 posts

Posted 21 December 2015 - 06:59 PM

How would this fix the problem? o.O

#8 Lupus590

  • Members
  • 2,028 posts
  • LocationUK

Posted 21 December 2015 - 07:22 PM

it allows your repeating computers to at as gps hosts

Edited by Lupus590, 21 December 2015 - 07:22 PM.






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users