Backing up old changesfrom PC- 6
This commit is contained in:
parent
5fa694cb09
commit
f8c4ad9410
|
|
@ -10,14 +10,14 @@ from colorama import Fore, Back, Style
|
||||||
#Setup PushBullet
|
#Setup PushBullet
|
||||||
from pushbullet import Pushbullet
|
from pushbullet import Pushbullet
|
||||||
pb = Pushbullet("*")
|
pb = Pushbullet("*")
|
||||||
elon_jet_channel = pb.get_channel('<channel tag here>')
|
elon_jet_channel = pb.get_channel('<channeltaghere>')
|
||||||
|
|
||||||
#Setup OpenSKy
|
#Setup OpenSKy
|
||||||
from opensky_api import OpenSkyApi
|
from opensky_api import OpenSkyApi
|
||||||
opens_api = OpenSkyApi("*", "*")
|
opens_api = OpenSkyApi("*", "*")
|
||||||
|
|
||||||
#Set Plane ICAO
|
#Set Plane ICAO
|
||||||
TRACK_PLANE = 'A5B1A8'
|
TRACK_PLANE = '<planeicaohere>'
|
||||||
#Pre Set Variables
|
#Pre Set Variables
|
||||||
geo_altitude = None
|
geo_altitude = None
|
||||||
geo_alt_ft = None
|
geo_alt_ft = None
|
||||||
|
|
@ -61,9 +61,7 @@ while True:
|
||||||
latitude = (dataStates.latitude)
|
latitude = (dataStates.latitude)
|
||||||
on_ground = (dataStates.on_ground)
|
on_ground = (dataStates.on_ground)
|
||||||
geo_alt_m = (dataStates.geo_altitude)
|
geo_alt_m = (dataStates.geo_altitude)
|
||||||
if geo_alt_m == None and on_ground:
|
if geo_alt_m != None :
|
||||||
geo_alt_ft = 0
|
|
||||||
elif geo_alt_m != None :
|
|
||||||
geo_alt_ft = geo_alt_m * 3.281
|
geo_alt_ft = geo_alt_m * 3.281
|
||||||
print (Fore.CYAN)
|
print (Fore.CYAN)
|
||||||
print ("ICAO: ", icao)
|
print ("ICAO: ", icao)
|
||||||
|
|
@ -112,6 +110,8 @@ while True:
|
||||||
state = address.get('state', '')
|
state = address.get('state', '')
|
||||||
county = address.get('county', '')
|
county = address.get('county', '')
|
||||||
city = address.get('city', '')
|
city = address.get('city', '')
|
||||||
|
town = address.get('town', '')
|
||||||
|
hamlet = address.get('hamlet', '')
|
||||||
|
|
||||||
|
|
||||||
# print (Fore.YELLOW)
|
# print (Fore.YELLOW)
|
||||||
|
|
@ -123,6 +123,8 @@ while True:
|
||||||
print ("Country: ", country)
|
print ("Country: ", country)
|
||||||
print ("State: ", state)
|
print ("State: ", state)
|
||||||
print ("City: ", city)
|
print ("City: ", city)
|
||||||
|
print ("Town: ", town)
|
||||||
|
print ("Hamlet: ", hamlet)
|
||||||
print ("County: ", county)
|
print ("County: ", county)
|
||||||
print(Style.RESET_ALL)
|
print(Style.RESET_ALL)
|
||||||
|
|
||||||
|
|
@ -144,12 +146,12 @@ while True:
|
||||||
if tookoff:
|
if tookoff:
|
||||||
tookoff_message = ("Just took off from" + " " + (city or county) + ", " + state + ", " + country)
|
tookoff_message = ("Just took off from" + " " + (city or county) + ", " + state + ", " + country)
|
||||||
print (tookoff_message)
|
print (tookoff_message)
|
||||||
push = elon_jet_channel.push_note("*", tookoff_message)
|
push = elon_jet_channel.push_note("title", tookoff_message)
|
||||||
|
|
||||||
if landed:
|
if landed:
|
||||||
landed_message = ("Landed just now at" + " " + (city or county) + ", " + state + ", " + country)
|
landed_message = ("Landed just now at" + " " + (city or county) + ", " + state + ", " + country)
|
||||||
print (landed_message)
|
print (landed_message)
|
||||||
push = elon_jet_channel.push_note("*", landed_message)
|
push = elon_jet_channel.push_note("title", landed_message)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue