Skip to main content
. 2018 Feb 19;18(2):624. doi: 10.3390/s18020624
Algorithm 4 DaaG IoT control decision algorithm.
  • 1:

    enableBeaconing()                       ▹ Run Algorithm 1 in background

  • 2:

    while isDaaGOperating() do

  • 3:

         Δluxmax=0

  • 4:

         smax=0                               ▹ Initialize variables

  • 5:

         collectDataFromSensors()                 ▹ Run Algorithm 2 to collect data

  • 6:

         for siS do

  • 7:

                Δluxi = getIntensityDiff(si)

  • 8:

                if Δluxmax<Δluxi then

  • 9:

                     Δluxmax=Δluxi

  • 10:

                     smax=si

  • 11:

            end if

  • 12:

         end for

  • 13:

         for ajA do

  • 14:

                hj = calculateAcutatorDirection(aj,smax)

  • 15:

         end for

  • 16:

         commandToActuators(H)             ▹ Run Algorithm 3 to control actuators

  • 17:

    end while