A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::LeoOrbitNodeHelper Class Reference

Builds a node container of nodes with LEO positions using a list of orbit definitions. More...

#include "leo-orbit-node-helper.h"

Collaboration diagram for ns3::LeoOrbitNodeHelper:

Public Member Functions

 LeoOrbitNodeHelper (const Time &resolution=Seconds(0))
 Construct a LEO Orbit Node Helper.
virtual ~LeoOrbitNodeHelper ()=default
 destructor
std::size_t CalculateNumberOfOrbitSatellites (const LeoOrbitalShell &orbit)
 Calculates the total number of satellites in a given LEO orbit.
NodeContainer CreateNodesAndInstallMobility (const LeoOrbitalShell &orbit)
 Create satellite nodes and install orbital mobility from a single orbit definition.
NodeContainer CreateNodesAndInstallMobility (const std::string &orbitFile)
 Create satellite nodes and install orbital mobility from a CSV file.
NodeContainer CreateNodesAndInstallMobility (const std::vector< LeoOrbitalShell > &orbits)
 Create satellite nodes and install orbital mobility from a vector of orbital parameters.
void Install (NodeContainer nodes, const LeoOrbitalShell &orbit)
 Install orbital mobility on a node container using an orbit definition.
void SetAttribute (std::string name, const AttributeValue &value)
 Set an attribute for each node.
void SetResolution (Time resolution)
 Set the time resolution for course change notifications.

Private Attributes

ObjectFactory m_nodeFactory
 Node factory.
Time m_resolution
 Time interval between CourseChange notifications.

Detailed Description

Builds a node container of nodes with LEO positions using a list of orbit definitions.

Definition at line 32 of file leo-orbit-node-helper.h.

Constructor & Destructor Documentation

◆ LeoOrbitNodeHelper()

ns3::LeoOrbitNodeHelper::LeoOrbitNodeHelper ( const Time & resolution = Seconds(0))

Construct a LEO Orbit Node Helper.

Parameters
resolutiontime interval between CourseChange notifications on the installed mobility models. Smaller values produce more frequent notifications. Zero disables periodic notifications.

Definition at line 25 of file leo-orbit-node-helper.cc.

References ns3::Time::As(), m_nodeFactory, m_resolution, NS_LOG_FUNCTION, and ns3::Time::S.

Here is the call graph for this function:

◆ ~LeoOrbitNodeHelper()

virtual ns3::LeoOrbitNodeHelper::~LeoOrbitNodeHelper ( )
virtualdefault

destructor

References nodes.

Member Function Documentation

◆ CalculateNumberOfOrbitSatellites()

std::size_t ns3::LeoOrbitNodeHelper::CalculateNumberOfOrbitSatellites ( const LeoOrbitalShell & orbit)

Calculates the total number of satellites in a given LEO orbit.

This method determines the total number of satellites by multiplying the number of orbital planes by the number of satellites per plane.

Parameters
orbitOrbit definition containing the number of planes and the number of satellites per plane.
Returns
The total number of satellites in the specified orbit.

Definition at line 47 of file leo-orbit-node-helper.cc.

References ns3::LeoOrbitalShell::planes, and ns3::LeoOrbitalShell::sats.

Referenced by CreateNodesAndInstallMobility().

Here is the caller graph for this function:

◆ CreateNodesAndInstallMobility() [1/3]

NodeContainer ns3::LeoOrbitNodeHelper::CreateNodesAndInstallMobility ( const LeoOrbitalShell & orbit)

Create satellite nodes and install orbital mobility from a single orbit definition.

Parameters
orbitorbit definition
Returns
a node container containing the created nodes

Definition at line 53 of file leo-orbit-node-helper.cc.

References ns3::NodeContainer::Add(), CalculateNumberOfOrbitSatellites(), Install(), m_nodeFactory, and NS_LOG_FUNCTION.

Here is the call graph for this function:

◆ CreateNodesAndInstallMobility() [2/3]

NodeContainer ns3::LeoOrbitNodeHelper::CreateNodesAndInstallMobility ( const std::string & orbitFile)

Create satellite nodes and install orbital mobility from a CSV file.

