Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,25 @@
Project: HamSCI Personal Space Weather Station Dashboard Development
"""

import glob
import os

from flask import Flask
from pymongo import MongoClient
from dotenv import load_dotenv


def _cleanup_tmp_files():
"""Delete any stale .in/.out files left in itu_r_hf/tmp from a prior crashed run."""
tmp_dir = os.path.join(os.path.dirname(__file__), 'itu_r_hf', 'tmp')
for pattern in ('*.in', '*.out'):
for path in glob.glob(os.path.join(tmp_dir, pattern)):
try:
os.remove(path)
except OSError:
pass


def create_app():
"""
Flask application factory.
Expand Down Expand Up @@ -79,4 +91,7 @@ def create_app():
from routes import register_blueprints
register_blueprints(app)

# --- Clean up stale ITU-R HF tmp files from any prior crashed runs ---
_cleanup_tmp_files()

return app
417 changes: 417 additions & 0 deletions docs/CLAUDE.md

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions itu_r_hf/ITURHFProp/Bin/1-5-85.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
PathName "Test case ID 1: Year 85 Month 5"
PathTXName "LUXEMBURG"
Path.L_tx.lat 49.6666666667
Path.L_tx.lng 6.31666666667
TXAntFilePath "ISOTROPIC"
TXGOS 0.0
TXBearing 106.868
PathRXName "BOCKHACKEN"
Path.L_rx.lat 51.1166666667
Path.L_rx.lng 7.26666666667
RXAntFilePath "ISOTROPIC"
RXGOS 0.0
RXBearing 43.666
AntennaOrientation "MANUAL"
Path.year 1985
Path.month 5
Path.hour 20
Path.SSN 18
Path.frequency 6.1
Path.txpower 0.0
Path.BW 1000.0
Path.SNRr 10.0
Path.SNRXXp 10
Path.ManMadeNoise "RURAL"
Path.Modulation "ANALOG"
Path.SIRr 23.76
Path.A 0.0
Path.TW 0.0
Path.FW 0.0
Path.T0 0.0
Path.F0 0.0
Path.SorL "SHORTPATH"
\\RptFileFormat "RPT_E | RPT_PR | RPT_RXLOCATION | RPT_D | RPT_SNRXX | RPT_OCR | RPT_OCRS"
\\RptFileFormat "RPT_ALL"
RptFileFormat "RPT_NOISESOURCESD | RPT_NOISESOURCES | RPT_NOISETOTALD | RPT_NOISETOTAL"
LL.lat 51.1166666667
LL.lng 7.26666666667
LR.lat 51.1166666667
LR.lng 7.26666666667
UL.lat 51.1166666667
UL.lng 7.26666666667
UR.lat 51.1166666667
UR.lng 7.26666666667
latinc 1.0
lnginc 1.0
DataFilePath "../Data/"

85 changes: 85 additions & 0 deletions itu_r_hf/ITURHFProp/Bin/1-5-85.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---------------------------------------------------------------------------
International Telecommunications Union - Radiocommunication Sector (ITU-R)
ITURHFProp Ver May 18 2024
HF Model (P533) Ver 14.2
Noise Model (P372) Ver 14.3
Analysis Prepared Sat May 18 13:43:21 2024

---------------------------------------------------------------------------

***************************** P533 Input Parameters ****************************

Test case ID 1: Year 85 Month 5
Year : 1985
Month : May
Hour : 20 (hour UTC)
SSN (R12) : 18
Distance : 174.728941 (km)
dmax : 4000.000000 (km)
Tx power : 0.000000
Tx Location LUXEMBURG
Tx latitude : 49.666667 N
Tx longitude : 6.316667 E
Rx Location BOCKHACKEN
Rx latitude : 51.116667 N
Rx longitude : 7.266667 E
local time Rx : 20 (hour UTC)
local time Tx : 20 (hour UTC)
Frequency : 6.100000
Bandwidth : 1000.000000
Modulation : ANALOG
Required signal-to-noise ratio : 10.000000
Required % of month signal-to-noise ratio : 10
Required signal-to-interference ratio : 23.760000
Man-made noise : RURAL
Antenna configuration : User determined
Path Direction : SHORTPATH
Transmit antenna ISOTROPIC
Transmit antenna bearing : 106.868000
Transmit antenna gain offset : 0.000000
Receive antenna ISOTROPIC
Receive antenna bearing : 43.666000
Receive antenna gain offset : 0.000000

