Allocate random positions within a circle (center and radius), uniformly distributed. More...
#include "satellite-position-allocator.h"
Public Member Functions | |
SatRandomCirclePositionAllocator () | |
Default constructor. More... | |
SatRandomCirclePositionAllocator (GeoCoordinate center, uint32_t radius) | |
Constructor with parameters. More... | |
virtual | ~SatRandomCirclePositionAllocator () |
Destructor for SatRandomCirclePositionAllocator. More... | |
virtual int64_t | AssignStreams (int64_t stream) |
virtual GeoCoordinate | GetNextGeoPosition (uint32_t satId=0) const |
Get next position. More... | |
void | SetCenter (GeoCoordinate center) |
void | SetRadius (uint32_t radius) |
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 | |
GeoCoordinate | m_center |
uint32_t | m_radius |
Ptr< RandomVariableStream > | m_rand |
Allocate random positions within a circle (center and radius), uniformly distributed.
Definition at line 178 of file satellite-position-allocator.h.
ns3::SatRandomCirclePositionAllocator::SatRandomCirclePositionAllocator | ( | ) |
Default constructor.
Definition at line 229 of file satellite-position-allocator.cc.
References m_rand.
ns3::SatRandomCirclePositionAllocator::SatRandomCirclePositionAllocator | ( | GeoCoordinate | center, |
uint32_t | radius | ||
) |
Constructor with parameters.
center | Center of the circle |
radius | Radius in meters |
Definition at line 234 of file satellite-position-allocator.cc.
References m_rand.
|
virtual |
Destructor for SatRandomCirclePositionAllocator.
Definition at line 242 of file satellite-position-allocator.cc.
|
virtual |
Reimplemented from ns3::SatPositionAllocator.
Definition at line 287 of file satellite-position-allocator.cc.
References m_rand.
|
virtual |
Get next position.
Implements ns3::SatPositionAllocator.
Definition at line 263 of file satellite-position-allocator.cc.
References ns3::GeoCoordinate::GetAltitude(), ns3::GeoCoordinate::GetLatitude(), ns3::GeoCoordinate::GetLongitude(), m_center, m_radius, m_rand, and ns3::GeoCoordinate::polarRadius_sphere.
|
static |
Get the type ID.
Definition at line 220 of file satellite-position-allocator.cc.
void ns3::SatRandomCirclePositionAllocator::SetCenter | ( | GeoCoordinate | center | ) |
Definition at line 247 of file satellite-position-allocator.cc.
References m_center.
void ns3::SatRandomCirclePositionAllocator::SetRadius | ( | uint32_t | radius | ) |
Definition at line 255 of file satellite-position-allocator.cc.
References m_radius.
|
private |
Definition at line 215 of file satellite-position-allocator.h.
Referenced by GetNextGeoPosition(), and SetCenter().
|
private |
Definition at line 216 of file satellite-position-allocator.h.
Referenced by GetNextGeoPosition(), and SetRadius().
|
private |
Definition at line 217 of file satellite-position-allocator.h.
Referenced by SatRandomCirclePositionAllocator(), AssignStreams(), and GetNextGeoPosition().