Re: [ns] RXThresh values!!
It works with me. Thanks, Quoting Saravanan Kandasamy svana...@gmail.com: Dear Wben, I presume you like to know the relationship between distance vs RXthresh ? It might not be that straight forward as it depends on which multipath propagation you like to use. Assume this topology -Two nodes (T and R), node T would be transmitting to node R placed x meter away. You need to know, 1. Frequency you like to operate 2. Which multipath propagation you like to use. 3. Transmit power 4. Gain of antenna 5. Height of the transmitter and receiver Assume Two-Ray Ground Reflection Model Method 1. Using the frequency, calculate the cut off distance (m) using (4*PI*ht*hr)/lambda where lambda is c/freq, ht and hr is the height of T and R. 2. If the T-R separation is below the cut off distance, use Friis Equation, if it is above the cut off distance use two-ray reflection model. 3. The Pr is the RXThresh you need to set in your simulation varying the distance from the Friis/Two-ray ground reflection equation which you can easily get from the internet. So when you get 300m using 1.76149e-10W RxThresh most likely you used two-ray ground reflection model operating at 2.4GHz frequency. Good luck. rgds Saravanan K On Sat, Aug 4, 2012 at 2:18 PM, wben-...@labri.fr wrote: Dear all, Has anyone an idea about the different corresponding values of the parameter RXThresh, when varying the distances. Or when I could find these values? set RXThresh 1.76149e-10 ;#compute with threshold.cc for distance 300m Thanks.
Re: [ns] need help on understanding Scheduler::instance().clock()
Dear Hongsheng Lu, Scheduler::instance().clock() has 9 decimal point accuracy, most of the time it will be different. Even you are calling it in the same file and in the same function, you might end up completely different timings. You can either use a debugger or simply printf statements to understand this. For instance, assume you have a topology of two wireless nodes, T and R where T transmits a data packet to R using 802.11 MAC. Try to put a printf statement calling scheduler::instance().clock() directly before send(p,h) at, if(hdr-direction() == hdr_cmn::DOWN) { send(p, h); return; } and another printf statement directly after the IF loop. in Mac802_11::recv function in mac-802_11.cc file You will see completely different clock information as it is not a systems time but simulated time. The first timing information related when T sends a packet and the second timing information related when R received a packet at the MAC layer which accounts a link delay among other timing parameter. By just shifting the printf statement couple of lines in the same function you are already at a different node location. Good Luck. rgds Saravanan K On Sat, Aug 4, 2012 at 2:45 AM, Hongsheng Lu h...@nd.edu wrote: Hi there, I am a newer to NS2. Could anyone tells me how Scheduler::instance().clock() works? In particular, when Scheduler::instance().clock() are called at two different places in the program (might be in different methods or classes), how can I tell whether they return the same or different time? Thanks a lot. -- Best Regards, Hongsheng Lu
[ns] A question about message Generation
Dear all, I have to conceive a control message generator located between the application layer and the transport layer. My question is as follows : a) Where is better to implement the generation of messages in .TCL script or in C++ file. Because I have to deal with timers to schedule the next packet/message transmission. Has anyone an idea about this? Thanks.