Note that alterations to the YSFlight .EXE is forbidden
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Wed Jan 06, 2016 11:41 am
u2fly wrote:UPDATE: YS RADAR GUI ver.0.0.2

CHANGELOG:
- change look of aircraft marker and text
- add date and clock with GMT time (see footer)
- rename window title (make shorter)
- add version number into main window (see left-up corner)
- (other small changes)
Grab and test GUI prototype now!
ysradar-gui-0_0_2.zip
--
This is some draft and code example how make GUI for YSRADAR using
Python with Tkinter library.
For working this demo install:
Then try run it from terminal on your system.
--
P.S. Here also are example of radarscope on pure C
http://www.codeproject.com/Articles/200 ... ay-Using-C
--
-
Attachments
-
- gui-ysradar_prototype.zip
- (code & screenshot)
- (151.71 KiB) Downloaded 227 times
Last edited by
u2fly on Thu Jan 07, 2016 4:59 pm, edited 3 times in total.
u2fly
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Wed Jan 06, 2016 12:09 pm
Thanks.
But I steal can't understand how your tool work (I'm not good programmer and you dont give us any documentation about your project in English).
Anyway, can you convert my example to work with Poseidon2?
Also it will be good if you make one more Poseidon2 version for Python2.x !
u2fly
-
Strats
- Rookie

- Posts: 32
- Joined: Tue Dec 15, 2015 3:17 am
- Favorite Aircraft: B757 and CF-18
- Location: Canada
- OS: Windows XP and 7:HP
- Has thanked: 14 times
- Been thanked: 5 times
-
Contact:
Post
by Strats » Wed Jan 06, 2016 12:30 pm
I like where this project is going. Only issues I notice are how you would get the "user" blip to appear. I could see a potential collaboration with this idea and the integration of ATC. I propose YS could have commands that relay info on the users position and plane type as well as how it is in the air (it's state, speed, etc) to the program. Flight Tracking Strips in YS would be able to allow for ATC to work efficiently in conjunction with this program.
Strats
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Wed Jan 06, 2016 6:41 pm
Make update GUI skeleton for YSRADAR
--
UPDATE:
- add transparency
- make window on top
- add title to main window
- enlarge window size and fix it
- add text line under aircraft marker for altitude as '@ <value>'
- (some other improvements)
--
-
Attachments
-
- ysradar-gui-0_0_1.zip
- (975 Bytes) Downloaded 169 times
u2fly
-
Deleted User 2704
Post
by Deleted User 2704 » Thu Jan 07, 2016 1:38 am
u2fly wrote:Thanks.
But I steal can't understand how your tool work (I'm not good programmer and you dont give us any documentation about your project in English).
Anyway, can you convert my example to work with Poseidon2?
Also it will be good if you make one more Poseidon2 version for Python2.x !
Poseidon 2 is for server...so cannot include it. But Packet and PacketStacker class in src/pos/packet.py useful for develop proxy for current YSFLIGHT.
And OfficerFlake's Orb and OpenYS source is very very good YSFLIGHT Protocol Reference.
Deleted User 2704
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Thu Jan 07, 2016 11:02 am
UPDATE: YS RADAR GUI ver.0.0.2
CHANGELOG:
- change look of aircraft marker and text
- add date and clock with GMT time (see footer)
- rename window title (make shorter)
- add version number into main window (see left-up corner)
- (other small changes)
-
Attachments
-
- ysradar-gui-0_0_2.zip
- (1.45 KiB) Downloaded 297 times
u2fly
-
Barr
- Veteran

- Posts: 1012
- 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
Post
by Barr » Thu Jan 07, 2016 12:26 pm
Very very nice work u2fly!
Now a question is it possible to have ground objects show on the radar? How about just certain objects? How about an underlaying image like a simple map?

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.
Barr
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Thu Jan 07, 2016 12:56 pm
BARRACUZ wrote:Very very nice work u2fly!
Now a question is it possible to have ground objects show on the radar? How about just certain objects? How about an underlaying image like a simple map?
Thanks & Lets do it!
Give me a sketch (paint on attached screenshot) how you want it will look!
Then I try answer correctly.
--
Also, did you try it on your PC? Is this demo work for you?
u2fly
-
Barr
- Veteran

- Posts: 1012
- 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
Post
by Barr » Thu Jan 07, 2016 1:07 pm
u2fly wrote:BARRACUZ wrote:Very very nice work u2fly!
Now a question is it possible to have ground objects show on the radar? How about just certain objects? How about an underlaying image like a simple map?
Thanks & Lets do it!
Give me a sketch (paint on attached screenshot) how you want it will look!
Then I try answer correctly.
--
Also, did you try it on your PC? Is this demo work for you?
No not yet.
Well my thoughts were to have like a GPS style setup where the map/image will move inside the radar

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.
Barr
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Thu Jan 07, 2016 1:34 pm
BARRACUZ wrote:
No not yet.
What system you use? (I use Linux)
BARRACUZ wrote:Well my thoughts were to have like a GPS style setup where the map/image will move inside the radar
Ok, its not hard, only issue is that GUI planned for ATC tower that fixed on map. But, think, will make it usable as aircraft radar too.
Can you give me an image with examples?
Try google it and give me one that you like.

