744 Forum

Apron => Accessories => Topic started by: flyer605 on Mon, 13 Jul 2020 15:51

Title: PSX ATC Text V0.42
Post by: flyer605 on Mon, 13 Jul 2020 15:51
So here goes...

This is my first addon pretty much for any piece of software/simulation. It came about from reading the a couple of forum posts about being able to see what ATC is saying in text as well as someone else asking about the current controlling frequency.

I thought about it and decided to try my hand at making it work!

With a lot of help from Hoppie and many Python tutorials, I present 'PSX ATC Text'...

(http://www.hoppie.nl/forum/var/2020-10-02_13.14.53_PSX_ATC_Text.jpg)

It should be fairly self explanatory and work 'out of the box'.

Some notes:

1) I won't claim that the code is efficient or robust and I have not been able to test very much, so any feedback is appreciated (please give as much information as possible). I will do my best to find and fix any bugs. So basically it is provided as-is and used at your own risk.

2) At the moment it will only work on the same computer as the PSX main server is running. This is a possible future feature I look to add.

3) It's not the prettiest thing, but I just wanted to get something functional that did what I planned for it.

4) It is lacking any configuration abilities whatsoever right now, but this may change in the future (see point 2). I plan to continue to develop it (if there is any demand), but I will obviously fit that in between the day job and everything else.

5) The exe is quite big for how few features the program actually has, but I think that's a result of the exe creation method which has to bundle everything necessary to work. I thought this would be preferable to having many system requirements.

6) I could look into a Mac version if this would be of interest to anyone?

7) The connection cycle takes 10 seconds and as of yet there is no real warning when the connection to PSX is lost (see point 2).

Coded in Python using Hoppie's (original) Python code and the exe was created using Pyinstaller on Windows 10.

Good luck and I hope someone somewhere might get some use/enjoyment out of it!

Cheers,

flyer605

Windows Download Link V0.42:
https://www.dropbox.com/s/ux8l6aebh01ns1w/PSX%20ATC%20Text%20V0.42.zip?dl=0 (https://www.dropbox.com/s/ux8l6aebh01ns1w/PSX%20ATC%20Text%20V0.42.zip?dl=0)

Mac Download Link V0.42:
https://www.dropbox.com/s/2d1rumic0yvcvee/PSX%20ATC%20Text%20V0.42%20Mac.zip?dl=0 (https://www.dropbox.com/s/2d1rumic0yvcvee/PSX%20ATC%20Text%20V0.42%20Mac.zip?dl=0)

V0.41 (and upwards) Instructions:
Now you can modify an optional "PSX ATC Text.cfg" file in the same location as the main exe to enable connecting over a network. This file also enables saving of preferences. I plan to add saving from within the program in the future.

The contents of the cfg file should be as follows (see help screen for more information):
host=127.0.0.1
port=10747
alert=No Alert
always_on_top=True
display_rcp_c=True

Obviously change the numbers for your particular setup. There are no input error checks yet, so if anything goes wrong the program will default the current computer to look for a server. There are some input error checks now (denoted by a * on the Settings button), but you should be able to see roughly what is wrong by clicking on the Settings button.

Here is a sample cfg file https:// www .dropbox.com/s/t9l7pb35evbzhf7/PSX%20ATC%20Text.cfg?dl=0.

You can edit this with notepad or any other text editor.


Changelog
V0.1:
- Initial release
Updated to V0.2:
- Added option for window to always be on top
Updated to V0.3:
- Added optional cfg file to enable connecting via a network
- Added button to hide/display settings
Updated to V0.4:
- Added RCP display with option to hide RCP C (since it probably doesn't change too much)
- Added an indication for offside tuning
- Modified Enroute Center HF frequency display
Updated to V0.41:
- Added more configuration options to the cfg file
- Help button added with some instructions
Updated to V0.42:
- Corrected an error causing the callsign alert feature to not read from the cfg correctly after initial startup
- Mac version (OSX) available

Download Link V0.41:
If V0.42 doesn't work for you then please let me know and I'll try to get a fix out. If you want the previous version (V0.41), here is the link:
https://www.dropbox.com/s/b5so5ub4oejkjqw/PSX%20ATC%20Text%20V0.41.zip?dl=0 (https://www.dropbox.com/s/b5so5ub4oejkjqw/PSX%20ATC%20Text%20V0.41.zip?dl=0)

Mac (OSX) version important notes:
I am not sure if the cfg file reading will work correctly, so any feedback on that will be much appreciated. I will try and come back to change the default size at a later time. Having the program resize appropriately is on the list of things to do, but it probably won't happen immediately!
Title: Re: PSX ATC Text
Post by: Hardy Heinlin on Mon, 13 Jul 2020 17:14
Clever idea :-) Congrats! So you have assigned self-written text fragments to the audio fragments, and you read the related Q string that contains all indices of the current ATC message.

