SHARE_LOCATION=`uci get gluon-node-info.@location[0].share_location`
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
if[$SHARE_LOCATION-eq 1 ];then
Ceck_geocoordinate $GLUON_LAT
echo"Schare location 1"
if[$?-eq 1 ];then
GLUON_LAT=`uci get gluon-node-info.@location[0].latitude`
return 1
GLUON_LON=`uci get gluon-node-info.@location[0].longitude`
fi
# 1. Prüfe auf reine zahlen && die zahlenlänge
Ceck_geocoordinate $GLUON_LON
if echo$GLUON_LAT | grep-E"^[0-9]+(\.[0-9]+)?$">> /dev/null
if[$?-eq 1 ];then
then
return 1
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
fi
else
# Ceck_geocoordinate $GLUON_LAT
return 1
fi
fi
return 0
return 1
}
}
Get_geolocation_info
# Hol sich die geo position durch die Triangulation