YSFlight Radar Refresh

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

YSFlight Radar Refresh

Post by decaff_42 » Sat Mar 26, 2016 5:06 pm

So as a part of my job, I have been working with Python and Tkinter (GUI for python) and I have been learning a lot. I want to learn more and one thing that I've noticed is that the YS Radar project (aside from u2fly's recent GUI work) has been pretty much abandoned. Well I'd like to do something about that.

The last few weeks I've been working on this with halting degrees of success. With u2fly's permission, I've been adapting his GUI and style for displaying airplanes and re-organized the code behind it to be more flexible. I have a solid idea of how the radar will work and display information. However the other side of the coin is getting the information from a server. That is a complete unknown to me, but there are a few examples including the old YSRadar, Officer Flake's Open YS and Vincent's YS Protocols that I can glean information from.

I see this project as having two parts. (1) is the GUI and functionality of the program, and (2) Connecting to a YSFlight Server. I feel I have a good lock on the first part, but I know for a fact that I will be in way over my head for the second part. If anyone would like to help on either part of this project, please let me know!

I have lots of ideas for this project and I'd love to collaborate with you!

Current GUI with drop-down menus
Image
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1258
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 752 times
Been thanked: 277 times
Contact:

Re: YSFlight Radar Refresh

Post by u2fly » Sat Mar 26, 2016 7:50 pm

Few days ago I contact with Eric and he promise me that will update previouse "ysradar.py" script:
https://gist.github.com/EricTendian/8500747
Eric wrote:Hi u2fly,
I'm quite busy right now, but I will make a note to update the YSRadar script to the newest YS protocol spec. Have you done any research into what changes were made between the 2011 protocol and the 2015 protocol? I'd like to work on it but not sure how much time it would take.

Thanks,
- Eric
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Barr
Veteran
Veteran
Posts: 1011
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 272 times
Been thanked: 205 times

Re: YSFlight Radar Refresh

Post by Barr » Sun Mar 27, 2016 1:45 am

Nice job fellas. Certainly looking forward for a finished product.

Of course if you need a guinea pig you know where to find me.
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1258
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 752 times
Been thanked: 277 times
Contact:

Re: YSFlight Radar Refresh

Post by u2fly » Sun Mar 27, 2016 1:58 am

BARRACUZ wrote:Nice job fellas. Certainly looking forward for a finished product.
Of course if you need a guinea pig you know where to find me.
Image
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: YSFlight Radar Refresh

Post by Flake » Sun Mar 27, 2016 5:45 am

Watching this thread with great interest. Again, message me for any specific help with your netcode side of things, I'll answer best I can.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
decaff_42
Staff
Staff
Posts: 3556
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 622 times
Been thanked: 1350 times
Contact:

Re: YSFlight Radar Refresh

Post by decaff_42 » Wed Mar 30, 2016 1:42 am

Been working on this when not doing 12 hour days.

The Radar Menu now works up to the seperator, in such that it will update the variables listed in the Radar Information section of the GUI. These variables are global within the python class which is making this GUI, making them easy to use in different functions available to the user.

Image

My goal with this program is to make nearly everything done via the dropdown menus to keep things organized and clean in the window.

Radar Cycle Time (refresh rate) = 2, 5, 10 ,15 seconds
Radar Range = 10, 20, 50, 100 nm
min altitude defaults to 1000ft on startup if the user has not previously saved the settings file with a different altitude.