I would test it but I have OSX only. So I can't load the exe file.


Cheers,

|-|ardy
Title: Re: PSX ATC Text
Post by: Jeroen Hoppenbrouwers on Mon, 13 Jul 2020 20:08
If you publish the plain Python code, and Hardy installs Python 3 for OSX, it will just work.

https://www.python.org/downloads/mac-osx/
Title: Re: PSX ATC Text
Post by: Jeroen Hoppenbrouwers on Mon, 13 Jul 2020 23:28
The .exe works for me and I think the Dropbox is ok as distribution.

Now your real work starts -- tinkering until late at night   :-)

Hoppie
Title: Re: PSX ATC Text
Post by: flyer605 on Tue, 14 Jul 2020 05:09
Hardy - you got it! I took the list posted by yourself and brian747 here on the forum (way back in 2015) and made it work. Obviously there may be some combinations that would look strange, but it works. I might try and figure a way to get rid of the spaces between the numbers...This might be a simple thing to do, but there may be cases where a space between digits would or wouldn't be necessary, but that's just polishing the output which I will try and do over time.

Hoppie - The tinkering part is so very true, I think I could have shared this several days ago if it wasn't for the "maybe I could add this" that I kept on asking myself! In the end I just thought I have to go ahead and share it now or else I'll never do it!

I'll try to work on creating a Mac app and see how it looks.

Cheers

flyer
Title: Re: PSX ATC Text
Post by: Jeroen Hoppenbrouwers on Tue, 14 Jul 2020 12:30
In theory you should not need to change a single thing to make this run on Mac and Linux, too. It looks like you built the GUI with hard distances, that is always setting you up for surprises. Look into the Grid geometry manager, or the Packer if you dare. It requires brainwashing yourself a bit but the results are great.

Hoppie
Title: Re: PSX ATC Text
Post by: flyer605 on Wed, 15 Jul 2020 13:22
I had to specify a width and height for the app window, but I also specified a width and height for the textbox so that most ATC comms would be displayed on a single line. Other than that I used the grid layout system in guizero. I'd love to be able to allow dynamic resizing with movement of the widgets within the window, but I think that's a bit beyond guizero (and my coding level right now).

What is the Packer, is that in tkinter?
Title: Re: PSX ATC Text
Post by: Jeroen Hoppenbrouwers on Wed, 15 Jul 2020 15:36
Grid and Packer are both geometry managers in Tk and therefore in tkinter. They both allow fully "adaptive" GUIs, if you help them a little bit by specifying which widgets are rubber and which are wood. I have no idea how GUIzero specs that but the grid cell weight and stickiness probably are just parameters there?

https://tkdocs.com/tutorial/index.html
Title: Re: PSX ATC Text
Post by: flyer605 on Fri, 17 Jul 2020 12:05
I'll check those out - cheers  :)
Title: Re: PSX ATC Text
Post by: JohnH on Fri, 17 Jul 2020 15:50
I gave the program a try and it worked perfect, very nice job!! One suggestion as it runs on the same PC as PSX could you possibly make the program 'stay on top'? At present when you click to focus PSX the program minimizes.

Thanks again John
Title: Re: PSX ATC Text
Post by: Jeroen Hoppenbrouwers on Fri, 17 Jul 2020 18:18
wm has both topmost and focus, so this is easy.
Title: Re: PSX ATC Text
Post by: flyer605 on Sat, 18 Jul 2020 02:47
Quote from: JohnH on Fri, 17 Jul 2020 15:50
I gave the program a try and it worked perfect, very nice job!! One suggestion as it runs on the same PC as PSX could you possibly make the program 'stay on top'? At present when you click to focus PSX the program minimizes.

Thanks again John

You know what - I hadn't thought about that since I was running/testing it with a dual monitor setup, so it never came up as an issue - Funny the things you miss!

I'll look into it  ;)
Title: Re: PSX ATC Text
Post by: JohnH on Sat, 18 Jul 2020 15:40
Thank you for looking into it. You should repost this add-0n under the Accessories heading that way more people will see it. At present you only see the Networkers section when you Login. Just a suggestion.

John
Title: Re: PSX ATC Text
Post by: Captain_Crow on Sun, 19 Jul 2020 07:54
Hi,
a small software can help. TurboTop. There you can set which program has to stay in front.
Best
Steff
Title: Re: PSX ATC Text
Post by: flyer605 on Sun, 19 Jul 2020 10:21
Quote from: JohnH on Sat, 18 Jul 2020 15:40
Thank you for looking into it. You should repost this add-0n under the Accessories heading that way more people will see it. At present you only see the Networkers section when you Login. Just a suggestion.

