Bugzilla – Bug 1012
Throp propagation model bug
Last modified: 2010-12-23 18:19:52 UTC
Created attachment 1003 [details] Test code Hello, I've done a little test with the uan throp propagation model. I wanted to see how far a node can transmit with a fixed transmission power (by default 190dB). And surprisingly I've found the node transmitting up to 13km with 190 dB. Whats more if I decrease the tx power to 10 dB the node transmits even farther! Almost 14km. I've red the paper “Modeling the Underwater Acoustic Channel in ns2” and taken a look into the ns2 model code. In the paper and in the ns2 code the attenuation is calculated with a subtraction sing and that's why it's then added to the transmission power in order to get the reception power. In the ns3 code the method UanPropModelThorp::GetPathLossDb returns always a positive value that is then added to the tx power at UanChannel::TxPacket. If I'm correct the UanPropModelThorp::GetPathLossDb should return the same value but in negative form or do a subtraction at the UanChannel::TxPacket method. I'm attaching the code used to do the tests.
Yes there's a typo in this algorithm. I'll provide a patch.
Created attachment 1014 [details] patch solving bug 1012
I've made a modification to the UanChannel::TxPacket method, changing the way the received power dB is computed. As highlighted by Salva, the pathloss has to be subtracted from the transmission power dB value. Now, using the test code proposed by Salva, it is possible to verify the receiving power goes down with increase in transmission distance. As a note, I've noticed the maximum transmission distance, with defaults value is about 520m.
changeset: d9b06f3ad3e7