Browse Source

Merge pull request #44 from Aki26-GamePlay/patch-1

Fix 'StateVector' object has no attribute 'heading' error.
pull/49/head
Jack Sweeney 3 years ago committed by GitHub
parent
commit
face5fe75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      planeClass.py

2
planeClass.py

@ -60,7 +60,7 @@ class Plane:
self.printheader("head")
#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