itu_predict
If you have ever used VOACAP (Very good, and very useful still today), then I hope you have also found the most excellent site called Proppy which lives at https://soundbytes.asia/proppy/planner.
If you want to have a look at / try / is this for me ... this is the
- Easiest to use
- Least confusing
- Best looking
- And least expensive (it is 100% free)
I really - really like Proppy, I think it is a very good example of Open-Source with a good front end.
But... I was curious as to how it was put together.....
How to run a Proppy like service at home
The Web service Proppy consists of 2 main objects
- ITU Prediction Components
- A Web Front End
I am only going to consider the ITU Prediction Components, as there are many places/ways to wrap 'back-end' components in a Web interface.
Basic Building blocks
The start point should be ITU R Github Source This is a git repo which has the main code. You will need to compile this (it is quite standard) to produce an executable called ITUHFProp.
As I was building this on a Mac (there are no default Mac build instructions) I created a Mac Makefile, which looks like this
prefix ?= /usr/local export prefix mandir = $(prefix)/share/man man1dir = $(mandir)/man1 TOPTARGETS := all clean SUBDIRS := ../P533/Mac/ \ ../P372/Mac/ \ ../ITURHFProp/Mac/ datarootdir = $(prefix)/share datadir = $(datarootdir) $(TOPTARGETS): $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ $(MAKECMDGOALS) .PHONY: $(TOPTARGETS) $(SUBDIRS) install: $(SUBDIRS) install -d $(DESTDIR)$(man1dir) install ITURHFProp.1 $(DESTDIR)$(man1dir) install -d $(DESTDIR)$(datadir)/iturhfprop/data install -m 744 -D ../P372/Data/*.txt $(DESTDIR)$(datadir)/iturhfprop/data install -m 744 -D ../P372/Data/*.bin $(DESTDIR)$(datadir)/iturhfprop/data
It should just be a case of
make -j 4 make install
Sadly at this point - you will need to start findind some reference data files, this actually had me confused for some time - until I carefully ready the following link ITURHFProp SW Projects .
After downloading the required files, and placing them in the correct directory.I was able to use run the ITUHFProp....
But now I need a config/plan for it too execute.
Make/Build/Copy a plan
The easiest way to get an example of a plan, is to go back to the https://soundbytes.asia/proppy/planner
- Select P2P - Source Text - Set to On - Pick your TX/RX etc - Press Run Prediction.
In the lower half of the screen - Input File is the file format that you need.
So copy that and put it into a file say To_US.txt
Then to run your own local prediction
/usr/local/bin/ituhfprop To_US.txt To_US.out
View the Output
The Output file (To_US.out) will look something like this
--------------------------------------------------------------------------- International Telecommunications Union - Radiocommunication Sector (ITU-R) ITURHFProp Ver Jun 11 2022 HF Model (P533) Ver 14.2 Noise Model (P372) Ver 14.3 Analysis Prepared Sun Sep 11 01:18:42 2022 --------------------------------------------------------------------------- ***************************** P533 Input Parameters **************************** Proppy Online HF Circuit Prediction: Point-to-Point Year : 2022 Month : September Hour : 1 (hour UTC) SSN (R12) : 109 Distance : 13159.952929 (km) dmax : 4000.000000 (km) Tx power : 0.000000 Tx Location Transmitter . . . . Data Omitted . . ************************ Calculated Parameters **************************** 09, 01, 2.000, 16.63,-733.70,-616.43, 0.00, 56.8194, 3.7053, -0.1700, 16.6319, 11.0935, 1.5109, 1.5931, 2.1600, 2.1600, 0.9215, -10.5365 09, 01, 3.000, 16.63,-446.87,-325.36, 0.00, 56.8194, 3.7053, -0.1700, 16.6319, 11.0935, 1.5109, 1.5931, 2.1600, 2.1600, 0.9215, -5.4264 09, 01, 4.000, 16.63,-317.88,-193.56, 0.00, 56.8194, 3.7053, -0.1700, 16.6319, 11.0935, 1.5109, 1.5931, 2.1600, 2.1600, 0.9215, -3.1121 09, 01, 5.000, 16.63,-249.86,-123.27, 0.00, 56.8194, 3.7053, -0.1700, 16.6319, 11.0935, 1.5109, 1.5931, 2.1600, 2.1600, 0.9215, -1.8810 09, 01, 6.000, 16.63,-210.36, -81.61, 0.00, 56.8194, 3.7053, -0.1700, 16.6319, 11.0935, 1.5109, 1.5931, 2.1600, 2.1600, 0.9215, -1.1578 09, 01, 7.000, 16.63,-185.98, -55.14, 0.00, 56.8194, 3.7053, -0.1700, 16.6319, 11.0935, 1.5109, 1.5931, 2.1600, 2.1600, 0.9215, -0.7053 09, 01, 8.000, 16.63,-170.42, -37.56, 0.00, 56.8194, 3.7053, -0.1700, 16.6319, 11.0935, 1.5109, 1.5931, 2.1600, 2.1600, 0.9215, -0.4110 09, 01, 9.000, 16.63,-160.37, -25.66, 0.00, 56.8194, 3.7053, -0.1700, 16.6319, 11.0935, 1.5109, 1.5931, 2.1600, 2.1600, 0.9215, -0.2162 . . .Lots more Lines . .
If this is what you see - Great... If there is no output - check the Data File and how you ran the command.
Interpreting the ITUHFProp output
As unpleasant as it looks - this output file is easy to process. Here I will show you how you can accomplish this - but first let us understand what is in this output file.
The Input File (To_US.txt) was a Point to Point format data file, in which we asked to compute the Percentage Path Reliability from a TX Site, to an RX Site, using a specified Power, Antenna (more on this later), for ALL HF Frequencies in 1 Mhz steps, for a Specific Month, and Per Hour !! Phew ... sorry that was so long winded.
We will read the output file using Python.... Like this
import pandas as pd fname='To_Us.out' with open(fname, "rt") as ifp: data = ifp.read().split("\n") rec = [] rec.append( [ "Month", "Hour", "Freq", "Op_MUF", "rx_db", "snr_db", "rel", "fieldstrength_db", "focusstrength_db", "loss_db", "upper_ref_freq", "lower_ref_freq", "corr_tx", "corr_rx", "tx_gain", "rx_gain", "gyro_freq", "scale_factor", ] ) for l in data: parts = l.split(",") if len(parts) == 18: rec.append(parts) df = pd.DataFrame.from_records(rec[1:], columns=rec[0]) df = df.apply(pd.to_numeric)
We now have a DataFrame with just calculated data values.
Let us plot this and make something visual, rather than trying to look at tabular output.
Draw Heat Map of Point to Point output
Using the DataFrame (a variable called df) we can use a small method like this
import plotly.express as px def draw_contest_heat(ctry: str, df: pd.DataFrame): df_heat = ( df.pivot(index="Freq", columns="Hour", values="rel") .reset_index() .set_index("Freq") ) // Limiting the Frequencies to Contest Bands // WARC not included contest = [7, 14, 21, 28] df_contest = df_heat.filter(items=contest, axis=0) fig = px.imshow( df_contest, title=f"{ctry}", labels=dict(x="'Z' Hour", y="Freq (Mhz)", color="Reliabilty"), x=[f"{h}" for h in range(0, 24)], y=[f"{x}Mhz" for x in contest], zmin=0.0, zmax=100.0, aspect="auto", color_continuous_scale=["white", "grey", "blue", "green", "yellow", "red"], text_auto=True, ) fig.update_xaxes(side="top") return fig f=draw_contest_heat('To_US',df) f.write_image(To_US.png")
This will produce something like
Which is a good starting point to know when is a good time to listen for VK stations - clearly showing that 10m/28Mhz is not looking promising.
Further Steps
There are several other types of output you can generate (and then load, and produce a graph for) each one is no more complex that the steps I have just outlined.
Many thanks to the most excellent Proppy site, and it's author James Watson M0DNS.