Page 1 of 1

YSFlight Radar Refresh

Posted: Sat Mar 26, 2016 5:06 pm
by decaff_42
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

Re: YSFlight Radar Refresh

Posted: Sat Mar 26, 2016 7:50 pm
by u2fly
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

Re: YSFlight Radar Refresh

Posted: Sun Mar 27, 2016 1:45 am
by Barr
Nice job fellas. Certainly looking forward for a finished product.

Of course if you need a guinea pig you know where to find me.

Re: YSFlight Radar Refresh

Posted: Sun Mar 27, 2016 1:58 am
by u2fly
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

Re: YSFlight Radar Refresh

Posted: Sun Mar 27, 2016 5:45 am
by Flake
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.

Re: YSFlight Radar Refresh

Posted: Wed Mar 30, 2016 1:42 am
by decaff_42
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.

Re: YSFlight Radar Refresh

Posted: Wed Mar 30, 2016 1:54 am
by Gunny
Just wondering if this could be adapted for use off line as well as for servers :?:

Re: YSFlight Radar Refresh

Posted: Wed Mar 30, 2016 2:22 am
by u2fly
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.

Re: YSFlight Radar Refresh

Posted: Wed Mar 30, 2016 2:39 am
by Gunny
Sorry but repeating oneself is a privledge of age.Kinda sorta :oops:

Re: YSFlight Radar Refresh

Posted: Wed Mar 30, 2016 9:51 am
by decaff_42
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.

Re: YSFlight Radar Refresh

Posted: Tue Apr 12, 2016 4:56 pm
by u2fly
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

Re: YSFlight Radar Refresh

Posted: Wed Apr 13, 2016 6:36 am
by Dragon_Mech
would it be possible to have the radar show the IFF status of each aircraft?

Re: YSFlight Radar Refresh

Posted: Wed Apr 13, 2016 10:37 am
by decaff_42
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.

Re: YSFlight Radar Refresh

Posted: Thu Apr 14, 2016 1:58 am
by Dragon_Mech
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. :)

Re: YSFlight Radar Refresh

Posted: Fri Sep 16, 2016 10:36 pm
by u2fly
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.

Re: YSFlight Radar Refresh

Posted: Fri Sep 16, 2016 11:51 pm
by decaff_42
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

Re: YSFlight Radar Refresh

Posted: Tue Sep 20, 2016 2:41 am
by KM6BZH
How do I open this program?

Re: YSFlight Radar Refresh

Posted: Tue Sep 20, 2016 2:42 am
by decaff_42
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.

Re: YSFlight Radar Refresh

Posted: Tue Sep 20, 2016 2:45 am
by KM6BZH
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)

Re: YSFlight Radar Refresh

Posted: Tue Sep 20, 2016 9:55 pm
by u2fly
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!!! ;-)