mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 10:03:58 +02:00
Add satellite position allocator
This commit is contained in:
parent
cc2a8ae5e9
commit
6fdfc6b2a8
2 changed files with 91 additions and 0 deletions
39
model/leo-circular-orbit-position-allocator.h
Normal file
39
model/leo-circular-orbit-position-allocator.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
|
||||
#ifndef LEO_CIRCULAR_ORBIT_HELPER_H
|
||||
#define LEO_CIRCULAR_ORBIT_HELPER_H
|
||||
|
||||
#include "ns3/position-allocator.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \brief Allocate pairs of latitude and longitude (offset within orbit) for
|
||||
* use in LeoCircularOrbitMobilityModel
|
||||
*/
|
||||
class LeoCircularOrbitAllocator : public PositionAllocator
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Register this type with the TypeId system.
|
||||
* \return the object TypeId
|
||||
*/
|
||||
static TypeId GetTypeId ();
|
||||
|
||||
LeoCircularOrbitAllocator ();
|
||||
virtual ~LeoCircularOrbitAllocator ();
|
||||
|
||||
virtual Vector GetNext (void) const;
|
||||
virtual int64_t AssignStreams (int64_t stream);
|
||||
|
||||
private:
|
||||
uint64_t m_numOrbits;
|
||||
uint64_t m_numSatellites;
|
||||
|
||||
mutable uint64_t m_lastOrbit;
|
||||
mutable uint64_t m_lastSatellite;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue