Datasheet
When the code runs it will print a message every second to the REPL, either an update that it's still waiting for a GPS
fix:
Or once a fix has been established (make sure the GPS module has a good view of the sky!) it will print details about
the current location and other GPS data:
Let's look at the code in a bit more detail to understand how it works. First the example needs to import a few
modules like the built-in busio and board modules that access serial ports and other hardware:
gps.timestamp_utc.tm_min, # month!
gps.timestamp_utc.tm_sec))
print('Latitude: {} degrees'.format(gps.latitude))
print('Longitude: {} degrees'.format(gps.longitude))
print('Fix quality: {}'.format(gps.fix_quality))
# Some attributes beyond latitude, longitude and timestamp are optional
# and might not be present. Check if they're None before trying to use!
if gps.satellites is not None:
print('# satellites: {}'.format(gps.satellites))
if gps.altitude_m is not None:
print('Altitude: {} meters'.format(gps.altitude_m))
if gps.track_angle_deg is not None:
print('Speed: {} knots'.format(gps.speed_knots))
if gps.track_angle_deg is not None:
print('Track angle: {} degrees'.format(gps.track_angle_deg))
if gps.horizontal_dilution is not None:
print('Horizontal dilution: {}'.format(gps.horizontal_dilution))
if gps.height_geoid is not None:
print('Height geo ID: {} meters'.format(gps.height_geoid))
import board
import busio
import time
© Adafruit Industries https://learn.adafruit.com/adafruit-ultimate-gps-featherwing Page 19 of 34