John

Updated!
Title: Re: PSX ATC Text
Post by: JohnH on Sun, 19 Jul 2020 14:43
the update works great, thanks!

John
Title: Re: PSX ATC Text
Post by: flyer605 on Sun, 19 Jul 2020 15:03
Quote from: JohnH on Sun, 19 Jul 2020 14:43
the update works great, thanks!

John

You're welcome - any other features you'd like I'd be happy to give it a try!
Title: Re: PSX ATC Text
Post by: JohnH on Sun, 19 Jul 2020 20:46
Just using your very nice program on a flight from NZCH to NZAA and it is working very nice! As I am using a 2 computer setup with PSX on computer 1 and P3dv5 on computer 2 linked using PSXexternalsim my selfish wish would be to have the ability to run PXX ATC Text on the networked computer 2 to free the PSX display from your display. However I am enjoying your program very much as I have a hearing loss and it helps me to now enjoy the PSX ATC feature!!

John
Title: Re: PSX ATC Text
Post by: flyer605 on Mon, 20 Jul 2020 01:26
That's definitely on my todo list - I'll bump it up to top priority for you!

I'll see if I can add a configuration screen maybe with a connect/disconnect button and an option to add your own connection options.

Watch this space  ;)
Title: Re: PSX ATC Text
Post by: flyer605 on Mon, 20 Jul 2020 07:55
Quote from: JohnH on Sun, 19 Jul 2020 20:46
Just using your very nice program on a flight from NZCH to NZAA and it is working very nice! As I am using a 2 computer setup with PSX on computer 1 and P3dv5 on computer 2 linked using PSXexternalsim my selfish wish would be to have the ability to run PXX ATC Text on the networked computer 2 to free the PSX display from your display. However I am enjoying your program very much as I have a hearing loss and it helps me to now enjoy the PSX ATC feature!!

John

Updated to V0.3  :)
Title: Re: PSX ATC Text
Post by: JohnH on Mon, 20 Jul 2020 11:52
the networking works great! thanks very much!!

John
Title: Re: PSX ATC Text
Post by: RogerH on Mon, 20 Jul 2020 20:50
Great stuff, thanks :-)
Title: Re: PSX ATC Text
Post by: Ton van Bochove on Sun, 26 Jul 2020 11:25
I did today my first ATC voice controlled flight with this very nice add-on. Because of my hearing loss it was not possible until today, Thanks Flyer!
Title: Re: PSX ATC Text
Post by: flyer605 on Mon, 27 Jul 2020 09:02
Quote from: Ton van Bochove on Sun, 26 Jul 2020 11:25
I did today my first ATC voice controlled flight with this very nice add-on. Because of my hearing loss it was not possible until today, Thanks Flyer!

This really was so great to hear! It feels good to know that I've actually helped real people with a specific need that I hadn't even considered.

If you have any other feature requests then let me know and I'll try my best to make it happen  :)
Title: Re: PSX ATC Text
Post by: Kabbers on Thu, 6 Aug 2020 19:42
Flyer, thanks SO much!
I cannot always make out the ATC directives accurately. But now I can train my ear in by seeing the text as well - wonderful, like other friends have said already... this opens up PSX ATC for me as well cheers!
Best wishes, K
Title: Re: PSX ATC Text
Post by: flyer605 on Sat, 8 Aug 2020 13:36
You're very welcome Kabbers - Great to hear you enjoy it!
Title: Re: PSX ATC Text
Post by: Avi on Mon, 28 Sep 2020 23:51
Hi flyer605,

I used today your add-on. Very nice one but I do have one question (and request).
Do you hard code HF for the 2nd Enroute Center freq?

PSX does automatically generates a random HF freq for this but the user can change it (and I did) and while the VHF freq looked ok, the HF addition was odd.

You may want to add it by checking the range of the freq or simply remove it.

The request is to add another group to display the 3 radios active and standby freq.
For myself I use only one computer with 2 screens. One for PSX and the other for add-ons and other stuff. There is no place on the PSX frame to have the radio panel and since you need to change freq at high workload time, to see it in your program will be nice (I change freqs with the keyboard).

Thanks,

P.S. Hardy:
1) I think you need to move this thread to the Accessories folder since the Networkers doesn't fit (I had to use the "search" function to find it).
2) You should add an entry in the add-on page for this one.

Cheers,
Title: Re: PSX ATC Text
Post by: Hardy Heinlin on Tue, 29 Sep 2020 05:23
Quote from: Avi on Mon, 28 Sep 2020 23:51
P.S. Hardy:
1) I think you need to move this thread to the Accessories folder since the Networkers doesn't fit (I had to use the "search" function to find it).
2) You should add an entry in the add-on page for this one.

