Skip to content

Commit 266c404

Browse files
author
NataliaP721
committed
Fixed print formats for GPS data
1 parent 191bdf5 commit 266c404

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

parseData.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ def __str__(self):
2525
string+="IMU - GYRO:\t\t"+ str(self.imu[3:6])+" mdps"+"\n"
2626
string+="BAR - PRESS:\t\t"+ str(self.bar[0]/100) +" mbar"+"\n"
2727
string+="BAR - TEMP:\t\t"+ str(self.bar[1]/100)+" degrees C"+"\n"
28-
string+="GPS - TIME:\t\t"+ str(self.gps[0]) + "\n"
28+
string+="GPS - TIME:\t\t%06d UTC" % self.gps[0] + "\n"
2929
#Convert GPS coordinates to latitude/longitude that Google Maps accepts
30-
string+="GPS - LAT:\t\t"+ str(self.gps[1] + self.gps[2]/100000/60) + " " + str(self.gps[3]) + "\n"
31-
string+="GPS - LONG:\t\t"+ str(self.gps[4] + self.gps[5]/100000/60) + " " + str(self.gps[6]) + "\n"
30+
string+="GPS - LAT:\t\t%.5f" % (self.gps[1] + self.gps[2]/100000/60) + " " + str(self.gps[3]) + "\n"
31+
string+="GPS - LONG:\t\t%.5f" % (self.gps[4] + self.gps[5]/100000/60) + " " + str(self.gps[6]) + "\n"
3232
string+="GPS - ALT:\t\t" + str(self.gps[7]) + " m" + "\n"
3333
string+="OXI - P:\t\t"+ str(self.oxi/1000)+" psi"+"\n"
3434
string+="CMB - P:\t\t"+ str(self.cmb/1000)+" psi"+"\n"

0 commit comments

Comments
 (0)