Welcome, Guest. Please login or register.
Did you miss your activation email?

News:
Precision Simulator update 10.128 (18 October 2020) is now available.
Aerowinx NG FMC and More is now released.

Author Topic: PSX ATC Text V0.41  (Read 1257 times)

flyer605

  • Join date: Jan 2020
  • Posts: 24
PSX ATC Text V0.41
« 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'...



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

Download Link V0.41:
https://www.dropbox.com/s/b5so5ub4oejkjqw/PSX%20ATC%20Text%20V0.41.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.

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

Download Link V0.4:
If V0.41 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, here is the link:
https://www.dropbox.com/s/x1ful79l3udt7fe/PSX%20ATC%20Text%20V0.4.zip?dl=0
« Last edit: Sat, 3 Oct 2020 07:55 by flyer605 »

Hardy Heinlin

  • Moderator
  • Join date: May 2009
  • Posts: 11900
    • Aerowinx
Re: PSX ATC Text
« Reply #1 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

Jeroen Hoppenbrouwers

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 4015
  • Hoppie designs avionics equipment for airliners.
    • http://www.hoppie.nl/
Re: PSX ATC Text
« Reply #2 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/

Jeroen Hoppenbrouwers

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 4015
  • Hoppie designs avionics equipment for airliners.
    • http://www.hoppie.nl/
Re: PSX ATC Text
« Reply #3 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

flyer605

  • Join date: Jan 2020
  • Posts: 24
Re: PSX ATC Text
« Reply #4 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

Jeroen Hoppenbrouwers

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 4015
  • Hoppie designs avionics equipment for airliners.
    • http://www.hoppie.nl/
Re: PSX ATC Text
« Reply #5 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

flyer605

  • Join date: Jan 2020
  • Posts: 24
Re: PSX ATC Text
« Reply #6 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?

Jeroen Hoppenbrouwers

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 4015
  • Hoppie designs avionics equipment for airliners.
    • http://www.hoppie.nl/
Re: PSX ATC Text
« Reply #7 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
« Last edit: Wed, 15 Jul 2020 15:48 by Jeroen Hoppenbrouwers »

flyer605

  • Join date: Jan 2020
  • Posts: 24
Re: PSX ATC Text
« Reply #8 on: Fri, 17 Jul 2020 12:05 »
I'll check those out - cheers  :)

JohnH

  • Join date: May 2014
  • Location: Canada
  • Posts: 211
Re: PSX ATC Text
« Reply #9 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

Jeroen Hoppenbrouwers

  • Moderator
  • Join date: May 2009
  • Location: KTMB
  • Posts: 4015
  • Hoppie designs avionics equipment for airliners.
    • http://www.hoppie.nl/
Re: PSX ATC Text
« Reply #10 on: Fri, 17 Jul 2020 18:18 »
wm has both topmost and focus, so this is easy.

flyer605

  • Join date: Jan 2020
  • Posts: 24
Re: PSX ATC Text
« Reply #11 on: Sat, 18 Jul 2020 02:47 »
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

  • Join date: May 2014
  • Location: Canada
  • Posts: 211
Re: PSX ATC Text
« Reply #12 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

Captain_Crow

  • Join date: Aug 2017
  • Location: Berlin, Germany
  • Posts: 119
Re: PSX ATC Text
« Reply #13 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

flyer605

  • Join date: Jan 2020
  • Posts: 24
Re: PSX ATC Text
« Reply #14 on: Sun, 19 Jul 2020 10:21 »
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

  • Join date: May 2014
  • Location: Canada
  • Posts: 211
Re: PSX ATC Text
« Reply #15 on: Sun, 19 Jul 2020 14:43 »
the update works great, thanks!

John

flyer605

  • Join date: Jan 2020
  • Posts: 24
Re: PSX ATC Text
« Reply #16 on: Sun, 19 Jul 2020 15:03 »
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

  • Join date: May 2014
  • Location: Canada
  • Posts: 211
Re: PSX ATC Text
« Reply #17 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

flyer605

  • Join date: Jan 2020
  • Posts: 24
Re: PSX ATC Text
« Reply #18 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  ;)

flyer605

  • Join date: Jan 2020
  • Posts: 24
Re: PSX ATC Text
« Reply #19 on: Mon, 20 Jul 2020 07:55 »
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  :)