|
|
|
|
@ -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!")
|
|
|
|
|
|