The CSV file contains one or more lines, each with 4-6 comma-separated columns:

  • altitude (km, from earth surface)
  • inclination (degrees relative to equator)
  • number of orbital planes
  • number of satellites per plane
  • phasing factor (optional, defaults to 0)
  • RAAN span in degrees (optional, defaults to 360)

See LeoOrbitalShell for the definition of these parameters.

Planes are evenly spaced by 360 degrees divided by the number of planes, starting from the prime meridian.

One example: 1150.0,53.0,32,50, represents 32 orbital planes with 50 satellites each, with 53 degrees of inclination in respect to the equator, and with an altitude of 1150 km.

Parameters
orbitFilepath to orbit definitions file
Returns
a node container containing the created nodes

Definition at line 118 of file leo-orbit-node-helper.cc.

References ns3::LeoOrbitalShell::alt, ns3::CsvReader::ColumnCount(), CreateNodesAndInstallMobility(), ns3::CsvReader::FetchNextRow(), ns3::CsvReader::GetValue(), ns3::LeoOrbitalShell::inc, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, NS_LOG_WARN, ns3::LeoOrbitalShell::phasing, ns3::LeoOrbitalShell::planes, ns3::LeoOrbitalShell::raanSpanDeg, ns3::CsvReader::RowNumber(), and ns3::LeoOrbitalShell::sats.

Referenced by CreateNodesAndInstallMobility(), and CreateNodesAndInstallMobility().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateNodesAndInstallMobility() [3/3]

NodeContainer ns3::LeoOrbitNodeHelper::CreateNodesAndInstallMobility ( const std::vector< LeoOrbitalShell > & orbits)

Create satellite nodes and install orbital mobility from a vector of orbital parameters.

Parameters
orbitsorbit definitions
Returns
a node container containing the created nodes

Definition at line 163 of file leo-orbit-node-helper.cc.

References CreateNodesAndInstallMobility(), nodes, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Here is the call graph for this function:

◆ Install()

void ns3::LeoOrbitNodeHelper::Install ( NodeContainer nodes,
const LeoOrbitalShell & orbit )

Install orbital mobility on a node container using an orbit definition.

Parameters
nodesnode container
orbitorbit definition

Definition at line 69 of file leo-orbit-node-helper.cc.

References ns3::LeoOrbitalShell::alt, ns3::LeoOrbitalShell::inc, m_resolution, nodes, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_WARN, ns3::LeoOrbitalShell::phasing, ns3::LeoOrbitalShell::planes, ns3::LeoOrbitalShell::raanSpanDeg, and ns3::LeoOrbitalShell::sats.

Referenced by CreateNodesAndInstallMobility().

Here is the caller graph for this function:

◆ SetAttribute()

void ns3::LeoOrbitNodeHelper::SetAttribute ( std::string name,
const AttributeValue & value )

Set an attribute for each node.

Parameters
namename of the attribute
valuevalue of the attribute

Definition at line 33 of file leo-orbit-node-helper.cc.

References m_nodeFactory, and NS_LOG_FUNCTION.

◆ SetResolution()

void ns3::LeoOrbitNodeHelper::SetResolution ( Time resolution)

Set the time resolution for course change notifications.

Parameters
resolutionthe time resolution

Definition at line 40 of file leo-orbit-node-helper.cc.

References ns3::Time::As(), m_resolution, NS_LOG_FUNCTION, and ns3::Time::S.

Here is the call graph for this function:

Member Data Documentation

◆ m_nodeFactory

ObjectFactory ns3::LeoOrbitNodeHelper::m_nodeFactory
private

Node factory.

Definition at line 122 of file leo-orbit-node-helper.h.

Referenced by LeoOrbitNodeHelper(), CreateNodesAndInstallMobility(), and SetAttribute().

◆ m_resolution

Time ns3::LeoOrbitNodeHelper::m_resolution
private

Time interval between CourseChange notifications.

Definition at line 125 of file leo-orbit-node-helper.h.

Referenced by LeoOrbitNodeHelper(), Install(), and SetResolution().


The documentation for this class was generated from the following files: