class  Trilaterate(FloodingUpdate):
def  initiator_condition(self, node):
  return  node.memory[self.truePositionKey] is not  None
def  initiator_data(self, node):
  return  node.memory[self.hopsizeKey]
def  handle_flood_message(self, node, message):
  if  node.memory.has_key(self.hopsizeKey):
   return  None
  node.memory[self.hopsizeKey] = message.data
  self.estimate_position(node)
  return  node.memory[self.hopsizeKey]
Listing 3: APS DV-hop 2nd phase: trilaterate. Function estimate_position is omitted.