Code: Select all
filemenu.add_command(label="Open Map Config File",command=self.OpenConfigFile) #u2fly: Need rework!
Code: Select all
print('YSFlight ATC Radar running...','\nCredits:',__author__,'\nVersion:',__version__,'('+__date__+')')
I'd also recommend using classes for each instance of an aircraft and also using it to help draw the aircraft on the scope.
Here is a start:
Code: Select all
class Aircraft():
def __init__(self, lat, long, altitude, username, AC_Type, heading, speed):
self.lat = lat # North-South position of aircraft (meters) [NUMBER]
self.long = long # East-West position of aircrage (meters) [NUMBER]
self.alt = altitude # Altitude of aircraft (feet) [NUMBER]
self.name = username # username of player [STRING]
self.AC_Type = AC_Type # Name of aircraft from dat file [STRING]
self.heading = heading # Compass heading of aircraft (degrees) [NUMBER]
self.speed = speed # Aircraft True Air Speed (knots) [NUMBER]
def Update(lat,long,altitude,AC_Type,heading,speed):
# This function will update the aircraft's parameters
self.lat = lat
self.long = long
self.alt = altitude
self.AC_Type = AC_Type # Needed in case the user switches airplanes
self.heading = heading
self.speed = speed