WxToMG control script

Dear all

for whose who are interested in controling wfview from WxToIMG, I’ve written a python script to do this. Here is the full tutorial to do this :

  1. Install python on your computer using standard options and enable the path to be added in the environment variables

  2. in WxToIMG directory (under windows it shall be C:\Program Files (x86)\WXtoImg),
    create a new wxctl.bat file with a notepad with the following code:
    Change the paths to whatever suits you

@echo off

:: Get current time
set datetime=%date% %time%

:: log file path
set logfile=C:\wxtoimg_logs\wxctl.log

:: Check if directory exists otherwise create it
if not exist C:\wxtoimg_logs (
    mkdir C:\wxtoimg_logs

:: Add a message giving the tracked satellite with frequency and the COM port used
echo %datetime% - Satellite: %1, Fréquence: %2, Port: %3 >> %logfile%

:: Call the python script with these last parameters
python C:\Program Files (x86)\WXtoImg\wxctl.py %1 %2 %3 >> %logfile% 2>&1
  1. still in wxtoimg directory add a new file called wxctl.py with the following code:
import sys
import socket

# Get the parameters from WXTOIMG
satellite_name = sys.argv[1]
frequency = sys.argv[2]
control_port = sys.argv[3]

# If no satellite is selected then we do nothing
if satellite_name == "" and frequency == "0.00":
    print("No selectes satellite, no frequency to program.")
else:
    # Else convert frequency in Hz for wfview
    frequency_hz = float(frequency) * 1e6
    print(f"Frequency : {frequency_hz} Hz")

    # Connect  wfview via TCP server
    try:
        # wfview server parameters
        wfview_host = "localhost"  # To replace by wfview IP Address if not on the same computer
        wfview_port = 4532  # Port set in wfview

        # Connect wfview TCP server
        print(f"Connexion to wfview on: {wfview_host}:{wfview_port}")
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
            s.connect((wfview_host, wfview_port))

            # Command to program the frequency
            cmd = f"F {int(frequency_hz)}\n"
            print(f"Command : {cmd}")
            s.sendall(cmd.encode('utf-8'))

            # Read wfview response
            response = s.recv(1024).decode('utf-8')
            print("wfview response :", response)

    except Exception as e:
        print(f"Error when connecting wfview : {e}")
  1. in wfview, go to ‘settings\External Control’ tab and:

    • enable the RigCtld
    • change the port to 4532
    • select an available virtual serial port
    • change the TCP server port to 4532
  2. in wxtoimg go to menu ‘options\recording options’ and in receiver type select ‘External (wxctl)’ and select the COM port to match the one from wfview.

… and enjoy having now all the satellites acquired rather than beeing stuck on one.

1 Like

Hi Stephane,

This is great! Thank you for sending it.

Which satellites and what radio have you tried this with?

I wanted to do the APT images but of course the 9700 will not tune there. And I was not clear as to if the 8600 has wide enough bandwidth.

73,

–E
de W6EL

I just want the python script so I can control my iCOM 7300. :slight_smile:

This is brilliant.

Now I can do things like:

  1. Have my radio tune to a specific net at a specific time<----    very cool
    
  2. Satellite tracking<------- also cool
    
  3. Automatic scanning of a band and stop at a signal level >  S5 or S6       etc
    

Also see here for a script that will sync two rigctld-compatible programs (such as gqrx and wfview):

–E
de W6EL

Cool
Im using rtl_tcp now with an NOOELEC RTL_SDR dongle and a remote laptop. And I have the SDR program “SDR-Angel” running on the local laptop. works pretty good

I’ve tested successfully with NOAA 15, 18 and 19 on 137 MHz band. it would work as well for all the sats supported in wxtoimg (METEOR for whose still transmitting in APT).

I’m using wfview with my IC-R8600. I’ve a IC-R9700 in my radioclub. I know by default it covers only ham bands but I’m sure this can be unlocked for other bands as well. I will check for the specific case of the 9700. There is also the bandwidth to set at minimum of 30 kHz to get nice images. Not sure the 9700 is able to. I will check

So actually any receiver supported by wfview will work if the receiver is able to receive 137 MHz with 30 kHz bandwidth of course. I will improve the logging file format so that it’s more clear for the reading, just a bit of polishing.

Of course you also have to update the NOAA frequencies in wxtoimg to the current ones in use. By the way, despite I set 137.9125 for one of the sats in wxtoimg it seems it rounds it to 137.9100. It’s not a big deal but still.

Also would be nice to have the doppler compensated even if I don’t think this is really mandatory. I actually have an idea on how to do that but this is much more complex. and I’m currently receiving nice pics without doing anything more than that.

let’s see if this is enough as it is right now.

Here is an image from NOAA 19 from yesterday, using IC-R8600 with a discone antenna on the roof, 30m of coaxial cable and without any amplifier. The noisy areas are because the discone antenna has its hemispheric lobe is pretty bad. It’s intended for terrestrial comms, not spatial. So strangely enough I get best results when the sat is not too high above the horizon (elevation < 50-60 °) which actually is normal.

one of the benefits of wxtoimg is that it can ‘compose’ images from several passes to generate images of larger areas. If I remember well the sats passes are shifted by 15° on longitude and usually you can get 3 passes from your location, every 90 minutes

below is a composite image from 3 passes but one of the pass the receiver was not connected so no image. But 2 of them have been correctly used :slight_smile:

1 Like

That looks great.

The 9700 cannot go outside the band nor can it do more than about 5 KHz usable FM bandwidth. But that is fine, it does what it does very well!

I did not realize the 8600 could do enough receive bandwidth. Suddenly I need one…

–E
de W6EL

@stephman So the NOAA signal at 137.9125 is it BPSK? QPSK? and whats the data rate?
This is interesting.

“The noisy areas are because the discone antenna has its hemispheric lobe is pretty bad. It’s intended for terrestrial comms, not spatial”

Isn’t the transmission from NOAA a Right-Hand Circularly Polarized signal. So an RHCP antenna as a receive antenna would work best? Yes?

Dan
W6DKW

Hi Dan,

You’re right, NOAA APT signals are RHCP and thus would require a circular polarization antenna for best results. Omnidirectional antennas with circular polarization could be QFH antenna that one can build from local store materials as well as turnstile or double-cross. This will provide very good results. However having an horizontal or vertical polar antenna will lead to 3dB losses ‘only’. Half a s-meter point which is not a big deal. The lobe shape is actually the most important part to get decent signals from horizon to zenith.

I had actually in mind to build a QFH since years but available time is invert proportional to the number of things to do ! I’m currently working with one of my club member to build a small mesh dish (1.2m which is about 3.5 ft I guess) for L-band that will require tracking the sats. This will enable reception of HRPT images. the feed is a LHCP helix.

Stephane

Hi Elliott,

few searches on the web and apparently indeed the IC-9700 can’t be unlocked for 137 MHz band, without talking about the IF bandwidth. A pity.

I’ve owned many many wideband receivers over the years (IC-R7000, 7100, 9000, 9500 and now 8600 and AOR AR3000-5000 in particular and have to say the two which are from far the best I had are the R8600 and AOR AR5000.
Both can be found at a “reasonable” second hand price. I bought my 8600 here in France for 1600 euros which is almost the same in USD nowadays. Definitely not nothing but reasonable in the sense of what offers the market currently. The 8600 can really tune anything and I do admit this is the last rig I would sell if I had to. It’s not perfect from an ergonomy point of view but it’s anyway the most versatile I had.
Additionnally with wfview and it TCP server mode this enable to connect the receiver from anywhere. It happens time to time I connect it from my office computer and run some decoding software locally with the remote receiver connected. Nice !

AR5000 can be found at 500 euros also but are becoming rare in second hand. AR5000 ergonomy is not great but with a good CAT software and a SDR on its 10.7 MHz output it becomes a very performant and ergonomic wideband receiver. I would love having wfview able to connect the AR5000 as well. I still have one as well.

Stephane

there was a small typo in the batchfile, a missing parenthesis.
here is the corrected version