added KLAtrack location updates

pull/131/head
alanbjohnston 4 years ago committed by GitHub
parent 7b4551d9d5
commit aa06eb15ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -104,6 +104,16 @@ if ((latitude != 0) and (longitude != 0) or grid):
print("\nFoxTelem configuration updated with your latitude and longitude")
latSedStr = 'sed -i "s/latitude=.*/latitude=' + str(latitude) + '/g" /home/pi/KLATrack/klatracker.properties'
#print (latSedStr)
system(latSedStr)
longSedStr = 'sed -i "s/longitude=.*/longitude=' + str(longitude) + '/g" /home/pi/KLATrack/klatracker.properties'
#print (longSedStr)
system(longSedStr)
print("\nKLAtracker configuration updated with your latitude and longitude")
return_value = 1
else:
@ -122,6 +132,20 @@ if ((latitude != 0) and (longitude != 0) or grid):
print("\nFoxTelem configuration updated with your maidenhead grid square")
latSedStr = 'sed -i "s/latitude=.*/latitude=' + str(latitude) + '/g" /home/pi/KLATrack/klatracker.properties'
#print (latSedStr)
system(latSedStr)
longSedStr = 'sed -i "s/longitude=.*/longitude=' + str(longitude) + '/g" /home/pi/KLATrack/klatracker.properties'
#print (longSedStr)
system(longSedStr)
gridSedStr = 'sed -i "s/maidenhead_locator=.*/maidenhead_locator=' + grid + '/g" /home/pi/KLATrack/klatracker.properties'
#print (gridSedStr)
system(gridSedStr)
print("\nKLAtracker configuration updated with your maidenhead grid square")
return_value = 1
for i in list(range(3)):
@ -135,6 +159,13 @@ if ((latitude != 0) and (longitude != 0) or grid):
system(altSedStr)
print("\nFoxTelem configuration updated with your alitude")
altSedStr = 'sed -i "s/altitude=.*/altitude=' + str(altitude) + '/g" /home/pi/KLATrack/klatracker.properties'
#print (altSedStr)
system(altSedStr)
print("\nKLAtracker configuration updated with your alitude")
break
else:
print("\nAltitude cannot be negative!")

Loading…
Cancel
Save

Powered by TurnKey Linux.