[ns] mobile nodes distance calculation in NS-2
Hello, Recently, i'm researching on the wireless and mobile networking. I would like to calculate the distance between two wireless nodes which are moving in their communication range, so that, in the upper layer, I can select a nearer node to send data. There probably existed such a question in the list (as shown below), but I think it's for fix nodes, while not what i'm expecting. set x1 [$node_a set X_] set y1 [$node_a set Y_] set x2 [$node_b set X_] set y2 [$node_b set Y_] set distance [expr sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))] Therefore, would anyone mind pointing me out the way of calculating such a distance in NS-2 (by using C++ code or TCL)? Regards, Cheav
Re: [ns] mobile nodes distance calculation in NS-2
Yeah, i got your idea. However, as i have read a paper related to the distance calculation, the authors could calculate the distance by using NS-2, and store the distance information into a registry in order to be used by the higher layer. But, they used a simple but different mechanism from signal strength or node coordinates. Thus, I'm just wondering whether there is existing implementation of such a mechanism. If you needed that paper, maybe you could check the attached file. Thanks, Cheav From: Valeriy Ivanov wizard19891...@gmail.com To: Cheav Chhing chhingch...@yahoo.com Sent: Tuesday, October 30, 2012 10:39 PM Subject: Re: [ns] mobile nodes distance calculation in NS-2 The way to calculate distance for mobile node is the same. All you need is to periodicaly probe the coordinates of all nodes. I don't know exact functions to do this. Also there are some scripts that calculate signal strength of adjacent nodes. They are based on distance calculation. Read this scripts. Or you can just use the highest level of signal. Node with highest level of signal is closest. If you don't research satellite networks, delay is not an issue. So use the highest level of signal in any case. 30.10.2012 17:29 пользователь Cheav Chhing chhingch...@yahoo.com написал: Hello, Recently, i'm researching on the wireless and mobile networking. I would like to calculate the distance between two wireless nodes which are moving in their communication range, so that, in the upper layer, I can select a nearer node to send data. There probably existed such a question in the list (as shown below), but I think it's for fix nodes, while not what i'm expecting. set x1 [$node_a set X_] set y1 [$node_a set Y_] set x2 [$node_b set X_] set y2 [$node_b set Y_] set distance [expr sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))] Therefore, would anyone mind pointing me out the way of calculating such a distance in NS-2 (by using C++ code or TCL)? Regards, Cheav
[ns] mobile nodes
hi all i just made certain changes in mac802_11.cc file to find out the neighbors of nodes. right now whenever i run the script it is showing me all the current nodes and their neighboring nodes a simulation time passes on. i like to find it out for particular node how can i do it. also b default the netif_ - nodes()- energymodel() is returning 0. and the netif_-node()- adaptivefidelity() is giving segemntation fault. what can be possible reasons. i need your help ugently. Neeraj Gupta Assistant Professor HOD, CSE IT Department Hindu College of Engineering Sonepat
[ns] Mobile nodes: radius
Hello, I found this string in NS Manual, how can I use it? [quote]$mobilenode radius r The radius r denotes the node's range. All mobilenodes that fall within the circle of radius r with the node at its center are considered as neighbours.[/quote] I used it like: $node_(0) radius 50 but It seems to do not work. Sorry for my poor english. thank you Andrea.
Re: [ns] Mobile nodes: radius
Hi there I also tried that a few months ago, but it does not seem to do what it says i personally think it is useless, unless someone has other opinion Hello, I found this string in NS Manual, how can I use it? [quote]$mobilenode radius r The radius r denotes the node's range. All mobilenodes that fall within the circle of radius r with the node at its center are considered as neighbours.[/quote] I used it like: $node_(0) radius 50 but It seems to do not work. Sorry for my poor english. thank you Andrea. Kind regards Qasim Raza Iqbal PhD Candidate, ACNRG Lab N504, Office N505 Adaptive Communications Networks Research Group, School of Engineering And Applied Science Aston University Birmingham B4 7ET United Kingdom http://www.ee.aston.ac.uk/research/acrg/index.html
Re: [ns] Mobile nodes: radius
Andrea M schrieb: Hello, I found this string in NS Manual, how can I use it? [quote]$mobilenode radius r The radius r denotes the node's range. All mobilenodes that fall within the circle of radius r with the node at its center are considered as neighbours.[/quote] I used it like: $node_(0) radius 50 but It seems to do not work. This must be a very old piece of code and does not make any sense at all. In practice there is nothing like a transmission radius. If a node receives a packet depends on the propagation model. If you need a specific transmission radius (which btw is not really realistic) you can calculate the corresponding propagation parameters using the propagation.cc helper tool. Better setup the propagation parameters to reflect the conditions in the simulated environment and see what happens. Daniel.
Re: [ns] Mobile nodes: radius
Do you have any UM-OLSR examples? I'm looking for some scripts to learn how OLSR works under NS, I'm very principiant. Thank you very much. Andrea. 2006/6/20, Daniel Mahrenholz [EMAIL PROTECTED]: Andrea M schrieb: Hello, I found this string in NS Manual, how can I use it? [quote]$mobilenode radius r The radius r denotes the node's range. All mobilenodes that fall within the circle of radius r with the node at its center are considered as neighbours.[/quote] I used it like: $node_(0) radius 50 but It seems to do not work. This must be a very old piece of code and does not make any sense at all. In practice there is nothing like a transmission radius. If a node receives a packet depends on the propagation model. If you need a specific transmission radius (which btw is not really realistic) you can calculate the corresponding propagation parameters using the propagation.cc helper tool. Better setup the propagation parameters to reflect the conditions in the simulated environment and see what happens. Daniel.