************************ End P533 Input Parameters *****************************

************************** ITURHFP Input Parameters *****************************

Upper left (North West) latitude : 51.116667 N
Upper left (North West) longitude : 7.266667 E
Lower right (South East) latitude : 51.116667 N
Lower right (South East) longitude : 7.266667 E
Number of frequencies : 1
Number of hours : 1
Number of months : 1
Latitude increment : 1.000000 (deg)
Longitude increment : 1.000000 (deg)

************************** ITURHFP Input Parameters *****************************

******************************** Data Format ***********************************

Column 01: Month
Column 02: Hour
Column 03: Frequency (MHz)
Column 04: FaA - Atmospheric noise (dB)
Column 05: FaM - Man-made noise (dB)
Column 06: FaG - Galactic noise (dB)
Column 07: DuA - Upper decile deviation of atmospheric noise (dB)
Column 08: DlA - Lower decile deviation of atmospheric noise (dB)
Column 09: DuM - Upper decile deviation of man-made noise (dB)
Column 10: DlM - Lower decile deviation of man-made noise (dB)
Column 11: DuG - Upper decile deviation of atmospheric noise (dB)
Column 12: DlG - Lower decile deviation of atmospheric noise (dB)
Column 13: DuT - Upper decile deviation of total noise (dB)
Column 14: DlT - Lower decile deviation of total noise (dB)
Column 15: FamT - Total noise (dB)

************************** End Data Format ********************************

************************ Calculated Parameters ****************************

05, 20, 6.100, 49.90, 45.45, 33.94, 8.74, 7.91, 9.20, 4.60, 2.00, 2.00, 7.92, 7.31, 51.31

**************************End Calculated Parameters ***********************

43 changes: 43 additions & 0 deletions itu_r_hf/ITURHFProp/Bin/1-5-85_01.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
PathName "Test case ID 1: Year 85 Month 5"
PathTXName "LUXEMBURG"
Path.L_tx.lat 49.6666666667
Path.L_tx.lng 6.31666666667
TXAntFilePath "ISOTROPIC"
TXGOS 0.0
TXBearing 106.868
PathRXName "BOCKHACKEN"
Path.L_rx.lat 51.1166666667
Path.L_rx.lng 7.26666666667
RXAntFilePath "ISOTROPIC"
RXGOS 0.0
RXBearing 43.666
AntennaOrientation "MANUAL"
Path.year 1985
Path.month 5
Path.hour 20
Path.SSN 18
Path.frequency 6.1
Path.txpower 0.0
Path.BW 1000.0
Path.SNRr 10.0
Path.SNRXXp 10
Path.ManMadeNoise "RURAL"
Path.Modulation "ANALOG"
Path.SIRr 23.76
Path.A 0.0
Path.TW 0.0
Path.FW 0.0
Path.T0 0.0
Path.F0 0.0
Path.SorL "SHORTPATH"
RptFilePath "C:\Users\behm\Documents\GitHub\GitHf\Reports\"
\\RptFileFormat "RPT_E | RPT_PR | RPT_RXLOCATION | RPT_D | RPT_SNRXX | RPT_OCR | RPT_OCRS"
\\RptFileFormat "RPT_ALL"
RptFileFormat "RPT_NOISESOURCESD | RPT_NOISESOURCES | RPT_NOISETOTALD | RPT_NOISETOTAL"
SE.lat 51.1166666667
SE.lng 7.26666666667
NW.lat 51.1166666667
NW.lng 7.26666666667
latinc 1.0
lnginc 1.0
DataFilePath "../Data/"
85 changes: 85 additions & 0 deletions itu_r_hf/ITURHFProp/Bin/1-5-85_01.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---------------------------------------------------------------------------
International Telecommunications Union - Radiocommunication Sector (ITU-R)
ITURHFProp Ver May 18 2024
HF Model (P533) Ver 14.2
Noise Model (P372) Ver 14.3
Analysis Prepared Sat May 18 13:43:22 2024

---------------------------------------------------------------------------

***************************** P533 Input Parameters ****************************

