YSFlight Radar Refresh

YSFlight addon development, questions, tutorials, & more!
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: YSFlight Radar Refresh

Post by decaff_42 »

Question on line 371 in the gui.py, why did you make the rework comment? There are a whole bunch of menu options that I simply did not code in because I didn't get to them, so they do nothing.

Code: Select all

filemenu.add_command(label="Open Map Config File",command=self.OpenConfigFile) #u2fly: Need rework!
In YSFlightRadar.py I recommend changing line 8 for grammar to this:

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
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: YSFlight Radar Refresh

Post by u2fly »

decaff_42 wrote:Question on line 371 in the gui.py, why did you make the rework comment? There are a whole bunch of menu options that I simply did not code in because I didn't get to them, so they do nothing.

Code: Select all

filemenu.add_command(label="Open Map Config File",command=self.OpenConfigFile) #u2fly: Need rework!
Think, I add this comment before I define "OpenConfigFile". Now I will remove this comment.

Thanks for the other ideas, try implement them in next preview release, but need deeper learn Python 3.4 by myself.

If your platform is MacOS or Windows can your test current version and give console output?

U.S. Senator John McCain wrote:“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost
- we stand w/ them in their fight against #Putin's aggression”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
decaff_42
Staff
Staff
Posts: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1726 times
Contact:

Re: YSFlight Radar Refresh

Post by decaff_42 »

Code: Select all

YSFlight ATC Radar running... 
Credits: Decaff_42, u2fly 
Version: 0.2 (Sep 20, 2016)
Platform: Darwin (WHAT IS IT?) 
Python: 3.4.2 (TESTED OK)
Check out my website YSDecaff for all my tutorials and addon releases.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: YSFlight Radar Refresh

Post by u2fly »

decaff_42 wrote:

Code: Select all

YSFlight ATC Radar running... 
Credits: Decaff_42, u2fly 
Version: 0.2 (Sep 20, 2016)
Platform: Darwin (WHAT IS IT?) 
Python: 3.4.2 (TESTED OK)
Thanks, need fix MacOS identifier.

I have a question about application icon: how use GIF as application icon in "gui.py" using next trick? I want use GIF as alternative to ICO and XBM, because last two are not crossplatform formats.

U.S. Senator John McCain wrote:“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost
- we stand w/ them in their fight against #Putin's aggression”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: YSFlight Radar Refresh

Post by u2fly »

decaff_42 wrote: Wed Sep 21, 2016 11:17 am

Code: Select all

YSFlight ATC Radar running... 
Credits: Decaff_42, u2fly 
decaff_42, may we set MIT License to our "YSFlight ATC Radar" source code?

Just found few interesting implementation of "radar scopes" in Tkinter (both MIT licensed), which has features that I want to implement in "YSFlight ATC Radar" GUI:

U.S. Senator John McCain wrote:“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost
- we stand w/ them in their fight against #Putin's aggression”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests