Allocate random positions within the area of a certain spot-beam. More...
#include "satellite-position-allocator.h"
Public Member Functions | |
SatSpotBeamPositionAllocator () | |
Default constructor. More... | |
SatSpotBeamPositionAllocator (uint32_t beamId, Ptr< SatAntennaGainPatternContainer > patternContainer, GeoCoordinate geoPos) | |
SatSpotBeamPositionAllocator constructor. More... | |
virtual | ~SatSpotBeamPositionAllocator () |
Destructor for SatSpotBeamPositionAllocator. More... | |
virtual int64_t | AssignStreams (int64_t stream) |
virtual GeoCoordinate | GetNextGeoPosition (uint32_t satId) const |
Get next position. More... | |
void | SetAltitude (Ptr< RandomVariableStream > altitude) |
Public Member Functions inherited from ns3::SatPositionAllocator | |
SatPositionAllocator () | |
Default constructor. More... | |
virtual | ~SatPositionAllocator () |
Destructor for SatPositionAllocator. More... | |
virtual Vector | GetNext (void) const |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::SatPositionAllocator | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
Ptr< RandomVariableStream > | m_altitude |
A random variable stream for altitude. More... | |
Ptr< SatAntennaGainPatternContainer > | m_antennaGainPatterns |
Antenna pattern used to check that the give position is valid based on antenna gains. More... | |
GeoCoordinate | m_geoPos |
Position of the GEO satellite. More... | |
double | m_minElevationAngleInDeg |
Minimum accepted elevation angle in degrees for UTs. More... | |
uint32_t | m_targetBeamId |
Target beam id to which the UT is tried to be placed. More... | |
Static Private Attributes | |
static constexpr uint32_t | MAX_TRIES = 100 |
Max number of tries to pick a random position for a UT. More... | |
static constexpr double | MIN_ANTENNA_GAIN = 40.0 |
Minimum accepted antenna gain for a UT. More... | |
Allocate random positions within the area of a certain spot-beam.
Definition at line 224 of file satellite-position-allocator.h.
ns3::SatSpotBeamPositionAllocator::SatSpotBeamPositionAllocator | ( | ) |
Default constructor.
Definition at line 318 of file satellite-position-allocator.cc.
ns3::SatSpotBeamPositionAllocator::SatSpotBeamPositionAllocator | ( | uint32_t | beamId, |
Ptr< SatAntennaGainPatternContainer > | patternContainer, | ||
GeoCoordinate | geoPos | ||
) |
SatSpotBeamPositionAllocator constructor.
beamId | Beam id to which we are placing an UT |
patternContainer | Container holding the antenna patterns |
geoPos | GEO coordinate of the satellite for elevation angle calculations |
Definition at line 324 of file satellite-position-allocator.cc.
|
virtual |
Destructor for SatSpotBeamPositionAllocator.
Definition at line 335 of file satellite-position-allocator.cc.
|
virtual |
Reimplemented from ns3::SatPositionAllocator.
Definition at line 407 of file satellite-position-allocator.cc.
References m_altitude.
|
virtual |
Get next position.
Implements ns3::SatPositionAllocator.
Definition at line 348 of file satellite-position-allocator.cc.
References ns3::GeoCoordinate::GetLatitude(), ns3::GeoCoordinate::GetLongitude(), m_altitude, m_antennaGainPatterns, m_geoPos, m_minElevationAngleInDeg, m_targetBeamId, MAX_TRIES, and ns3::GeoCoordinate::SetAltitude().
|
static |
Get the type ID.
Definition at line 296 of file satellite-position-allocator.cc.
References m_altitude, and m_minElevationAngleInDeg.
void ns3::SatSpotBeamPositionAllocator::SetAltitude | ( | Ptr< RandomVariableStream > | altitude | ) |
Definition at line 340 of file satellite-position-allocator.cc.
References m_altitude.
|
private |
A random variable stream for altitude.
Definition at line 301 of file satellite-position-allocator.h.
Referenced by AssignStreams(), GetNextGeoPosition(), GetTypeId(), and SetAltitude().
|
private |
Antenna pattern used to check that the give position is valid based on antenna gains.
I.e. UT should be placed into a position where the m_targetBeamId has the best antenna gain.
Definition at line 291 of file satellite-position-allocator.h.
Referenced by GetNextGeoPosition().
|
private |
Position of the GEO satellite.
Definition at line 296 of file satellite-position-allocator.h.
Referenced by GetNextGeoPosition().
|
private |
Minimum accepted elevation angle in degrees for UTs.
This is placed to guarantee that UTs are not positioned into too low elevation angles (high latitudes, longitudes far from GEO satellite latitude).
Definition at line 284 of file satellite-position-allocator.h.
Referenced by GetNextGeoPosition(), and GetTypeId().
|
private |
Target beam id to which the UT is tried to be placed.
Definition at line 276 of file satellite-position-allocator.h.
Referenced by GetNextGeoPosition().
|
staticconstexprprivate |
Max number of tries to pick a random position for a UT.
Definition at line 266 of file satellite-position-allocator.h.
Referenced by GetNextGeoPosition().
|
staticconstexprprivate |
Minimum accepted antenna gain for a UT.
Definition at line 271 of file satellite-position-allocator.h.