Skip to content

Fix format specifier #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
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