Bugzilla – Bug 3031
Log Distance Propagation Loss Model Takes no Further Arguments
Last modified: 2019-01-01 11:00:20 EST
Created attachment 3243 [details] Edited version of vanet-routing-compare.cc with proposed fix In src/wave/examples/vanet-routing-compare.cc, the VanetRoutingExperiment::SetupAdhocDevices method includes sample code for four propagation loss models, but if the file is run with the -lossModel=4 argument, a runtime error occurs because there is an attempt to pass a frequency value to ns3::LogDistancePropagationLossModel. This can be fixed by substituting the portion listed below into the existing file: ---- BEGIN PROPOSED CODE CHANGE ---- // Setup propagation models YansWifiChannelHelper wifiChannel; wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel"); if (m_lossModel == 3) { // two-ray requires freqeuncy and antenna height wifiChannel.AddPropagationLoss (m_lossModelName, "Frequency", DoubleValue (freq), "HeightAboveZ", DoubleValue (1.5)); } else if (m_lossModel == 4) { // log distance requires no additional parameters wifiChannel.AddPropagationLoss (m_lossModelName); } else { // other propagation loss models require the frequency wifiChannel.AddPropagationLoss (m_lossModelName, "Frequency", DoubleValue (freq)); } ----- END PROPOSED CODE CHANGE ----- The first and last few lines in the above snippet are unchanged in hopes of helping identify the target area. Please let me know what comments and questions there may be on this. Attached is a fully edited version of the file.
"frequency" is also misspelled in the comment above the lossModel=3 block.
Created attachment 3244 [details] Version with corrected "frequency" comment