SHARE_LOCATION=`uci get gluon-node-info.@location[0].share_location`
GLUON_LAT=`uci get gluon-node-info.@location[0].latitude`
GLUON_LON=`uci get gluon-node-info.@location[0].longitude`
if[$SHARE_LOCATION-eq 1 ];then
Ceck_geocoordinate $GLUON_LAT
if[$?-eq 1 ];then
return 1
fi
Ceck_geocoordinate $GLUON_LON
if[$?-eq 1 ];then
return 1
echo"Schare location 1"
GLUON_LAT=`uci get gluon-node-info.@location[0].latitude`
GLUON_LON=`uci get gluon-node-info.@location[0].longitude`
# 1. Prüfe auf reine zahlen && die zahlenlänge
if echo$GLUON_LAT | grep-E"^[0-9]+(\.[0-9]+)?$">> /dev/null
then
echo"Es sind nur zahlen"
if![${#GLUON_LAT} < $SCRIPT_NUM_LENGTH];then
echo"geo ist größer als mindes geo"
# 2. Prüfe warscheinlichkeit
if echo$GLUON_LAT | grep-E"^[0-9]+(\.[0-9]*(0{${SCRIPT_IMPROBABILITY}}|1{${SCRIPT_IMPROBABILITY}}|2{${SCRIPT_IMPROBABILITY}}|3{${SCRIPT_IMPROBABILITY}}|4{${SCRIPT_IMPROBABILITY}}|5{${SCRIPT_IMPROBABILITY}}|6{${SCRIPT_IMPROBABILITY}}|7{${SCRIPT_IMPROBABILITY}}|8{${SCRIPT_IMPROBABILITY}}|9{${SCRIPT_IMPROBABILITY}})[0-9]*)?$">> /dev/null
then
echo"es sind keine x gleichen zahlen beinhaltend"
return 0
fi
fi
fi
else
return 1
# Ceck_geocoordinate $GLUON_LAT
fi
return 0
return 1
}
Get_geolocation_info
if[$?-eq 0 ];then
# Hol sich die geo position durch die Triangulation