Skip to main content
. 2016 Feb 22;16(2):268. doi: 10.3390/s16020268
Algorithm 1 BlueDetect IO detection and localization algorithm (outdoors ⇌ semi-outdoors).
  • input: B - Bluetooth signal (iBeacon), G - GPS signal, σs - switching threshold, σt - duration threshold

  • output: Location of the mobile device

  • case Outdoor ⇒ Semi-outdoor

  •     if Gcurrent<σs*Gprevious for σt then

  •         Turn on Bluetooth;

  •         if No less than 2 beacons’ B>Bmin then

  •            Turn off GPS;

  •            Utilize B for localization;

  •            Environment TypeSemi-outdoor

  •         else

  •            Turn off Bluetooth;

  •            Utilize G for localization;

  •            Environment TypeOutdoor

  •         end if

  •     end if

  • case Semi-outdoor ⇒ Outdoor

  •     if BBboundary then

  •         Turn off Bluetooth, Turn on GPS;

  •         Utilize G for localization;

  •         Environment TypeOutdoor

  •     else

  •         Utilize B for localization;

  •         Environment TypeSemi-outdoor

  •     end if