Also look this

Is it what you think?
---
Last edited by
u2fly on Thu Jan 07, 2016 5:03 pm, edited 1 time in total.
u2fly
-
Deleted User 2704
Post
by Deleted User 2704 » Thu Jan 07, 2016 3:47 pm
u2fly, I think it need these function.
- Packet Capture
-- Entity Spawn
-- Move Entity
- Entity Manager
-- Entity ID
-- Entity Owner
-- Entity Name
-- Entity IFF
-- Last Entity Place
and calculate between Entity method needed.
Deleted User 2704
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Thu Jan 07, 2016 4:37 pm
mrmofumofu wrote:u2fly, I think it need these function.
- Packet Capture
-- Entity Spawn
-- Move Entity
- Entity Manager
-- Entity ID
-- Entity Owner
-- Entity Name
-- Entity IFF
-- Last Entity Place
and calculate between Entity method needed.
Can you give me some example code for Python2.7, that I can test with this GUI?
u2fly
-
Deleted User 2704
Post
by Deleted User 2704 » Fri Jan 08, 2016 4:59 am
Example...at first, you need to understand YSFLIGHT Protocol.
YSFLIGHT uses TCP socket so capturing them needs "socket" module in Python 2.7/3.
YS Packets are raw C struct so extracting them needs "struct" module in Python 2.7/3.
All YS Packet has following structure.
4byte-uint Packet Body Length(n)
4byte-uint Packet Body Type
nbyte-struct Packet Body
Packet Type is about 50 type(Check OpenYS Code) like entity spawn, move object, damaged...etc.
and some packet connected and inserted one frame.
I suggest to read OpenYS and Orb Packet Module and view YS Packet with Wireshark.
Poseidon 2 packet.py is reference implement for packet capturing.
Deleted User 2704
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Fri Jan 08, 2016 5:43 am
mrmofumofu wrote:Example...at first, you need to understand YSFLIGHT Protocol.
YSFLIGHT uses TCP socket so capturing them needs "socket" module in Python 2.7/3.
YS Packets are raw C struct so extracting them needs "struct" module in Python 2.7/3.
All YS Packet has following structure.
4byte-uint Packet Body Length(n)
4byte-uint Packet Body Type
nbyte-struct Packet Body
Packet Type is about 50 type(Check OpenYS Code) like entity spawn, move object, damaged...etc.
and some packet connected and inserted one frame.
I suggest to read OpenYS and Orb Packet Module and view YS Packet with Wireshark.
Poseidon 2 packet.py is reference implement for packet capturing.
Ok, think soon this GUI will use next Python 2.7 modules:
- Tkinter
- time
- math
- socket
- struct
- ...
--
Please, adapt your "packet.py" and Eric's "ysradar.py" for YSFlight 20150425 (using Python 2.7):
https://gist.github.com/EricTendian/8500747
... and give me simple example script that connect to YS server (20150425) as aircraft, and return coordinates using "print" command!
Last edited by
u2fly on Fri Jan 08, 2016 6:10 am, edited 1 time in total.
u2fly
-
Deleted User 2704
Post
by Deleted User 2704 » Fri Jan 08, 2016 6:09 am
Umm...it wont be simple...
Poseidon 2 is running as proxy needs 1200 line(i thought it simple but take long time...2 mean rewrited).
Getting IFF by ID will be like this.
print(EntityManager().getEntity(65537).getIFF())
Deleted User 2704
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Fri Jan 08, 2016 6:12 am
mrmofumofu wrote:Umm...it wont be simple...
Poseidon 2 is running as proxy needs 1200 line(i thought it simple but take long time...2 mean rewrited).
Getting IFF by ID will be like this.
print(EntityManager().getEntity(65537).getIFF())
Can you give me it as python script?
u2fly
-
Flake
- VFA-49

- Posts: 4358
- Joined: Thu Feb 10, 2011 8:47 pm
- Favorite Aircraft: Boeing F/A-18A
- Location: Australia
- OS: Windows 10 (x64)
- Has thanked: 838 times
- Been thanked: 1248 times
-
Contact:
Post
by Flake » Sat Jan 09, 2016 6:28 am
mrmofumofu wrote:(i thought it simple but take long time...)
Story of my life hahaha!

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!
Flake
-
Barr
- Veteran

- Posts: 1012
- 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
Post
by Barr » Sat Jan 09, 2016 1:43 pm
Yea pretty much something like that. Nothing complex just aircraft and maybe vor/dmes and other navigational aids and list their names. That would make ATC alot easier and realistic

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.
Barr
-
u2fly
- Senior Veteran

- Posts: 1349
- Joined: Fri Oct 02, 2015 9:27 am
- Favorite Aircraft: Antonov An-225 Mriya
- Location: Ukraine
- OS: Linux
- Has thanked: 889 times
- Been thanked: 296 times
-
Contact:
Post
by u2fly » Sun Mar 20, 2016 1:54 am
Now I'm try make "YS RADAR" GUI closer to "OpenRadar" look
http://wiki.flightgear.org/OpenRadar
Here are few "OpenRadar" screenshots.

u2fly
Users browsing this forum: No registered users and 0 guests