Test case ID 1: Year 85 Month 5
Year : 1985
Month : May
Hour : 20 (hour UTC)
SSN (R12) : 18
Distance : 174.728941 (km)
dmax : 4000.000000 (km)
Tx power : 0.000000
Tx Location LUXEMBURG
Tx latitude : 49.666667 N
Tx longitude : 6.316667 E
Rx Location BOCKHACKEN
Rx latitude : 51.116667 N
Rx longitude : 7.266667 E
local time Rx : 20 (hour UTC)
local time Tx : 20 (hour UTC)
Frequency : 6.100000
Bandwidth : 1000.000000
Modulation : ANALOG
Required signal-to-noise ratio : 10.000000
Required % of month signal-to-noise ratio : 10
Required signal-to-interference ratio : 23.760000
Man-made noise : RURAL
Antenna configuration : User determined
Path Direction : SHORTPATH
Transmit antenna ISOTROPIC
Transmit antenna bearing : 106.868000
Transmit antenna gain offset : 0.000000
Receive antenna ISOTROPIC
Receive antenna bearing : 43.666000
Receive antenna gain offset : 0.000000

************************ End P533 Input Parameters *****************************

************************** ITURHFP Input Parameters *****************************

Upper left (North West) latitude : 51.116667 N
Upper left (North West) longitude : 7.266667 E
Lower right (South East) latitude : 51.116667 N
Lower right (South East) longitude : 7.266667 E
Number of frequencies : 1
Number of hours : 1
Number of months : 1
Latitude increment : 1.000000 (deg)
Longitude increment : 1.000000 (deg)

************************** ITURHFP Input Parameters *****************************

******************************** Data Format ***********************************

Column 01: Month
Column 02: Hour
Column 03: Frequency (MHz)
Column 04: FaA - Atmospheric noise (dB)
Column 05: FaM - Man-made noise (dB)
Column 06: FaG - Galactic noise (dB)
Column 07: DuA - Upper decile deviation of atmospheric noise (dB)
Column 08: DlA - Lower decile deviation of atmospheric noise (dB)
Column 09: DuM - Upper decile deviation of man-made noise (dB)
Column 10: DlM - Lower decile deviation of man-made noise (dB)
Column 11: DuG - Upper decile deviation of atmospheric noise (dB)
Column 12: DlG - Lower decile deviation of atmospheric noise (dB)
Column 13: DuT - Upper decile deviation of total noise (dB)
Column 14: DlT - Lower decile deviation of total noise (dB)
Column 15: FamT - Total noise (dB)

************************** End Data Format ********************************

************************ Calculated Parameters ****************************

05, 20, 6.100, 49.90, 45.45, 33.94, 8.74, 7.91, 9.20, 4.60, 2.00, 2.00, 7.92, 7.31, 51.31

**************************End Calculated Parameters ***********************

47 changes: 47 additions & 0 deletions itu_r_hf/ITURHFProp/Bin/1-8-84.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
PathName "Test case ID 1: Year 84 Month 8"
PathTXName "LUXEMBURG"
Path.L_tx.lat 49.6666666667
Path.L_tx.lng 6.31666666667
TXAntFilePath "ISOTROPIC"
TXGOS 0.0
PathRXName "BOCKHACKEN"
Path.L_rx.lat 51.1166666667
Path.L_rx.lng 7.26666666667
RXAntFilePath "ISOTROPIC"
RXGOS 0.0
AntennaOrientation "ARBITRARY"
TXBearing 0.0
RXBearing 0.0
Path.year 1984
Path.month 8
Path.hour 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
Path.SSN 37
Path.frequency 6.1
Path.txpower 0.0
Path.BW 1000.0
Path.SNRr 10.0
Path.SNRXXp 10
Path.ManMadeNoise "RURAL"
Path.Modulation "ANALOG"
Path.SIRr 23.76
Path.SNRXXp 50.0
Path.A 0.0
Path.TW 0.0
Path.FW 0.0
Path.T0 0.0
Path.F0 0.0
Path.SorL "SHORTPATH"
RptFilePath "Reports/"
RptFileFormat = "RPT_E | RPT_PR | RPT_RXLOCATION | RPT_D | RPT_NOISESOURCES | RPT_NOISESOURCESD | RPT_NOISETOTALD | RPT_NOISETOTAL"
LL.lat 51.1166666667
LL.lng 7.26666666667
LR.lat 51.1166666667
LR.lng 7.26666666667
UL.lat 51.1166666667
UL.lng 7.26666666667
UR.lat 51.1166666667
UR.lng 7.26666666667
latinc 1.0
lnginc 1.0
DataFilePath "../Data/"

Loading