From 5e9fb78138a45be699757426cadd25f849cd5e6d Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 6 Aug 2021 14:43:23 +0200 Subject: [PATCH] upintheair simplifications --- README.md | 10 +++++++++- getupintheair.sh | 22 ++++++++++++++++++++++ install.sh | 2 +- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100755 getupintheair.sh diff --git a/README.md b/README.md index 430f20d..bb9099b 100644 --- a/README.md +++ b/README.md @@ -298,12 +298,20 @@ To judge the actual range (/?pTracks, see next chapter), one needs to first know - Near the top of the page, an URL for the panorama is mentioned. - Replace the XXXXXX in the following command with the ID contained in your panorama URL, then run the command on your pi: ``` -sudo wget -nv -O /usr/local/share/tar1090/html/upintheair.json "http://www.heywhatsthat.com/api/upintheair.json?id=XXXXXXXX&refraction=0.25&alts=12192" +sudo /usr/local/share/tar1090/getupintheair.sh XXXXX ``` - You should now have a range outline for the theoretical range for aircraft at 40000 ft on your tar1090 map - It might be interesting to compare to http://192.168.x.yy/tar1090/?pTracks which will by default will display the last 8 hours of traces. +- More options for loading multiple outlines and for a different instance +``` +# load two outlines, 10000 ft and 40000 ft +sudo /usr/local/share/tar1090/getupintheair.sh XXXXX 3048,12192 +# load a 10000 ft outline for the tar1090 instance located at /978 +sudo /usr/local/share/tar1090/getupintheair.sh XXXXX 3048 978 +``` + ## /tar1090/?pTracks ![Screenshot2](https://raw.githubusercontent.com/wiedehopf/tar1090/screenshots/screenshot4.png) diff --git a/getupintheair.sh b/getupintheair.sh new file mode 100755 index 0000000..42b51f2 --- /dev/null +++ b/getupintheair.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +ID="$1" + +if [[ -z $1 ]]; then + echo "no ID supplied" + exit +fi + +ALTS="12192" +if [[ -n $2 ]]; then + ALTS="$2" +fi + +instance=tar1090 +if [[ -n $3 ]]; then + instance="tar1090-$3" +fi + + +wget -nv -O "/usr/local/share/${instance}/html/upintheair.json" "http://www.heywhatsthat.com/api/upintheair.json?id=${ID}&refraction=0.25&alts=${ALTS}" + diff --git a/install.sh b/install.sh index 93e1d99..caa05c5 100755 --- a/install.sh +++ b/install.sh @@ -187,7 +187,7 @@ fi # copy over base files -cp install.sh uninstall.sh LICENSE README.md $ipath +cp install.sh uninstall.sh getupintheair.sh LICENSE README.md $ipath cp default $ipath/example_config_dont_edit rm -f $ipath/default