mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-09 02:23:57 +02:00
Fix ground station allocator and trace mac drops
This commit is contained in:
parent
8d5cbfe8fe
commit
998b7fe2f2
15 changed files with 222 additions and 80 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "ns3/config.h"
|
||||
#include "ns3/waypoint.h"
|
||||
#include "ns3/double.h"
|
||||
#include "ns3/uinteger.h"
|
||||
#include "ns3/mobility-helper.h"
|
||||
|
||||
#include "ground-node-helper.h"
|
||||
|
@ -58,17 +59,18 @@ LeoGndNodeHelper::Install (const std::string &file)
|
|||
}
|
||||
|
||||
NodeContainer
|
||||
LeoGndNodeHelper::Install (uint64_t numNodes)
|
||||
LeoGndNodeHelper::Install (uint32_t latNodes, uint32_t lonNodes)
|
||||
{
|
||||
NodeContainer nodes;
|
||||
for (uint64_t i = 0; i < numNodes; i++)
|
||||
for (uint64_t i = 0; i < lonNodes * latNodes; i++)
|
||||
{
|
||||
nodes.Add (m_gndNodeFactory.Create<Node> ());
|
||||
}
|
||||
MobilityHelper mobility;
|
||||
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
||||
mobility.SetPositionAllocator ("ns3::LeoPolarPositionAllocator",
|
||||
"Step", DoubleValue (360.0 * 180.0 / numNodes));
|
||||
"LatNum", UintegerValue (latNodes),
|
||||
"LonNum", UintegerValue (lonNodes));
|
||||
|
||||
mobility.Install (nodes);
|
||||
|
||||
|
|
|
@ -36,10 +36,11 @@ public:
|
|||
|
||||
/**
|
||||
*
|
||||
* \param numNodes a number of nodes to uniformly distribute accross earth
|
||||
* \param latNodes a number of nodes to in latitude direction
|
||||
* \param lonNodes a number of nodes to in longitude direction
|
||||
* \returns a node container containing nodes using the specified attributes
|
||||
*/
|
||||
NodeContainer Install (uint64_t numNodes);
|
||||
NodeContainer Install (uint32_t latNodes, uint32_t lonNodes);
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "ns3/packet.h"
|
||||
#include "ns3/names.h"
|
||||
#include "ns3/trace-helper.h"
|
||||
#include "ns3/string.h"
|
||||
|
||||
#include "../model/mock-net-device.h"
|
||||
#include "../model/isl-mock-channel.h"
|
||||
|
@ -43,6 +44,8 @@ IslHelper::IslHelper ()
|
|||
m_queueFactory.SetTypeId ("ns3::DropTailQueue<Packet>");
|
||||
m_deviceFactory.SetTypeId ("ns3::MockNetDevice");
|
||||
m_channelFactory.SetTypeId ("ns3::IslMockChannel");
|
||||
m_channelFactory.Set ("PropagationDelay", StringValue ("ns3::ConstantSpeedPropagationDelayModel"));
|
||||
m_channelFactory.Set ("PropagationLoss", StringValue ("ns3::IslPropagationLossModel"));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue