diff --git a/examples/leo-delay-tracing-example.cc b/examples/leo-delay-tracing-example.cc index 73fb8f8..cb5ab4b 100644 --- a/examples/leo-delay-tracing-example.cc +++ b/examples/leo-delay-tracing-example.cc @@ -92,7 +92,7 @@ int main (int argc, char *argv[]) cmd.AddValue("islEnable", "Enable inter-satellite links", islEnable); cmd.AddValue("traceDrops", "Enable tracing of PHY and MAC drops", traceDrops); cmd.AddValue("latGws", "Latitudal rows of gateways", latGws); - cmd.AddValue("latGws", "Longitudinal rows of gateways", lonGws); + cmd.AddValue("lonGws", "Longitudinal rows of gateways", lonGws); cmd.Parse (argc, argv); std::streambuf *coutbuf = std::cout.rdbuf(); @@ -128,8 +128,9 @@ int main (int argc, char *argv[]) // Install internet stack on nodes AodvHelper aodv; aodv.Set ("EnableHello", BooleanValue (false)); - aodv.Set ("RreqRateLimit", UintegerValue (1)); - aodv.Set ("RerrRateLimit", UintegerValue (1)); + aodv.Set ("NetDiameter", UintegerValue (1000)); + aodv.Set ("RreqRateLimit", UintegerValue (10)); + aodv.Set ("RerrRateLimit", UintegerValue (10)); stack.SetRoutingHelper (aodv); } @@ -143,6 +144,7 @@ int main (int argc, char *argv[]) if (islEnable) { + std::cerr << "ISL enabled" << std::endl; IslHelper islCh; NetDeviceContainer islNet = islCh.Install (satellites); ipv4.SetBase ("10.2.0.0", "255.255.0.0"); diff --git a/model/leo-polar-position-allocator.cc b/model/leo-polar-position-allocator.cc index 29ea652..993967d 100644 --- a/model/leo-polar-position-allocator.cc +++ b/model/leo-polar-position-allocator.cc @@ -15,7 +15,7 @@ NS_OBJECT_ENSURE_REGISTERED (LeoPolarPositionAllocator); NS_LOG_COMPONENT_DEFINE ("LeoPolarPositionAllocator"); LeoPolarPositionAllocator::LeoPolarPositionAllocator () - : m_latStart (0), m_lonStart (0), m_latStop (0), m_lonStop (0), m_latNum (1), m_lonNum (1), m_lat (0), m_lon (0) + : m_latNum (1), m_lonNum (1), m_lat (0), m_lon (0) {} LeoPolarPositionAllocator::~LeoPolarPositionAllocator () @@ -28,35 +28,11 @@ LeoPolarPositionAllocator::GetTypeId (void) .SetParent () .SetGroupName ("Leo") .AddConstructor () - .AddAttribute ("LatStart", - "Start at this latitude", - DoubleValue (-90), - MakeDoubleAccessor (&LeoPolarPositionAllocator::SetLatStart, - &LeoPolarPositionAllocator::GetLatStart), - MakeDoubleChecker ()) - .AddAttribute ("LatStop", - "Stop at this longitude", - DoubleValue (90), - MakeDoubleAccessor (&LeoPolarPositionAllocator::SetLatStop, - &LeoPolarPositionAllocator::GetLatStop), - MakeDoubleChecker ()) .AddAttribute ("LatNum", "The number nodes along one latitude", UintegerValue (10), MakeUintegerAccessor (&LeoPolarPositionAllocator::m_latNum), MakeUintegerChecker ()) - .AddAttribute ("LongStart", - "Start at this longitude", - DoubleValue (-180), - MakeDoubleAccessor (&LeoPolarPositionAllocator::SetLonStart, - &LeoPolarPositionAllocator::GetLonStart), - MakeDoubleChecker ()) - .AddAttribute ("LongStop", - "Stop at this longitude", - DoubleValue (180), - MakeDoubleAccessor (&LeoPolarPositionAllocator::SetLonStop, - &LeoPolarPositionAllocator::GetLonStop), - MakeDoubleChecker ()) .AddAttribute ("LonNum", "The number nodes along one longitude", UintegerValue (10), @@ -79,11 +55,11 @@ LeoPolarPositionAllocator::GetNext () const { NS_LOG_FUNCTION (this); - double lat = m_lat * (M_PI / m_latNum) - (M_PI / 2); - double lon = m_lon * (2 * M_PI / m_lonNum) - M_PI; - Vector3D next = Vector3D (LEO_GND_RAD_EARTH * cos (lat) * cos (lon), - LEO_GND_RAD_EARTH * cos (lat) * sin (lon), - LEO_GND_RAD_EARTH * sin (lat)); + double lat = m_lat * (M_PI / m_latNum); + double lon = m_lon * (2 * M_PI / m_lonNum); + Vector3D next = Vector3D (LEO_GND_RAD_EARTH * sin (lat) * cos (lon), + LEO_GND_RAD_EARTH * sin (lat) * sin (lon), + LEO_GND_RAD_EARTH * cos (lat)); m_lat ++; if (m_lat > m_latNum) @@ -97,60 +73,4 @@ LeoPolarPositionAllocator::GetNext () const return next; } -double -LeoPolarPositionAllocator::GetLatStart () const -{ - NS_LOG_FUNCTION (this); - return m_latStart * (180.0 / M_PI); -} - -double -LeoPolarPositionAllocator::GetLonStart () const -{ - NS_LOG_FUNCTION (this); - return m_lonStart * (180.0 / M_PI); -} - -double -LeoPolarPositionAllocator::GetLatStop () const -{ - NS_LOG_FUNCTION (this); - return m_latStop * (180.0 / M_PI); -} - -double -LeoPolarPositionAllocator::GetLonStop () const -{ - NS_LOG_FUNCTION (this); - return m_lonStop * (180.0 / M_PI); -} - -void -LeoPolarPositionAllocator::SetLatStart (double lat) -{ - NS_LOG_FUNCTION (this << lat); - m_latStart = (lat / 180.0) * M_PI; -} - -void -LeoPolarPositionAllocator::SetLonStart (double lon) -{ - NS_LOG_FUNCTION (this << lon); - m_lonStart = (lon / 180.0) * M_PI; -} - -void -LeoPolarPositionAllocator::SetLatStop (double lat) -{ - NS_LOG_FUNCTION (this << lat); - m_latStop = (lat / 180.0) * M_PI; -} - -void -LeoPolarPositionAllocator::SetLonStop (double lon) -{ - NS_LOG_FUNCTION (this << lon); - m_lonStop = (lon / 180.0) * M_PI; -} - }; diff --git a/model/leo-polar-position-allocator.h b/model/leo-polar-position-allocator.h index 7c55c29..59fa352 100644 --- a/model/leo-polar-position-allocator.h +++ b/model/leo-polar-position-allocator.h @@ -27,28 +27,12 @@ public: virtual Vector GetNext (void) const; virtual int64_t AssignStreams (int64_t stream); - double GetLatStart () const; - double GetLonStart () const; - double GetLatStop () const; - double GetLonStop () const; - private: - double m_latStart; - double m_lonStart; - - double m_latStop; - double m_lonStop; - uint32_t m_latNum; uint32_t m_lonNum; mutable uint32_t m_lat; mutable uint32_t m_lon; - - void SetLatStart (double lat); - void SetLonStart (double lon); - void SetLatStop (double lat); - void SetLonStop (double lon); }; }; diff --git a/model/leo-propagation-loss-model.cc b/model/leo-propagation-loss-model.cc index 490fb80..23a49bf 100644 --- a/model/leo-propagation-loss-model.cc +++ b/model/leo-propagation-loss-model.cc @@ -23,7 +23,7 @@ LeoPropagationLossModel::GetTypeId (void) .AddConstructor () .AddAttribute ("MaxDistance", "Cut-off distance for signal propagation", - DoubleValue (3000.0), + DoubleValue (2500.0), MakeDoubleAccessor (&LeoPropagationLossModel::SetCutoffDistance, &LeoPropagationLossModel::GetCutoffDistance), MakeDoubleChecker ())