Skip to main content
. 2019 Mar 9;19(5):1208. doi: 10.3390/s19051208
Algorithm 2: Access point selection for new NAR.
  1. Selection ()

  2. Begin

  3. if new NAR is generated then

  4.  Collect data from body sensor

  5.  Activate patch;

  6.  if ξ = 1 then

  7.   Accept Camera (1);

  8.   Call threshold;

  9. else ifξ > 1 then

  10.   for j = 2; j < ξ

  11.     if  λ(1) > λ(j) then

  12.       Accept Camera (1);

  13.       Set λ(j) = λ(1);

  14.       Set j = j + 1;

  15.     else

  16.       Accept Camera (j);

  17.       Set λ(j) = λ(1);

  18.       Set j = j + 1;

  19.     end if

  20.    end for

  21.    Call threshold (j);

  22.  else

  23.     Accept BLE;

  24.  end if

  25. else

  26. Keep system in idle mode;

  27. end if

  28. End

  29. threshold (x)

  30. Begin

  31. if Γ > Γcrit then

  32.  Accept Camera (x);

  33. else

  34.  Accept BLE;

  35. end if

  36. End