From fb9950c8ccd67fdbb7c5612c834a9a08db312e8e Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Wed, 19 Aug 2020 22:29:40 +0200 Subject: [PATCH] Fix meaning of beam elevation angle --- .../leo-circular-orbit-tracing-example.cc | 6 ++--- examples/leo-delay-tracing-example.cc | 23 ++++++++++++++----- model/leo-propagation-loss-model.cc | 6 ++--- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/examples/leo-circular-orbit-tracing-example.cc b/examples/leo-circular-orbit-tracing-example.cc index 28c1045..feda297 100644 --- a/examples/leo-circular-orbit-tracing-example.cc +++ b/examples/leo-circular-orbit-tracing-example.cc @@ -34,9 +34,9 @@ int main(int argc, char *argv[]) std::vector orbits = { Orbit (1150, 53.0, 32, 50), Orbit (1110, 53.8, 32, 50), - Orbit (1130, 74.0, 8, 50), - Orbit (1275, 81, 5, 75), - Orbit (1325, 70, 6, 75), +// Orbit (1130, 74.0, 8, 50), +// Orbit (1275, 81, 5, 75), +// Orbit (1325, 70, 6, 75), }; NodeContainer satellites; for (Orbit orb: orbits) diff --git a/examples/leo-delay-tracing-example.cc b/examples/leo-delay-tracing-example.cc index 5a233ef..0cda989 100644 --- a/examples/leo-delay-tracing-example.cc +++ b/examples/leo-delay-tracing-example.cc @@ -30,14 +30,23 @@ public: uint16_t sats; }; + +// Starlink +//Orbit (1150, 53.0, 32, 50), +//Orbit (1110, 53.8, 32, 50), +//Orbit (1130, 74.0, 8, 50), +//Orbit (1275, 81, 5, 75), +//Orbit (1325, 70, 6, 75), + +// Telesat +//Orbit (1000.0, 99.5, 6, 12), +//Orbit (1248.0, 37.4, 5, 9), + int main (int argc, char *argv[]) { std::vector orbits = { Orbit (1150, 53.0, 32, 50), Orbit (1110, 53.8, 32, 50), - Orbit (1130, 74.0, 8, 50), - Orbit (1275, 81, 5, 75), - Orbit (1325, 70, 6, 75), }; NodeContainer satellites; for (Orbit orb: orbits) @@ -69,12 +78,14 @@ int main (int argc, char *argv[]) islNet = islCh.Install (satellites); LeoChannelHelper utCh; - utCh.SetConstellation ("StarlinkUser"); + utCh.SetConstellation ("TelesatUser"); utNet = utCh.Install (satellites, stations); // Install internet stack on nodes AodvHelper aodv; - //aodv.Set ("HelloInterval", TimeValue (Minutes (1))); + // This is far better for performance (huge network) + aodv.Set ("EnableHello", BooleanValue (false)); + //aodv.Set ("HelloInterval", TimeValue (Seconds (10))); //aodv.Set ("TtlStart", UintegerValue (2)); //aodv.Set ("TtlIncrement", UintegerValue (1)); //aodv.Set ("TtlThreshold", UintegerValue (20)); @@ -128,7 +139,7 @@ int main (int argc, char *argv[]) serverApps.Stop (Minutes (1)); clientApps.Stop (Minutes (1)); - Simulator::Stop (Minutes (1)); + Simulator::Stop (Minutes (10)); Simulator::Run (); Simulator::Destroy (); diff --git a/model/leo-propagation-loss-model.cc b/model/leo-propagation-loss-model.cc index e8f2401..86e9f2e 100644 --- a/model/leo-propagation-loss-model.cc +++ b/model/leo-propagation-loss-model.cc @@ -89,13 +89,13 @@ LeoPropagationLossModel::GetAngle (Ptr a, Ptr b) void LeoPropagationLossModel::SetElevationAngle (double angle) { - m_elevationAngle = angle * (M_PI/180.0); + m_elevationAngle = (90 - angle) * (M_PI/180.0); } double LeoPropagationLossModel::GetElevationAngle () const { - return m_elevationAngle * (180.0/M_PI); + return 90 - (m_elevationAngle * (180.0/M_PI)); } void @@ -125,7 +125,7 @@ LeoPropagationLossModel::DoCalcRxPower (double txPowerDbm, } double angle = GetAngle (a, b); - if (angle > m_elevationAngle / 2.0) + if (angle > m_elevationAngle) { NS_LOG_DEBUG ("LEO DROP angle: a=" << a->GetPosition () << " b=" << b->GetPosition () << " m_cutOff="<