I was having a boatload of trouble getting the popup input window for the min altitude input to work until I realized I was trying to make two top-level windows ( the main GUI will go on top of everything including YSF to make it usable in-game. Then I realized that I simply had to temp lower the level of main GUI while the input window was open.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database

User avatar
Gunny
Business Class Membership
Business Class Membership
Posts: 3224
Joined: Sun Feb 06, 2011 6:17 pm
Favorite Aircraft: Any thing with a prop.
Location: New Iberia.LA.
OS: Windows XP SP3
Has thanked: 577 times
Been thanked: 731 times

Re: YSFlight Radar Refresh

Post by Gunny » Wed Mar 30, 2016 1:54 am

Just wondering if this could be adapted for use off line as well as for servers :?:
Image[/align=centre]

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1258
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 752 times
Been thanked: 277 times
Contact:

Re: YSFlight Radar Refresh

Post by u2fly » Wed Mar 30, 2016 2:22 am

Gunny wrote:Just wondering if this could be adapted for use off line as well as for servers :?:
You give me an dejavu :)
You already ask this ... viewtopic.php?p=96824
... and I already give an answer
viewtopic.php?p=96843
u2fly wrote:
Gunny wrote:I wonder if it could be coded to work off line as well?
Yes, its would work offline (currently "gui-ysradar.py" is only interface template, but soon it will use YS protocol).
Only thing you will need run YSFlight in "Server Mode"
For this run YSFlight, go to "Menu -> Network(N) -> Server". After that needed data would be listen on local IP 127.0.0.1 and port 7915.
Here is connector to YS protocol
https://gist.github.com/EricTendian/8500747
----
OfficerFlake wrote:Watching this thread with great interest. Again, message me for any specific help with your netcode side of things, I'll answer best I can.
Please, help update previouse "ysradar.py" to 20150425 protocol https://gist.github.com/EricTendian/8500747
Think, you don't forget Python, because you Orb server written on it.
Only recommendation is use Python 2.x as most popular version.
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Gunny
Business Class Membership
Business Class Membership
Posts: 3224
Joined: Sun Feb 06, 2011 6:17 pm
Favorite Aircraft: Any thing with a prop.
Location: New Iberia.LA.
OS: Windows XP SP3
Has thanked: 577 times
Been thanked: 731 times

Re: YSFlight Radar Refresh

Post by Gunny » Wed Mar 30, 2016 2:39 am

Sorry but repeating oneself is a privledge of age.Kinda sorta :oops:
Image[/align=centre]

User avatar
decaff_42
Staff
Staff
Posts: 3556
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 622 times
Been thanked: 1350 times
Contact:

Re: YSFlight Radar Refresh

Post by decaff_42 » Wed Mar 30, 2016 9:51 am

Gunny wrote:Just wondering if this could be adapted for use off line as well as for servers :?:
If you made a local server I'm sure it could work. You'd just have to figure out the IP address that you were flying on. In fact that is how I'm probably going to be testing things. AS long as you didn't publish the IP, you wouldn't get anyone else in there and on top of that there would only be on your machine. You might not even need an internet connection.

I am not wise in the ways of computers talking to each other (That's Flake's expertise), so take that with a hefty grain of salt.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1258
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 752 times
Been thanked: 277 times
Contact:

Re: YSFlight Radar Refresh

Post by u2fly » Tue Apr 12, 2016 4:56 pm

decaff_42 wrote:I've been adapting his GUI and style for displaying airplanes...
Please, see this good example how runways and some other objects can be shown on radar
http://www.atc-sim.com/gallery
Image
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 94 times
Been thanked: 127 times

Re: YSFlight Radar Refresh

Post by Dragon_Mech » Wed Apr 13, 2016 6:36 am

would it be possible to have the radar show the IFF status of each aircraft?
Owner, Dragonic Machine Industries
Image

User avatar
decaff_42
Staff
Staff
Posts: 3556
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 622 times
Been thanked: 1350 times
Contact:

Re: YSFlight Radar Refresh

Post by decaff_42 » Wed Apr 13, 2016 10:37 am

Dragon_Mech wrote:would it be possible to have the radar show the IFF status of each aircraft?
At this point, I do not know, however I am building that capability into the GUI.

@ u2fly, Those look incredibly polished. I think a long-down the road follow-on development could have the map as the background, but for now, I'm just sticking with the radar scope.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database

User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 94 times
Been thanked: 127 times

Re: YSFlight Radar Refresh

Post by Dragon_Mech » Thu Apr 14, 2016 1:58 am

