Skip to content

Commit 191bdf5

Browse files
author
NataliaP721
committed
Added comment about latitude/longitude calculation
1 parent 2383e3f commit 191bdf5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

parseData.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def __str__(self):
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"
2828
string+="GPS - TIME:\t\t"+ str(self.gps[0]) + "\n"
29+
#Convert GPS coordinates to latitude/longitude that Google Maps accepts
2930
string+="GPS - LAT:\t\t"+ str(self.gps[1] + self.gps[2]/100000/60) + " " + str(self.gps[3]) + "\n"
3031
string+="GPS - LONG:\t\t"+ str(self.gps[4] + self.gps[5]/100000/60) + " " + str(self.gps[6]) + "\n"
3132
string+="GPS - ALT:\t\t" + str(self.gps[7]) + " m" + "\n"
@@ -57,7 +58,7 @@ def readSerial(ser,data):
5758
i = 0
5859
print(line)
5960
while(i<len(line)):
60-
# IMU Data
61+
#IMU Data
6162
if((line[i:i+8]=='31313131') and (len(line)-i>=81)):
6263
if(line[i+80:i+82]=='00'):
6364
print(line[i:i+82])
@@ -70,7 +71,7 @@ def readSerial(ser,data):
7071
i+=81
7172
else: i+=1
7273

73-
# Barometer Data
74+
#Barometer Data
7475
elif((line[i:i+8])=='32323232' and len(line)-i>=25):
7576
if(line[i+24:i+26]=='00'):
7677
print(line[i:i+26])

0 commit comments

Comments
 (0)