Research Article

A Low-Cost Vehicle Anti-Theft System Using Obsolete Smartphone

Algorithm 1

VA-DR matching.
Require: NSM: select most matched segment candidates within error region;MotionDetect: detect vehicle motions from sensor readings.
Ensure: A sequence of road segment.
(1)if MotionDetect finds Curve then
(2) set a segment ;
(3) call NSM for , get ;
(4)for ; ; do
(5)  calculate velocity of with CurveLength;
(6)  calculate distance of with CurveLength;
(7)  set values;
(8)  if equals then
(9)   return
(10)  end if
(11)end for
(12)else
(13)if MotionDetect finds Two-Turns then
(14)  set a segment ;
(15)  call NSM for , ;
(16)  for ; ; do
(17)   calculate velocity of with Distance
(18)   -BetweenTurns;
(19)   calculate distance of with Distance
(20)   -BetweenTurns;
(21)   set values;
(22)   if equals then
(23)    return
(24)   end if
(25)  end for
(26)end if
(27)else
(28) call NSM to get a most matched ;
(29)end if