<< NL_M_NodeDisplayUpdate NL_M: Mobility NL_M_NodeRW >>

NARVAL >> NL_M: Mobility > NL_M_NodeRD

NL_M_NodeRD

Generate the displacement of a node (Random Direction).

Calling Sequence

[X,Y,A] = NL_M_NodeRD(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_NodeRD generates the displacement of the node currently located in (X,Y) in respect with the random direction mobility model. On reaching the boundary each node selects another direction to follow.

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_NodeRD(nx,ny,a,v,L)//application of NL_M_NodeRD

Report an issue
<< NL_M_NodeDisplayUpdate NL_M: Mobility NL_M_NodeRW >>