|
Algorithm 1 BlueDetect IO detection and localization algorithm (outdoors ⇌ semi-outdoors). |
input: B - Bluetooth signal (iBeacon), G - GPS signal, - switching threshold, - duration threshold
output: Location of the mobile device
case
Outdoor ⇒ Semi-outdoor
if
for
then
Turn on Bluetooth;
if No less than 2 beacons’
then
Turn off GPS;
Utilize B for localization;
Environment Type ← Semi-outdoor
else
Turn off Bluetooth;
Utilize G for localization;
Environment Type ← Outdoor
end
if
end
if
case
Semi-outdoor ⇒ Outdoor
if
then
Turn off Bluetooth, Turn on GPS;
Utilize G for localization;
Environment Type ← Outdoor
else
Utilize B for localization;
Environment Type ← Semi-outdoor
end
if
|