Browse Source

Merge pull request #74 from makrsmark/bugfix/73-opensky-state

heading is actually true_track
pull/79/head
Jack Sweeney 2 years ago committed by GitHub
parent
commit
017e2f6a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      planeClass.py

9
planeClass.py

@ -81,7 +81,14 @@ class Plane:
self.print_header("BEGIN")
#print (Fore.YELLOW + "OpenSky Sourced Data: ", ac_dict)
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:
self.alt_ft = round(float(ac_dict.baro_altitude) * 3.281)
elif self.on_ground:

Loading…
Cancel
Save