Unable to run three-gpp-v2v-channel-example.sh

71 views
Skip to first unread message

Kevin Pham

unread,
Jul 19, 2021, 4:43:12 PM7/19/21
to ns-3-users
Hello all,
I am trying to run this file to get the output GIF and PNG of the simulation. I am running on Mac Catalina 10.15.7. 
In the /examples/channel-models/ folder, I have
buildings.txt
example-output.txt
examples-to-run.py
map.gif (incomplete)
ns-3-dev
three-gpp-v2v-channel-example.cc
three-gpp-v2v-channel-example.sh
wscript

upon calling bash three-gpp-v2v-channel-example.sh, i get the following error

"aa" line 19: Not enough input columns

1 frames in animation sequence


any idea where I went wrong? 

Petri

unread,
Sep 24, 2024, 4:13:52 AM9/24/24
to ns-3-users
Hello,
Did you find a solution? 
I faced the same issue in ns-allinone-3.42. I looked in to the script  three-gpp-v2v-channel-example.sh what it does. It writes an instruction file called aa which is then used as an argument to execute gnuplot. Error on line 19 in file aa could be due to that gnuplot syntax has changed some point of time. My gnuplot is version 5.41 patchlevel 2. I did experiment by modifying script three-gpp-v2v-channel-example.sh on the following line:
41 splot 'example-output.txt' using 2:3:1,'example-output.txt'using 4:5:1
That removes the error message and creates the files map.gif and snr.gif as expected, but I not sure from gnuplot documentation whether this modification is correct or not, at least it lacks intention to use different colors for dots I guess.

Anyway, when I look into the snr.gif, the SNR as a function of time is not plotted correctly. After inspecting the example-output.txt file content, I figured out there must be a failure in calculated SNR values which are first very high then negative, e.g.:
Time[s] TxPosX[m] TxPosY[m] RxPosX[m] RxPosY[m] ChannelState SNR[dB] Pathloss[dB]
0 250 1 250 0 LOS 82.077 52.2446
0.01 250 1.16628 250 0.0833333 LOS 29.786 52.8226
0.02 250 1.33256 250 0.166667 LOS -24.2442 53.3578
0.03 250 1.49885 250 0.25 LOS -76.3647 53.8563

I was just trying to evaluate ns3 and gnuplot capabilities so this is not issue an issue for me at the moment, but I thought I let you know what I did because there seems to be not much about this issue in this forum. 

Regards,

Tommaso Pecorella

unread,
Sep 24, 2024, 6:51:54 PM9/24/24
to ns-3-users
It looks like a bug in the example and/or in the data plotting. I did open an issue: https://gitlab.com/nsnam/ns-3-dev/-/issues/1146
Reply all
Reply to author
Forward
0 new messages