Advertisement
TechManDylan

gpstest

Jan 29th, 2023 (edited)
880
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. -- This script will save the starting location of the turtle using the gps.locate() function
  2.  
  3. -- Get the starting location
  4. startingLocation = gps.locate()
  5.  
  6. -- Extract the X, Y, and Z coordinates from the starting location
  7. startingX = startingLocation.x
  8. startingY = startingLocation.y
  9. startingZ = startingLocation.z
  10.  
  11. -- Log the starting location
  12. print("Starting location: (X=" .. startingX .. ", Y=" .. startingY .. ", Z=" .. startingZ .. ")")
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement