Query if new GPS data is available().
GPS.available()
None.
0 if no new GPS data is available, 1 if new GPS data is available.
// Check if there is new GPS data available
if (GPS.available()) {
// Read GPS data
float latitude = GPS.latitude();
float longitude = GPS.longitude();
float altitude = GPS.altitude();
float speed = GPS.speed();
int satellites = GPS.satellites();
// ...
}