From 9562cd9618ec0fed998bdd73759f79a8ba03adeb Mon Sep 17 00:00:00 2001 From: Joe Prochazka Date: Wed, 23 Dec 2015 00:50:29 -0500 Subject: [PATCH 1/3] Script now downloads heywhatsthat.com JSON. --- bash/decoders/dump1090-mutability.sh | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/bash/decoders/dump1090-mutability.sh b/bash/decoders/dump1090-mutability.sh index 540d253..8093d98 100644 --- a/bash/decoders/dump1090-mutability.sh +++ b/bash/decoders/dump1090-mutability.sh @@ -149,6 +149,49 @@ echo "Startng dump1090-mutability..." echo -e "\033[37m" sudo /etc/init.d/dump1090-mutability start +## HEYWHATSTHAT.COM TERRAIN LIMIT RINGS + +echo -e "\033[33m" +echo "Dump1090-mutability is able to display terrain limit rings using data obtained." +echo "from the website http://www.heywhatsthat.com. Some work will be required on your" +echo "part including visiting http://www.heywhatsthat.com and generating a new" +echo "panorama set to your location." +echo -e "\033[37m" +read -p "Do you wish to add terrain limit rings to the dump1090 map?" ADDTERRAINRINGS + +if [[ $ADDTERRAINRINGS =~ ^[Yy]$ ]]; then + echo -e "\033[33m" + echo "READ THE FOLLOWING INSTRUCTION CAREFULLY!" + echo "" + echo -e "\033[33m" + echo "To set up terrain limit rings you will need to first generate a panorama on the website" + echo "heywhatsthat.com. To do so visit the following URL:" + echo "" + echo " http://www.heywhatsthat.com" + echo "" + echo "Once the webpage has loaded click on the tab titled New panorama. Fill out the required" + echo "information in the form to the left of the map." + echo "" + echo "After submitting the form your request will be put into a queue to be generated shortly." + echo "You will be informed when the generation of your panorama has been completed." + echo "" + echo "Once generated visit your newly created panorama. Near the top left of the page you will" + echo "see a URL displayed which will point you to your newly created panorama. Within this URL's" + echo "query string you will see ?view=XXXXXXXX where XXXXXXXX is the identifier for this panorama." + echo "Enter below the letters and numbers making up the view identifier displayed there." + echo "" + echo "Positions for terrain rings for both 10,000 and 40,000 feet will be downloaded by this" + echo "script once the panorama has been generated and you are ready to continue." + echo -e "\033[37m" + read -p "Your heywhatsthat.com view identifier: " HEYWHATSTHATVIEWID + + # Download the generated panoramas JSON data. + echo -e "\033[33m" + echo "Downloading JSON data pertaining to the panorama ID you supplied..." + echo -e "\033[37m" + sudo wget -O /usr/share/dump1090-mutability/html/upintheair.json 'http://www.heywhatsthat.com/api/upintheair.json?view=${HEYWHATSTHATVIEWID}&refraction=0.25&alts=3048,12192' +fi + ## DISPLAY MESSAGE STATING DUMP1090-MUTABILITY SETUP IS COMPLETE echo -e "\033[33m" From da9a0ceeadeab89f94e0e02b65747d8e0a1efd90 Mon Sep 17 00:00:00 2001 From: Joe Prochazka Date: Wed, 23 Dec 2015 01:18:51 -0500 Subject: [PATCH 2/3] Flipped around [Y/n] options. --- bash/decoders/dump1090-mutability.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 bash/decoders/dump1090-mutability.sh diff --git a/bash/decoders/dump1090-mutability.sh b/bash/decoders/dump1090-mutability.sh old mode 100644 new mode 100755 index 8093d98..15ba9a4 --- a/bash/decoders/dump1090-mutability.sh +++ b/bash/decoders/dump1090-mutability.sh @@ -157,10 +157,10 @@ echo "from the website http://www.heywhatsthat.com. Some work will be required o echo "part including visiting http://www.heywhatsthat.com and generating a new" echo "panorama set to your location." echo -e "\033[37m" -read -p "Do you wish to add terrain limit rings to the dump1090 map?" ADDTERRAINRINGS +read -p "Do you wish to add terrain limit rings to the dump1090 map? [Y/n] " ADDTERRAINRINGS -if [[ $ADDTERRAINRINGS =~ ^[Yy]$ ]]; then - echo -e "\033[33m" +if [[ ! $ADDTERRAINRINGS =~ ^[Nn]$ ]]; then + echo -e "\033[31m" echo "READ THE FOLLOWING INSTRUCTION CAREFULLY!" echo "" echo -e "\033[33m" @@ -189,7 +189,7 @@ if [[ $ADDTERRAINRINGS =~ ^[Yy]$ ]]; then echo -e "\033[33m" echo "Downloading JSON data pertaining to the panorama ID you supplied..." echo -e "\033[37m" - sudo wget -O /usr/share/dump1090-mutability/html/upintheair.json 'http://www.heywhatsthat.com/api/upintheair.json?view=${HEYWHATSTHATVIEWID}&refraction=0.25&alts=3048,12192' + sudo wget -O /usr/share/dump1090-mutability/html/upintheair.json http://www.heywhatsthat.com/api/upintheair.json?view=${HEYWHATSTHATVIEWID}&refraction=0.25&alts=3048,12192 fi ## DISPLAY MESSAGE STATING DUMP1090-MUTABILITY SETUP IS COMPLETE From 9551e2244c3b17a5ffd8dfa0a7696189802559d2 Mon Sep 17 00:00:00 2001 From: Joe Prochazka Date: Wed, 23 Dec 2015 02:01:35 -0500 Subject: [PATCH 3/3] Dump1090 map able to display terrain limits. --- bash/decoders/dump1090-mutability.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/decoders/dump1090-mutability.sh b/bash/decoders/dump1090-mutability.sh index 15ba9a4..eb463fc 100755 --- a/bash/decoders/dump1090-mutability.sh +++ b/bash/decoders/dump1090-mutability.sh @@ -189,7 +189,7 @@ if [[ ! $ADDTERRAINRINGS =~ ^[Nn]$ ]]; then echo -e "\033[33m" echo "Downloading JSON data pertaining to the panorama ID you supplied..." echo -e "\033[37m" - sudo wget -O /usr/share/dump1090-mutability/html/upintheair.json http://www.heywhatsthat.com/api/upintheair.json?view=${HEYWHATSTHATVIEWID}&refraction=0.25&alts=3048,12192 + sudo wget -O /usr/share/dump1090-mutability/html/upintheair.json "http://www.heywhatsthat.com/api/upintheair.json?id=${HEYWHATSTHATVIEWID}&refraction=0.25&alts=3048,12192" fi ## DISPLAY MESSAGE STATING DUMP1090-MUTABILITY SETUP IS COMPLETE