Fix format specifier
This commit is contained in:
parent
84a835f7aa
commit
ae0019d714
1 changed files with 5 additions and 4 deletions
|
|
@ -7,6 +7,7 @@
|
|||
import time
|
||||
import board
|
||||
import busio
|
||||
import math
|
||||
|
||||
import adafruit_gps
|
||||
|
||||
|
|
@ -84,13 +85,13 @@ while True:
|
|||
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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue