<< NL_M_NodeRD NL_M: Mobility NL_M_NodeRWP >>

NARVAL >> NL_M: Mobility > NL_M_NodeRW

NL_M_NodeRW

Generate the displacement of a node (Random Walk).

Calling Sequence

[X,Y,A] = NL_M_NodeRW(X,Y,A,V,L)

Arguments

X :

Node x-coordinate (current position).

Y :

Node y-coordinate (current position).

A :

Node angle (current angle).

V :

Node speed.

L :

Area side.

Description

NL_M_NodeRW generates the displacement of the node currently located in (X,Y) in respect with the random walk mobility model. A reflection is done when the node touches each border of the network square area.

Examples

nx=100;//initial node x-coordinate
ny=10;//initial node y-coordinate
a=-%pi/6;//initial angle
v=50;
L=1000;
[nx ny a]//original values
[nx,ny,a]=NL_M_NodeRW(nx,ny,a,v,L);//application of NL_M_NodeRW 
[nx ny a]//new values

Report an issue
<< NL_M_NodeRD NL_M: Mobility NL_M_NodeRWP >>