LOCAT Query GPS. The location is returned as follows: latitude in X, longitude in Y, elevation in Z, and horizontal and vertical accuracy in a two-element vector in T. The latitude and longitude are given in decimal degrees, with North and East being positive; the elevation and accuracies are given in meters. If an accuracy is −1, that means that the corresponding measurement is not valid
Note: When LOCAT is first called, it activates the GPS if it wasn't active already. The GPS will not return a fix immediately; rather, the operating system will notify the app whenever a new fix is available. For the first fix in particular, this may take a long time, several seconds, or, if conditions are poor, even a minute or more. LOCAT simply returns the coordinates of the most recent fix the app has received, and if no fix at all has been received yet, it will return zeroes, and the location accuracy (the first component in the accuracy vector returned in the T register) will be -1.