Skip to main content
. 2012 Sep 18;12(9):12772–12797. doi: 10.3390/s120912772
Algorithm 2. Avoid Past Pseudocode.
AvoidingPastAngle = 0;
Evaluate the neighbor waypoints according to current heading angle;
if Neighbor Waypoint at the Center is Free and Unvisited then
AvoidingPastAngle = 0;
else
if Neighbor Waypoint at the Left is Free and Unvisited then
  AvoidingPastAngle = 45;
else
  if Neighbor Waypoint at the Right is Free and Unvisited then
   AvoidingPastAngle = −45;
  else
   AvoidingPastAngle = an angle between −115 and 115 according to visit counts proportions of the left, center and right neighbor waypoints;
  end
end
end
return AvoidingPastAngle;