Merge pull request #74 from makrsmark/bugfix/73-opensky-state
heading is actually true_track
This commit is contained in:
commit
017e2f6a3d
|
|
@ -81,7 +81,14 @@ class Plane:
|
||||||
self.print_header("BEGIN")
|
self.print_header("BEGIN")
|
||||||
#print (Fore.YELLOW + "OpenSky Sourced Data: ", ac_dict)
|
#print (Fore.YELLOW + "OpenSky Sourced Data: ", ac_dict)
|
||||||
try:
|
try:
|
||||||
self.__dict__.update({'icao' : ac_dict.icao24.upper(), 'callsign' : ac_dict.callsign, 'latitude' : ac_dict.latitude, 'longitude' : ac_dict.longitude, 'on_ground' : bool(ac_dict.on_ground), 'squawk' : ac_dict.squawk, 'track' : float(ac_dict.heading)})
|
self.__dict__.update({
|
||||||
|
'icao' : ac_dict.icao24.upper(),
|
||||||
|
'callsign' : ac_dict.callsign,
|
||||||
|
'latitude' : ac_dict.latitude,
|
||||||
|
'longitude' : ac_dict.longitude,
|
||||||
|
'on_ground' : bool(ac_dict.on_ground),
|
||||||
|
'squawk' : ac_dict.squawk,
|
||||||
|
'track' : float(ac_dict.true_track)})
|
||||||
if ac_dict.baro_altitude != None:
|
if ac_dict.baro_altitude != None:
|
||||||
self.alt_ft = round(float(ac_dict.baro_altitude) * 3.281)
|
self.alt_ft = round(float(ac_dict.baro_altitude) * 3.281)
|
||||||
elif self.on_ground:
|
elif self.on_ground:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue