Research Article
Monitoring Moving Queries inside a Safe Region
Algorithm 2
Monitoring moving range query algorithm.
(1) /*: query point, : the velocity of and : the Euclidean distance threshold */ | (2) Call Extended Safe Region algorithm to find safe-object list | (3) From the safe-object list, find the closest border () of to | (4) Find the start and end angle of and add them to the table of start and end angle | (5) | (6) for all in the safe-object list do | (7) if intersects with the border of then | (8) should share an angle with | (9) add and its angles to start and end angle table | (10) | (11) else | (12) Ignore this | (13) end if | (14) Exit for, if the table completed 360° degree | (15) end for | (16) Monitoring inside safe region | (17) for all in the start and end angle table do | (18) if then | (19) the curve is convex | (20) | (21) else | (22) the curve is concave | (23) | (24) end if | (25) | (26) | (27) end for | (28) if changes it direction at anytime before crosses any in the start and end angle table | then | (29) go to (17) and use the new position of | (30) end if |
|