Skip to main content

Table 2 MGR-NextHop(POS h , POS t ,T QoS ,Thop): Pseudo-code for selecting the neighbor with the minimum D j as NextHop

From: Mobile multimedia sensor networks: architecture and routing

begin

Notation

   h is the current node to select the next hop node;

   V h is the set of node h's neighbors in the forwarding area;

   POS h is position of the current node;

   POS t is position of the sink node;

initialization

   calculate Th→tbased on TQoS and ts→h;

   calculate Hh→tbased on Th→tand Thop;

   calculate D h → t based on POS h and POS t ;

   calculate Dhop based on Dh→tand Hh→t;

for each neighbor j in V h do

   calculate ΔD j according to Equation (5);

end for

for each neighbor j in V h do

   if ΔD j = min { ΔD k || k ∈ V h } then

select j as NextHop;

break;

end if

end for

Return j;