gps
Use modems to locate the position of the current turtle or computers.
This works by communicating with other computers (called GPS hosts) that already
know their position, finding the distance to those computers (with
modem_message), and using that to derive its position from theirs (with a
process known as trilateration.
See also
Changes
- New in version 1.31
| CHANNEL_GPS = 65534 | The channel which GPS requests and responses are broadcast on. |
|---|---|
| locate([timeout=2 [, debug=false]]) | Tries to retrieve the computer or turtles own location. |
- CHANNEL_GPS = 65534Source
The channel which GPS requests and responses are broadcast on.
- locate([timeout=2 [, debug=false]])Source
Tries to retrieve the computer or turtles own location.
Parameters
- timeout?
number=2The maximum time in seconds taken to establish our position. - debug?
boolean=falsePrint debugging messages
Returns
numberThis computer'sxposition.numberThis computer'syposition.numberThis computer'szposition.
Or
- nil If the position could not be established.
- timeout?