GPS API: Difference between revisions

m (1 revision)
 
(No difference)

Latest revision as of 01:13, 25 December 2012

The GPS (Global Positioning System) API provides a method for turtles and computers to retrieve their own locations.

It broadcasts a PING message over the Rednet and waits for responses. In order for this system to work, there must be at least 4 computers used as gps hosts which will respond and allow Trilateration. You can set up hosts using the gps program.

Note: When entering in the coordinates for the host you need to put in the position of the modem, not the computer it is attached to.

Methods

Method name Description
gps.locate(timeout, debug) Tries to retrieve the computer or turtle own location.
@param timeout the amount of time, in seconds, to wait for a rednet response
@param debug if true, outputs debug messages
@return the location (x, y, z) of the modem attached to the computer or turtle or nil if it could not be determined
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis