--- a/src/mobility/model/steady-state-random-waypoint-mobility-model.cc Tue Jun 04 17:20:40 2013 +0200
+++ b/src/mobility/model/steady-state-random-waypoint-mobility-model.cc Fri Jun 14 16:13:07 2013 +0200
@@ -73,6 +73,11 @@
"Maximum Y value of traveling region, [m]",
DoubleValue (1),
MakeDoubleAccessor (&SteadyStateRandomWaypointMobilityModel::m_maxY),
+ MakeDoubleChecker<double> ())
+ .AddAttribute ("Z",
+ "Z value of traveling region (fixed), [m]",
+ DoubleValue (0.0),
+ MakeDoubleAccessor (&SteadyStateRandomWaypointMobilityModel::m_z),
MakeDoubleChecker<double> ());
return tid;
@@ -188,10 +193,10 @@
NS_ASSERT (r <= 1);
}
double u2 = m_u_r->GetValue (0, 1);
- m_helper.SetPosition (Vector (m_minX + u2*x1 + (1 - u2)*x2, m_minY + u2*y1 + (1 - u2)*y2, 0));
+ m_helper.SetPosition (Vector (m_minX + u2*x1 + (1 - u2)*x2, m_minY + u2*y1 + (1 - u2)*y2, m_z));
NS_ASSERT (!m_event.IsRunning ());
m_event = Simulator::ScheduleNow (&SteadyStateRandomWaypointMobilityModel::SteadyStateBeginWalk, this,
- Vector (m_minX + x2, m_minY + y2, 0));
+ Vector (m_minX + x2, m_minY + y2, m_z));
}
NotifyCourseChange ();
}
--- a/src/mobility/model/steady-state-random-waypoint-mobility-model.h Tue Jun 04 17:20:40 2013 +0200
+++ b/src/mobility/model/steady-state-random-waypoint-mobility-model.h Fri Jun 14 16:13:07 2013 +0200
@@ -74,6 +74,7 @@
double m_maxX;
double m_minY;
double m_maxY;
+ double m_z;
Ptr<RandomRectanglePositionAllocator> m_position;
double m_minPause;
double m_maxPause;