After creating a ConstantVelocityMobilityModel with the appropiate Helper it is set to paused as standard.
Example code:
MobilityHelper mobility;
mobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel",
"Position", Vector3DValue (Vector3D (5, 0, 0)),
"Velocity", Vector3DValue (Vector3D (-100, 0, 0)));
mobility.Install (wifiNodes.Get(0));
If the simulation is started like this the node 0 will be stationary.
It is always neccessary to re-set the velocity with:
Ptr <ConstantVelocityMobilityModel> myConstantVelocityMobilityModel = wifiNodes.Get(dst)->GetObject<ConstantVelocityMobilityModel>();
myConstantVelocityMobilityModel->SetVelocity(Vector3D (-100, 0, 0));
I think this is a bug.
Possibility 1:
ConstantVelocityHelper::ConstantVelocityHelper (const Vector &position,
const Vector &vel)
: m_position (position),
m_velocity (vel),
m_paused (true)
{
}
here change m_paused to false
Possibility 2:
add a further Attribute 'Pause' similar to ns3::RandomWaypointMobilityModel.
What do you think?
Regards
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/6CCVneIH3f4/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/6CCVneIH3f4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.