how to implement the 3D gauss markov mobility model in ns3

714 views
Skip to first unread message

Naveen Sheoran

unread,
Jun 14, 2015, 8:27:05 AM6/14/15
to ns-3-...@googlegroups.com
Sir I used the gauss markov mobility model in program in ns3. I did not get any error but in xml file .It shows the position of nodes in only x and y direction .So please suggest me that how we can use the gauss markov mobility model and how we can generate the 3D simulation.there is one more problem is that it did not capture the sending and receiving of packets in trace file.

so please tell me that how we can send the tcp and udp data between the nodes by using the 3D gauss markov mobility model in ns3

thanks
with regard
NAVEEN

Tommaso Pecorella

unread,
Jun 14, 2015, 8:39:49 AM6/14/15
to ns-3-...@googlegroups.com
Hi,

please attach the script that gives you problems. Without the script it is hard to tell if it's a problem in your program or in the module.

T.

Konstantinos

unread,
Jun 14, 2015, 10:29:56 AM6/14/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com, John Abraham
Hi,

Without being 100% sure, I think that NetAnim can only visualize 2D. I haven't seen any 3D.
This does not mean that the simulation is run only in 2D. On the contrary, your nodes move in 3D space.
However, when parsing the mobility for visualizing, the Z-axis is omitted. 

Naveen Sheoran

unread,
Jun 14, 2015, 11:37:22 AM6/14/15
to ns-3-...@googlegroups.com, john.ab...@gmail.com, naveenshe...@gmail.com
hello Sir;
Greetings
               Very right sir ,
I also think that netanim only visualize the 2D , So what is the way to get it kmow the actual position of the node in 3D
and I got only t and r parameter in trace file.So please tell me that how we can get the trace file in exact format ?
Message has been deleted

Konstantinos

unread,
Jun 14, 2015, 1:26:23 PM6/14/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com
Hi Naveen,

Please do not post the cost within the message, but attach it.

In addition, you do not have to define GaussMarkovMobilityModel class, NS-3 already has such model.

Regarding your last question, please study the tutorial. There is no difference between wired and wireless when it comes to setting up applications.

Regards,
K.

On Sunday, 14 June 2015 16:49:00 UTC+1, Naveen Sheoran wrote:
sir
I wrote the coding below


and my one more question is that sir if we want to send the TCP and UDP data from a particular node to a other particular node like the wired node in ns2 than how we will define in ns3 in wireless. like in above program if we want to send the tcp and udp data from node 0 to node 1 then how we will define it?

Naveen Sheoran

unread,
Jun 15, 2015, 12:02:33 AM6/15/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com
Hello sir ,
                  Thanks for the quick reply.
                               I am very new ti this ns3.from the very next time I will attach the file.
                 How we can visualize the simulation in 3D ? please refer the trace file generated by the above given code . It gives only one parameter to me i.e. t .
Please help me to figure out the shortcoming   in the above given code . actually it did not give me any error and generated the trace file as well as xml file and pcap file .
Sir I would like to generate the scenario that there  10 nodes in the program
suppose node no 1 send the tcp packet to node 5 and node no 2 send the udp packet to node no 7.
protocol is OLSR and 3D gauss markov mobility model.

please help me

thanks
with regards
NAVEEN 

Konstantinos

unread,
Jun 15, 2015, 5:54:06 AM6/15/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com
As I have already said, NetAnim is limited to visualizing in 2D. That does not mean that nodes move on 2D, they move on 3D.
Using the trace sources for "ChangeCourse", you can get an output for the 3D mobility (time, X-,Y-,Z-coordinates) that you can later parse and visualize in 3D with other tools such as gnuplot.

Regards,
K

Naveen Sheoran

unread,
Jun 15, 2015, 12:33:34 PM6/15/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com

thank you sir for your reply.
sir please help in establishing the simple scenario what I discussed above of sending the tcp and udp packet between the particular nodes I am new to this ns3 and I would like to clarify my this doubt about the adhoc wireless network. please pass me such example which contain such scenario. My doubt is there because when I found the throughput of the above program in gauss markov mobility model  with the help of flow monitor then I got -nankb/s. so for that shake I would like to generate first the same scenario and then I will implement the gauss markov mobility model.
  I will be very thankful to you.

with Regards
NAVEEN

Konstantinos

unread,
Jun 15, 2015, 12:50:03 PM6/15/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com
There are plenty of examples of mobile ad-hoc networks with TCP and/or UDP.
Setting up the mobility is again explained in the documentation and there is a specific example in the for the Gauss Markov model. 

Study them and understand them. If you have a specific question, you can ask again, but do not expect to get the code without showing that you understand what you are doing.
The fact that you have -nan kbps throughput, simply means that all packets are lost. There are several reasons why this could have happened (one being the mobility).

Regards,
K.

Naveen Sheoran

unread,
Jun 15, 2015, 11:47:29 PM6/15/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com
thank you sir ;
Yes , I also thought that due to the mobility model(3D) it happens because when we use the other 2D mobility model then it sends the data and also gives the throughput.so now please suggest how we can transfer the data in 3D mode ?

Tommaso Pecorella

unread,
Jun 16, 2015, 1:19:59 AM6/16/15
to ns-3-...@googlegroups.com
Hi,

There is the remote possibility that you found a bug. Please share the non-working script. Be prepared tho. It's well known that I'm far less nice than Kostantinos.

Naveen Sheoran

unread,
Jun 18, 2015, 7:53:48 AM6/18/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com
hello sir ,
 Again I faced one more problem. I applied the ChangeCourse and I did not get the error , got the position of the nodes but the Z parameter of all the nodes is 0(zero)
So please clear me that where I am wrong.

Thank You
Regards
NAVEEN

Konstantinos

unread,
Jun 18, 2015, 8:15:13 AM6/18/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com
Hi Naveen,

As Tommaso has already suggested, provide a minimal script so that we can test and verify if it is a NS-3 error or just a user-error!

K.
Message has been deleted

Konstantinos

unread,
Jun 18, 2015, 9:07:53 AM6/18/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com
Is this your complete code? Have you deleted anything? 
Because this is not a valid C++ scenario/code, it does not have a "main"!

Nevertheless, and assuming that you withhold some information regarding the code, it is still a 'user-error' (as expected...)

See your mobility and particularly the bounds:
"Bounds", BoxValue (Box (0, 150000, 0, 150000, 0, 0)),

You simply specify a rectangle, rather than a box.

Based on this, just to comment on the previous question, why you do not receive packets, again the answer is check your mobility.
Nodes are able to move on a very large area (150km X 150km) according to your definitions. 
WiFi (which I assume you use but it is not 100% clear) does not have such range!

Regards,
K.

On Thursday, June 18, 2015 at 1:30:58 PM UTC+1, Naveen Sheoran wrote:
sure sir ;
I am attaching the file . Please refer it.
thank you

Naveen Sheoran

unread,
Jun 19, 2015, 2:52:13 AM6/19/15
to ns-3-...@googlegroups.com, naveenshe...@gmail.com

thank you very much sir;
It was my fault. Initially I changed it and I forget to update it.
thank you very much sir. It gives me the Z position.
If I will have any more  doubt then I  will share with you.
thanks for reply
Regards
NAVEEN

Hemant Saini

unread,
May 1, 2021, 9:08:41 AM5/1/21
to ns-3-users
hello naveen if you succed in comparing routing  in 3D with gauss markov mobility pl show the code or share the code
Reply all
Reply to author
Forward
0 new messages