From 98468c4857fa7fe19d52d84fdc9a31ea3a904919 Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Wed, 19 Aug 2020 16:42:36 +0200 Subject: [PATCH] Set corret data rate unit --- examples/leo-delay-tracing-example.cc | 8 ++++---- helper/leo-channel-helper.cc | 6 +++--- helper/leo-channel-helper.h | 2 +- model/leo-oneweb-constants.h | 4 ++-- model/leo-starlink-constants.h | 4 ++-- model/leo-telesat-constants.h | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/leo-delay-tracing-example.cc b/examples/leo-delay-tracing-example.cc index 0fa17e6..3cdebdf 100644 --- a/examples/leo-delay-tracing-example.cc +++ b/examples/leo-delay-tracing-example.cc @@ -69,7 +69,7 @@ int main (int argc, char *argv[]) islNet = islCh.Install (satellites); LeoChannelHelper utCh; - utCh.SetConstellation ("TelesatUser"); + utCh.SetConstellation ("StarlinkUser"); utNet = utCh.Install (satellites, stations); // Install internet stack on nodes @@ -101,17 +101,17 @@ int main (int argc, char *argv[]) // we want to ping terminals UdpServerHelper echoServer (9); - ApplicationContainer serverApps = echoServer.Install (stations.Get (1)); + ApplicationContainer serverApps = echoServer.Install (stations.Get (100)); // install a client on one of the terminals ApplicationContainer clientApps; - Address remote = stations.Get (1)->GetObject ()->GetAddress (1, 0).GetLocal ();//utIp.GetAddress (1, 0); + Address remote = stations.Get (100)->GetObject ()->GetAddress (1, 0).GetLocal ();//utIp.GetAddress (1, 0); std::cout << "REMOTE=" << Ipv4Address::ConvertFrom (remote); UdpClientHelper echoClient (remote, 9); echoClient.SetAttribute ("MaxPackets", UintegerValue (60)); echoClient.SetAttribute ("Interval", TimeValue (Seconds (1))); echoClient.SetAttribute ("PacketSize", UintegerValue (1024)); - clientApps.Add (echoClient.Install (stations.Get (3))); + clientApps.Add (echoClient.Install (stations.Get (103))); Config::Connect ("/NodeList/*/ApplicationList/*/$ns3::UdpServer/Rx", MakeCallback (&EchoRx)); diff --git a/helper/leo-channel-helper.cc b/helper/leo-channel-helper.cc index 3a00451..e861bdd 100644 --- a/helper/leo-channel-helper.cc +++ b/helper/leo-channel-helper.cc @@ -107,7 +107,7 @@ LeoChannelHelper::SetConstellationAttributes (double eirp, double fspl, double atmosphericLoss, double linkMargin, - double dataRate, + std::string dataRate, double rxGain, double rxLoss) { @@ -120,8 +120,8 @@ LeoChannelHelper::SetConstellationAttributes (double eirp, m_satDeviceFactory.Set ("RxLoss", DoubleValue (rxLoss)); m_satDeviceFactory.Set ("RxGain", DoubleValue (rxGain)); - m_gndDeviceFactory.Set ("DataRate", DataRateValue (DataRate (dataRate))); - m_satDeviceFactory.Set ("DataRate", DataRateValue (DataRate (dataRate))); + m_gndDeviceFactory.Set ("DataRate", StringValue (dataRate)); + m_satDeviceFactory.Set ("DataRate", StringValue (dataRate)); m_propagationLossFactory.Set ("ElevationAngle", DoubleValue (elevationAngle)); m_propagationLossFactory.Set ("FreeSpacePathLoss", DoubleValue (fspl)); diff --git a/helper/leo-channel-helper.h b/helper/leo-channel-helper.h index 4f869ed..d9baa5c 100644 --- a/helper/leo-channel-helper.h +++ b/helper/leo-channel-helper.h @@ -76,7 +76,7 @@ private: double fspl, double atmosphericLoss, double linkMargin, - double dataRate, + std::string dataRate, double rxGain, double rxLoss); }; diff --git a/model/leo-oneweb-constants.h b/model/leo-oneweb-constants.h index d74e847..df5cdd8 100644 --- a/model/leo-oneweb-constants.h +++ b/model/leo-oneweb-constants.h @@ -44,7 +44,7 @@ namespace ns3 { #define LEO_ONEWEB_GATEWAY_RX_EB_N0_I0 13.3 // dB #define LEO_ONEWEB_GATEWAY_REQ_EB_N0 12.3 // dB #define LEO_ONEWEB_GATEWAY_LINK_MARGIN 1.03 // dB -#define LEO_ONEWEB_GATEWAY_DATA_RATE 1341.1 // Mbps +#define LEO_ONEWEB_GATEWAY_DATA_RATE "1341.1Mbps" // Mbps #define LEO_ONEWEB_GATEWAY_SHANNON_LIMIT 1.06 // dB // user uplink @@ -68,7 +68,7 @@ namespace ns3 { #define LEO_ONEWEB_USER_RX_EB_N0_I0 5.5 // dB #define LEO_ONEWEB_USER_REQ_EB_N0 4.6 // dB #define LEO_ONEWEB_USER_LINK_MARGIN 0.85 // dB -#define LEO_ONEWEB_USER_DATA_RATE 558.7 // Mbps +#define LEO_ONEWEB_USER_DATA_RATE "558.7Mbps" // Mbps #define LEO_ONEWEB_USER_SHANNON_LIMIT 1.49 // dB }; diff --git a/model/leo-starlink-constants.h b/model/leo-starlink-constants.h index 73c409a..fa974bd 100644 --- a/model/leo-starlink-constants.h +++ b/model/leo-starlink-constants.h @@ -44,7 +44,7 @@ namespace ns3 { #define LEO_STARLINK_GATEWAY_RX_EB_N0_I0 13.3 // dB #define LEO_STARLINK_GATEWAY_REQ_EB_N0 12.3 // dB #define LEO_STARLINK_GATEWAY_LINK_MARGIN 1.02 // dB -#define LEO_STARLINK_GATEWAY_DATA_RATE 2682.1 // Mbps +#define LEO_STARLINK_GATEWAY_DATA_RATE "2682.1Mbps" // Mbps #define LEO_STARLINK_GATEWAY_SHANNON_LIMIT 1.06 // dB // user uplink @@ -68,7 +68,7 @@ namespace ns3 { #define LEO_STARLINK_USER_RX_EB_N0_I0 6.7 // dB #define LEO_STARLINK_USER_REQ_EB_N0 5.9 // dB #define LEO_STARLINK_USER_LINK_MARGIN 0.82 // dB -#define LEO_STARLINK_USER_DATA_RATE 674.3 // Mbps +#define LEO_STARLINK_USER_DATA_RATE "674.3Mbps" // Mbps #define LEO_STARLINK_USER_SHANNON_LIMIT 1.46 // dB }; diff --git a/model/leo-telesat-constants.h b/model/leo-telesat-constants.h index 5673978..b20d9a6 100644 --- a/model/leo-telesat-constants.h +++ b/model/leo-telesat-constants.h @@ -44,7 +44,7 @@ namespace ns3 { #define LEO_TELESAT_GATEWAY_RX_EB_N0_I0 11.4 // dB #define LEO_TELESAT_GATEWAY_REQ_EB_N0 11.0 // dB #define LEO_TELESAT_GATEWAY_LINK_MARGIN 0.36 // dB -#define LEO_TELESAT_GATEWAY_DATA_RATE 9857.1 // Mbps +#define LEO_TELESAT_GATEWAY_DATA_RATE "9857.1Mbps" // Mbps #define LEO_TELESAT_GATEWAY_SHANNON_LIMIT 1.09 // dB // user uplink @@ -68,7 +68,7 @@ namespace ns3 { #define LEO_TELESAT_USER_RX_EB_N0_I0 5.9 // dB #define LEO_TELESAT_USER_REQ_EB_N0 5.2 // dB #define LEO_TELESAT_USER_LINK_MARGIN 0.76 // dB -#define LEO_TELESAT_USER_DATA_RATE 599.4 // Mbps +#define LEO_TELESAT_USER_DATA_RATE "599.4Mbps" // Mbps #define LEO_TELESAT_USER_SHANNON_LIMIT 1.49 // dB };