Flyer605, what do you think about Avi's suggestions?

I haven't moved this thread off the Networkers subforum because this subforum is hidden to non-members. Maybe you intended to keep your first version in the member area?


Regards,

|-|ardy
Title: Re: PSX ATC Text
Post by: flyer605 on Wed, 30 Sep 2020 05:03
Hardy: I'm happy for you to move this anywhere you think would be best. As for the add-ons page, I'll leave that up to you. It's not the most polished software and probably never will be, but if it helps people, that's great!

Avi: Thank you for your kind words! I actually add the 'HF' text on myself in the code and I did that to match the Voice-ATC settings in the Instructor pages. I take your point though and have modified things accordingly.

I've added in your request for the RCP display and will hopefully release it fairly soon.

Cheers,

Flyer
Title: Re: PSX ATC Text
Post by: flyer605 on Wed, 30 Sep 2020 07:47
Updated to V0.4
Title: Re: PSX ATC Text
Post by: Avi on Wed, 30 Sep 2020 12:57
Thanks,

It's wonderful.

Cheers,
Title: Re: PSX ATC Text
Post by: JohnH on Thu, 1 Oct 2020 19:51
Thanks very much for the update. I just noticed perhaps a minor display glitch? When I select VHF L in PSX, PSX ATC Text shows VHF L and VHF R. If I select VHF R in PSX, ATC Texet shows VHF R and VHF R? Is this to be expected?

John
Title: Re: PSX ATC Text
Post by: Avi on Thu, 1 Oct 2020 20:26
John,
It's ok.

PSX ATC text shows the content of the Left / Center / Right radio tuning panels.
If you select VHF R on the L radio panel, and it is also selected on the R radio tuning panel, you will see it twice in ATC Text (with an '*' as a remark) as you see it twice in PSX.

Cheers,
Title: Re: PSX ATC Text
Post by: JohnH on Thu, 1 Oct 2020 20:49
Ok thanks for the explanation, I am really enjoying this add-on! I have a hearing loss and it helps so much!

John
Title: Re: PSX ATC Text
Post by: flyer605 on Fri, 2 Oct 2020 13:57
Avi is exactly correct there (thank you Avi). The program simply reads which light (VHF L / VHF R / HF L / HF R etc.) is illuminated on the respective radio tuning panel (Qi92, Qi93, Qi94 for those that are interested). I think there is the potential for this to lead to display issues during non-normal operations such as electronic faults or RTP faults, but I think the main function of the program will still work (if anyone does see any strange indications then please send as much info as possible for me to investigate).

The offside tuning lights (represented by * in PSX ATC Text) are explained on page 167 of the manual.

Cheers John
Title: Re: PSX ATC Text V0.41
Post by: flyer605 on Sat, 3 Oct 2020 07:56
V0.41 released
Title: Re: PSX ATC Text V0.41
Post by: hrjrkr on Sat, 3 Oct 2020 17:45
Hi flyer,

Thank you for this wonderful program. This means so much to me because I am hard of hearing and this program helps me so much. You should post your Paypal id. I would like to donate something, even if it is a small amount, I would just like to help out.
Thanks again.
Joe
Title: Re: PSX ATC Text V0.41
Post by: flyer605 on Wed, 7 Oct 2020 02:12
Hi Joe,

Thank you for your very kind offer, but donations are not necessary! I'm just glad that I'm able to help and improve the experience for yourself and others.

All the best,

flyer
Title: Re: PSX ATC Text V0.42
Post by: flyer605 on Thu, 5 Nov 2020 05:40
V0.42 released (small bugfix)
Title: Re: PSX ATC Text V0.42
Post by: flyer605 on Sat, 7 Nov 2020 13:38
A Mac (OSX) version of PSX ATC Text is now available. See the first post for the link.

Please let me know if the cfg file reading doesn't work correctly, I'd be surprised if it does!
Title: Re: PSX ATC Text V0.42
Post by: Hardy Heinlin on Sun, 8 Nov 2020 07:05
Just tested some departures and arrivals on my iMac. It works. Nice add-on. Thank you!

I also tested the last three variables in the cfg file. When I've changed the data with a text editor, your program will load the data correctly.

(Your program will not overwrite the config data when I change the data within your program. Maybe this is intentional?)


Best wishes,

|-|ardy
Title: Re: PSX ATC Text V0.42
Post by: flyer605 on Sun, 8 Nov 2020 15:07
Thank you Hardy!

Quote from: Hardy Heinlin on Sun,  8 Nov 2020 07:05
(Your program will not overwrite the config data when I change the data within your program. Maybe this is intentional?)

Yes, right now this is intentional. I plan to add a save/update feature in the future.

Cheers