Skip to main content
. 2022 Nov 22;22(23):9032. doi: 10.3390/s22239032
Algorithm 1 Algorithm.
  • 1:

    procedureBuilding

  • 2:

       parametersinitial value

  • 3:

       mapgeomagneticmap

  • 4:

       stepDatatrajectorydata

  • 5:

    end procedure

  • 6:

    procedureMatching

  • 7:

       using geomagnetic threshold

  • 8:

       if stepData[current].magnet not in map then return false

  • 9:

       end if

      return P1 possible position area

  • 10:

    end procedure

  • 11:

    procedureFiltering

  • 12:

       Input past trajectory

  • 13:

       Output smooth trajectory, prediction

  • 14:

    end procedure

  • 15:

    procedureMotion model

  • 16:

       for step in stepData do

  • 17:

         using angle, speed in previous steps, add uncertainty

  • 18:

         if prediction positions by inference not in P1 then return false

  • 19:

         end if

      return P2 intersection of prediction and P1

  • 20:

       end for

  • 21:

    end procedure

  • 22:

    procedureHandling outlier positions and error

  • 23:

       Input each trajectories, estimation points

  • 24:

       Output trajectory, point by correction

  • 25:

    end procedure

  • 26:

    procedureEvaluation

  • 27:

       Compute euclidean metric between test path and train, using DTW to compare trajectory

  • 28:

       Compute euclidean metric of final position

  • 29:

    end procedure