Skip to content

Commit 01bcf65

Browse files
committed
fix float formatters in example with longitude_degrees being always ints
1 parent 42dd755 commit 01bcf65

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/gps_simpletest.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# Will wait for a fix and print a message every second with the current location
66
# and other details.
77
import time
8-
import math
98
import board
109
import busio
1110

@@ -85,13 +84,13 @@
8584
print("Latitude: {0:.6f} degrees".format(gps.latitude))
8685
print("Longitude: {0:.6f} degrees".format(gps.longitude))
8786
print(
88-
"Precise Latitude: {:3.0f} degs, {:2.4f} mins".format(
89-
math.floor(gps.latitude_degrees), gps.latitude_minutes
87+
"Precise Latitude: {} degs, {:2.4f} mins".format(
88+
gps.latitude_degrees, gps.latitude_minutes
9089
)
9190
)
9291
print(
93-
"Precise Longitude: {:3.0f} degs, {:2.4f} mins".format(
94-
math.floor(gps.longitude_degrees), gps.longitude_minutes
92+
"Precise Longitude: {} degs, {:2.4f} mins".format(
93+
gps.longitude_degrees, gps.longitude_minutes
9594
)
9695
)
9796
print("Fix quality: {}".format(gps.fix_quality))

0 commit comments

Comments
 (0)