[ns] distance calculation of nodes

2011-04-24 Thread Suman paul choudhury
Respected all suppose there are two nodes: node0 and node1 node0 has a coordinate of (20,30) and node1 has coordinate (30,50) the total time of simulation is 5 sec at time t=1 sec, node1 starts moving towards coordinate (170,30) now if since node 1 is in motion , i need to calculate the *distanc

[ns] assigning value to variables

2011-04-24 Thread Suman paul choudhury
Respected everyone suppose i provide the initial location of a node as $node_(0) set X_ 16.0 $node_(0) set Y_ 36.0 now if i want to assign the value of x position and y position of node 0 to another variable x1 and y1,how can i write that?? is it like this set x1 [expr $node_(0) set X_ 16.0] s

[ns] setting variables

2011-04-21 Thread Suman paul choudhury
dear all suppose i provide the initial location of a node as $node_(0) set X_ 16.0 $node_(0) set Y_ 36.0 then suppose if i want to put that values of x position and y position of the node 0 in another variables can i write in this way set x1 [$node_(0) set X_ 16.0] set y1 [$node_(0) set Y_ 36.

[ns] location or position of nodes

2011-03-16 Thread Suman paul choudhury
dear all how is it possible to know the position of a node at any instant of a time if the node is in constant motion. can any one provide with the tcl code of the following? regards Suman

[ns] SENDING A MSG TO OTHER NODES.

2011-02-22 Thread Suman paul choudhury
dear all How does a node sends an instruction message to other node? is there any NS-2 command for sending such instruction message. Any such example would be really helpful. thanking you regards Suman

[ns] distance calculation of the nodes

2011-02-20 Thread Suman paul choudhury
dear all hw ow is it possible to calculate the distance of the two nodes using ns-2? example_ if node1 has cordinates as (5,15) and the other node2 has cordinates (15,20) then what would be the command in NS-2 to calculate the distance between the nodes. thanking you regards suman