News:

Precision Simulator update 10.173 (24 February 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

PSX ATC Text V0.42

Started by flyer605, Mon, 13 Jul 2020 15:51

flyer605

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'...



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

Mac Download Link V0.42:
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

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!

Hardy Heinlin

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

Jeroen Hoppenbrouwers

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/

Jeroen Hoppenbrouwers

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

flyer605

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

Jeroen Hoppenbrouwers

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

flyer605

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?

Jeroen Hoppenbrouwers

#7
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

flyer605

I'll check those out - cheers  :)

JohnH

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

Jeroen Hoppenbrouwers

wm has both topmost and focus, so this is easy.

flyer605

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  ;)

JohnH

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

Captain_Crow

Hi,
a small software can help. TurboTop. There you can set which program has to stay in front.
Best
Steff

flyer605

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!

JohnH

the update works great, thanks!

John

flyer605

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!

JohnH

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

flyer605

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  ;)

flyer605

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  :)