add some debugging output. initialize the time argument correctly.
--- a/src/node/random-walk-position.cc Mon Jul 02 15:15:25 2007 +0200
+++ b/src/node/random-walk-position.cc Mon Jul 02 15:27:53 2007 +0200
@@ -22,8 +22,11 @@
#include "ns3/default-value.h"
#include "ns3/time-default-value.h"
#include "ns3/simulator.h"
+#include "ns3/debug.h"
#include <cmath>
+NS_DEBUG_COMPONENT_DEFINE ("RandomWalk");
+
namespace ns3 {
static IntegerDefaultValue<double> g_minSpeed ("RandomWalkMinSpeed",
@@ -51,7 +54,7 @@
m_maxSpeed (g_maxSpeed.GetValue ()),
m_mode (g_mode.GetValue ()),
m_modeDistance (g_modeDistance.GetValue ()),
- m_modeTime (g_modeDistance.GetValue ())
+ m_modeTime (g_modeTime.GetValue ())
{}
bool
RandomWalkPositionParameters::IsDefault (void) const
@@ -122,6 +125,7 @@
delay = Seconds (distance / sqrt (m_dx * m_dx + m_dy * m_dy));
}
NotifyCourseChange ();
+ NS_DEBUG ("change speed at " << Simulator::Now () << " in " << delay);
Simulator::Schedule (delay, &RandomWalkPosition::Reset, this);
}