decaff_42 wrote:At this point, I do not know, however I am building that capability into the GUI.
either way, i am looking forward to having this running on the second monitor as i fly online. keep up the good work you two. :)
Owner, Dragonic Machine Industries
Image

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1258
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 752 times
Been thanked: 277 times
Contact:

Re: YSFlight Radar Refresh

Post by u2fly » Fri Sep 16, 2016 10:36 pm

decaff_42 wrote:
Dragon_Mech wrote:would it be possible to have the radar show the IFF status of each aircraft?
At this point, I do not know, however I am building that capability into the GUI.

@ u2fly, Those look incredibly polished. I think a long-down the road follow-on development could have the map as the background, but for now, I'm just sticking with the radar scope.
Can you give your current latest sourcecode of this GUI? I'm back to develop this tool now and try learn more Tkinter manuals.
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
decaff_42
Staff
Staff
Posts: 3556
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 622 times
Been thanked: 1350 times
Contact:

Re: YSFlight Radar Refresh

Post by decaff_42 » Fri Sep 16, 2016 11:51 pm

Sure!

The only thing that is working so far is the radar scope colors and things. I think you'd want to work with classes in order to make things easier with respect to tracking all the fliers. Also it is written for python 3, but with a try: except entry at the top for importing python you should be able to make it work for python 2 as well. It's been a long while since I've touched this. I hope you can get it working! :D

YSFlight Radar.zip
(228.32 KiB) Downloaded 73 times
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database

KM6BZH
Contributor
Contributor
Posts: 314
Joined: Sun Jul 24, 2016 11:59 pm
Favorite Aircraft: Mitsubishi Zero
Location: Cupertino, CA
OS: Windows 10
Has thanked: 45 times
Been thanked: 153 times

Re: YSFlight Radar Refresh

Post by KM6BZH » Tue Sep 20, 2016 2:41 am

How do I open this program?

User avatar
decaff_42
Staff
Staff
Posts: 3556
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 622 times
Been thanked: 1350 times
Contact:

Re: YSFlight Radar Refresh

Post by decaff_42 » Tue Sep 20, 2016 2:42 am

You need python 3 installed on your computer. Then open the master.py file and run it by pressing F5 (windows & mac)

However this currently does nothing for a server, so there isn't any point in downloading it unless you are going to be working on the code.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database

KM6BZH
Contributor
Contributor
Posts: 314
Joined: Sun Jul 24, 2016 11:59 pm
Favorite Aircraft: Mitsubishi Zero
Location: Cupertino, CA
OS: Windows 10
Has thanked: 45 times
Been thanked: 153 times

Re: YSFlight Radar Refresh

Post by KM6BZH » Tue Sep 20, 2016 2:45 am

decaff_42 wrote:However this currently does nothing for a server
So it means that I can't use this in the "server mode"?
Well anyway, I'll try to work on the code (I'm learning python)

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1258
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 752 times
Been thanked: 277 times
Contact:

Re: YSFlight Radar Refresh

Post by u2fly » Tue Sep 20, 2016 9:55 pm

Please, test YSFlight ATC Radar 0.2 demo on Mac OS X and Windows!
YSFlightRadar-0.2.png
Changes in ver.0.2:
  • add debug message for console output:
    • print app startup message
    • print credits info
    • print version number and release date
    • print used OS/platform name
    • print used python version
    • print quit message after closing app
  • add icon for Linux systems
  • add dialog for open config files
  • add setting message
  • add about message
  • add tutorial message
  • add ask dialog before quit
  • File "YSFRadar/gui2.py" renamed to "YSFRadar/gui.py" plus fixed classes names in sources (outdated "YSFRadar/gui.py" removed now)
  • ... some other small changes
REQUIREMENTS:
  • Python 3.4
  • Tkinter module for this Python version
P.S.: Currently it tested only on Linux with Python 3.4.3, but must run on Mac OS X and Windows too.

PLEASE, GIVE A FEEDBACK!!! ;-)
Attachments
YSFlight-ATC-Radar_0.2.zip
(18.26 KiB) Downloaded 72 times
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests