OGN - Small fix to altidue derivation test

pull/334/head
romeo-golf 2017-02-12 04:30:06 +00:00
rodzic 59ed73ba91
commit e786872e9d
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -530,8 +530,8 @@ if [[ "${RECEIVER_AUTOMATED_INSTALL}" = "false" ]] ; then
# Ask the user to confirm the receivers altitude, this will be populated with an altutude value derived from the configured LAT/LON.
COMPONENT_ALTITUDE_TITLE="Receiver Altitude"
while [[ -z "${COMPONENT_ALTITUDE}" ]] ; do
if [[ -n "${RECEIVER_LATITUDE}" ]] && [[ -n "${RECEIVER_LONGITUDE}" ]] ; then
COMPONENT_ALTITUDE=$(curl -s https://maps.googleapis.com/maps/api/elevation/json?locations=${RECEIVER_LATITUDE},${RECEIVER_LONGITUDE} | python -c "import json,sys;obj=json.load(sys.stdin);print obj['results'][0]['elevation'];" | awk '{printf("%.2f\n", $1)}')
if [[ -n "${COMPONENT_LATITUDE}" ]] && [[ -n "${COMPONENT_LONGITUDE}" ]] ; then
COMPONENT_ALTITUDE=$(curl -s https://maps.googleapis.com/maps/api/elevation/json?locations=${COMPONENT_LATITUDE},${COMPONENT_LONGITUDE} | python -c "import json,sys;obj=json.load(sys.stdin);print obj['results'][0]['elevation'];" | awk '{printf("%.2f\n", $1)}')
COMPONENT_ALTITUDE_SOURCE=", the below value is obtained from google but should be increased to reflect your antennas height above ground level"
fi
if [[ -n "${COMPONENT_ALTITUDE_SOURCE}" ]] ; then