Research Article

Autonomic Obstacle Detection and Avoidance in MANETs Driven by Cartography Enhanced OLSR

Algorithm 3

Concave hull construction step.
Require:
    : list of points retained after the filtering step.
    : the threshold based on which we decided to dig or not into the encountered concavities.
Ensure: ConcaveHullEdges: a List containing the edges forming the built concave hull of .
()    ConvexHullPoints BuildConvexHull()         ▹  build the points list forming the convex hull that
      encompasses scatterplot using the well known Jarvis March algorithm
()    ConvexHullEdges: list
()    for  (; ≤ ConvexHullPoints.size; )  do ▹  convert ConvexHullPoints to a list of edges
()        mod ConvexHullPoints.size
()       Point  env[]
()       Point  env[]
()       Edge ()
()       ConvexHullEdges.pushBack()
()    end for
() ConcaveHullEdges  ConvexHullEdges
()   − ConvexHullPoints
() for each  edge   in  ConvexHullEdges  do
()    FindNearestInnerPointToEdge()
         ▹   is the nearest point of to such as neither of neighbour edges of is closer to than
()    if  ( exists)  then
()    length of the edge     ▹    =  euclidianDistance(.ext1, .ext2)
()   decisionDistance distanceToEdge(, )
()   if  ((/decisionDistance) > )  then
()       insert new edges (.ext1, ) and (.ext2, ) into the tail of ConcaveHullEdges
()      delete the edge from the ConcaveHullEdges
()                      ▹  delete from
()   end if
()    end if
() end for
() Return  ConcaveHullEdges