Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/gps_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Will wait for a fix and print a message every second with the current location
# and other details.
import time
import math
import board
import busio

Expand Down Expand Up @@ -84,13 +85,13 @@
print("Latitude: {0:.6f} degrees".format(gps.latitude))
print("Longitude: {0:.6f} degrees".format(gps.longitude))
print(
"Precise Latitude: {:2.}{:2.4f} degrees".format(
gps.latitude_degrees, gps.latitude_minutes
"Precise Latitude: {:3.0f} degs, {:2.4f} mins".format(
math.floor(gps.latitude_degrees), gps.latitude_minutes
)
)
print(
"Precise Longitude: {:2.}{:2.4f} degrees".format(
gps.longitude_degrees, gps.longitude_minutes
"Precise Longitude: {:3.0f} degs, {:2.4f} mins".format(
math.floor(gps.longitude_degrees), gps.longitude_minutes
)
)
print("Fix quality: {}".format(gps.fix_quality))
Expand Down