From d5597263808b00fa833d4400c8023f23c5455291 Mon Sep 17 00:00:00 2001 From: "[Harper Innes]" <[harper@whisper.cat]> Date: Fri, 6 Oct 2023 14:59:15 +1100 Subject: [PATCH] Added Scripts for Radio-Weather --- conditions.sh | 134 +++++++++++++++++++++++++++++++++++++ scripts/coronal-holes.sh | 6 ++ scripts/foF2.sh | 6 ++ scripts/global-drap.sh | 6 ++ scripts/muf.sh | 6 ++ scripts/north-pole-drap.sh | 6 ++ scripts/solar-flares.sh | 6 ++ scripts/south-pole-drap.sh | 7 ++ scripts/sunspot-regions.sh | 6 ++ 9 files changed, 183 insertions(+) create mode 100755 conditions.sh create mode 100644 scripts/coronal-holes.sh create mode 100755 scripts/foF2.sh create mode 100755 scripts/global-drap.sh create mode 100755 scripts/muf.sh create mode 100755 scripts/north-pole-drap.sh create mode 100644 scripts/solar-flares.sh create mode 100755 scripts/south-pole-drap.sh create mode 100644 scripts/sunspot-regions.sh diff --git a/conditions.sh b/conditions.sh new file mode 100755 index 0000000..7c79711 --- /dev/null +++ b/conditions.sh @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +### +# Variables +### +### +#TimeOfDay=$(date +%Y-%m-%d-%T) +# + +while [ ! $# -eq 0 ] +do + case "$1" in + --help | -h) + echo '------------------------------------------------------------------------------' + echo 'Welcome to the HF Weather Conditions script made by VK1TTY' + echo '------------------------------------------------------------------------------' + echo 'This script requires `ImageMagik` to display the images' + echo 'Please ensure that it is downloaded on your system' + echo '------------------------------------------------------------------------------' + echo 'This script downloads images to your /tmp/ directory' + echo 'and gives them their own directory based on your System Time and Date' + echo 'Example /tmp/Year Month Day Hour Minute_muf' + echo '------------------------------------------------------------------------------' + echo 'This script has a couple of flags shown below.' + echo '------------------------------------------------------------------------------' + echo '-h, --help is the help menu' + echo '------------------------------------------------------------------------------' + echo '-d is for current Global D Region Absorption Predictions' + echo '------------------------------------------------------------------------------' + echo '-np is for the current North Pole D Region Absorption Predictions' + echo '------------------------------------------------------------------------------' + echo '-sp is for the current South Pole D Region Absorption Predictions' + echo '------------------------------------------------------------------------------' + echo '-m is for the Maximum Usable Frequency Map' + echo '------------------------------------------------------------------------------' + echo '-f2 is for the Critical Frequency (foF2) Map. ' + echo 'This one is simpler than MUF' + echo 'it`s the highest frequency that you can use for NVIS ' + echo '(skywave communication "in your own backyard")' + echo '------------------------------------------------------------------------------' + echo '-sr is for the latest Sunspot Regions Image' + echo '------------------------------------------------------------------------------' + echo '-ch is for the latest Coronal Holes Image' + echo '------------------------------------------------------------------------------' + echo '-sf is for the latest Solar Flares Image' + echo '------------------------------------------------------------------------------' + exit 0 +############END OF HELP + ;; + + --drap | -d ) + echo "Getting the latest Global D Region Absorption Prediction Image" + if bash scripts/global-drap.sh; then + echo 'Global DRAP Downloaded' + else + exit 1 + fi + + ;; + + --north | -np ) + echo "Getting the latest North Pole Global D Region Absorption Prediction Image" + if bash scripts/north-pole-drap.sh; then + echo 'Global DRAP map downloaded' + else + exit 1 + fi + + ;; + + --south | -sp ) + echo "Getting the latest South Pole Global D Region Absorption Prediction Image" + if bash scripts/south-pole-drap.sh; then + echo 'South Polar DRAP Image downloaded' + else + exit 1 + fi + + ;; + + --muf | -m ) + echo "Getting the latest Maximum Usable Frequency Image" + if bash scripts/muf.sh; then + echo 'Maximum Usable Frequency Image Downloaded' + else + exit 1 + fi + + ;; + + --fof2 | -f2 ) + echo "Getting the latest Critical Frequency (foF2) Image." + if bash scripts/foF2.sh; then + echo 'foF2 Downloaded' + else + exit 1 + fi + + ;; + + --sunspots | -sr) + echo "Getting the latest Sunspot Regions Image." + if bash scripts/sunspot-regions.sh; then + echo 'Sunspot Region Image Downloaded' + else + exit 1 + fi + + ;; + --coronal | -ch) + echo "Getting the latest Coronal Holes Image." + if bash scripts/coronal-holes.sh; then + echo 'Coronal Holes Image Downloaded' + else + exit 1 + fi + + ;; + + --flares | -sf) + echo "Getting the latest Solar Flares Image." + if bash scripts/solar-flares.sh; then + echo 'Solar Flares Image Downloaded' + else + exit 1 + fi + + ;; + + + esac + shift +done +echo "Script completed" + diff --git a/scripts/coronal-holes.sh b/scripts/coronal-holes.sh new file mode 100644 index 0000000..8fc2c03 --- /dev/null +++ b/scripts/coronal-holes.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +mkdir /tmp/$(date +%Y%m%d_%H%M)_Coronal-Holes +cd /tmp/$(date +%Y%m%d_%H%M)_Coronal-Holes +wget https://sdo.gsfc.nasa.gov/assets/img/latest/latest_1024_0193.jpg +display latest_1024_0193.jpg & +exit 0 \ No newline at end of file diff --git a/scripts/foF2.sh b/scripts/foF2.sh new file mode 100755 index 0000000..ca92250 --- /dev/null +++ b/scripts/foF2.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +mkdir /tmp/$(date +%Y%m%d_%H%M)_foF2 +cd /tmp/$(date +%Y%m%d_%H%M)_foF2 +wget https://prop.kc2g.com/renders/current/fof2-normal-now.svg +display fof2-normal-now.svg & +exit 0 diff --git a/scripts/global-drap.sh b/scripts/global-drap.sh new file mode 100755 index 0000000..a6e5698 --- /dev/null +++ b/scripts/global-drap.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +mkdir /tmp/$(date +%Y%m%d_%H%M)_Global_Drap +cd /tmp/$(date +%Y%m%d_%H%M)_Global_Drap +wget https://services.swpc.noaa.gov/images/animations/d-rap/global/d-rap/latest.png +display latest.png & +exit 0 diff --git a/scripts/muf.sh b/scripts/muf.sh new file mode 100755 index 0000000..d85ab42 --- /dev/null +++ b/scripts/muf.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +mkdir /tmp/$(date +%Y%m%d_%H%M)_muf +cd /tmp/$(date +%Y%m%d_%H%M)_muf +wget https://prop.kc2g.com/renders/current/mufd-normal-now.svg +display mufd-normal-now.svg & +exit 0 \ No newline at end of file diff --git a/scripts/north-pole-drap.sh b/scripts/north-pole-drap.sh new file mode 100755 index 0000000..8971d66 --- /dev/null +++ b/scripts/north-pole-drap.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +mkdir /tmp/$(date +%Y%m%d_%H%M)_North_Pole +cd /tmp/$(date +%Y%m%d_%H%M)_North_Pole +wget https://services.swpc.noaa.gov/images/animations/d-rap/north-pole/d-rap/latest.png +display latest.png & +exit 0 diff --git a/scripts/solar-flares.sh b/scripts/solar-flares.sh new file mode 100644 index 0000000..bf757cb --- /dev/null +++ b/scripts/solar-flares.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +mkdir /tmp/$(date +%Y%m%d_%H%M)_Solar-Flares +cd /tmp/$(date +%Y%m%d_%H%M)_Solar-Flares +wget https://sdo.gsfc.nasa.gov/assets/img/latest/latest_1024_0131.jpg +display latest_1024_0131.jpg & +exit 0 \ No newline at end of file diff --git a/scripts/south-pole-drap.sh b/scripts/south-pole-drap.sh new file mode 100755 index 0000000..4c41e63 --- /dev/null +++ b/scripts/south-pole-drap.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +mkdir /tmp/$(date +%Y%m%d_%H%M)_South_Pole +cd /tmp/$(date +%Y%m%d_%H%M)_South_Pole +wget https://services.swpc.noaa.gov/images/animations/d-rap/south-pole/d-rap/latest.png +display latest.png & +exit 0 + diff --git a/scripts/sunspot-regions.sh b/scripts/sunspot-regions.sh new file mode 100644 index 0000000..d3587af --- /dev/null +++ b/scripts/sunspot-regions.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +mkdir /tmp/$(date +%Y%m%d_%H%M)_Sunspot-Regions +cd /tmp/$(date +%Y%m%d_%H%M)_Sunspot-Regions +wget -U "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" "https://www.spaceweatherlive.com/images/SDO/SDO_HMIIF_1024.jpg" +display SDO_HMIIF_1024.jpg & +exit 0 \ No newline at end of file