Builds a node container of nodes with LEO positions using a list of orbit definitions. More...
#include "leo-orbit-node-helper.h"
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. | |
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.
Construct a LEO Orbit Node Helper.
| resolution | time 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.
|
virtualdefault |
destructor
References nodes.
| 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.
| orbit | Orbit definition containing the number of planes and the number of satellites per plane. |
Definition at line 47 of file leo-orbit-node-helper.cc.
References ns3::LeoOrbitalShell::planes, and ns3::LeoOrbitalShell::sats.
Referenced by CreateNodesAndInstallMobility().
| NodeContainer ns3::LeoOrbitNodeHelper::CreateNodesAndInstallMobility | ( | const LeoOrbitalShell & | orbit | ) |
Create satellite nodes and install orbital mobility from a single orbit definition.
| orbit | orbit definition |
Definition at line 53 of file leo-orbit-node-helper.cc.
References ns3::NodeContainer::Add(), CalculateNumberOfOrbitSatellites(), Install(), m_nodeFactory, and NS_LOG_FUNCTION.
| 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:
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.
| orbitFile | path to orbit definitions file |
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().
| NodeContainer ns3::LeoOrbitNodeHelper::CreateNodesAndInstallMobility | ( | const std::vector< LeoOrbitalShell > & | orbits | ) |
Create satellite nodes and install orbital mobility from a vector of orbital parameters.
| orbits | orbit definitions |
Definition at line 163 of file leo-orbit-node-helper.cc.
References CreateNodesAndInstallMobility(), nodes, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
| void ns3::LeoOrbitNodeHelper::Install | ( | NodeContainer | nodes, |
| const LeoOrbitalShell & | orbit ) |
Install orbital mobility on a node container using an orbit definition.
| nodes | node container |
| orbit | orbit 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().
| void ns3::LeoOrbitNodeHelper::SetAttribute | ( | std::string | name, |
| const AttributeValue & | value ) |
Set an attribute for each node.
| name | name of the attribute |
| value | value of the attribute |
Definition at line 33 of file leo-orbit-node-helper.cc.
References m_nodeFactory, and NS_LOG_FUNCTION.
| void ns3::LeoOrbitNodeHelper::SetResolution | ( | Time | resolution | ) |
Set the time resolution for course change notifications.
| resolution | the 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.
|
private |
Node factory.
Definition at line 122 of file leo-orbit-node-helper.h.
Referenced by LeoOrbitNodeHelper(), CreateNodesAndInstallMobility(), and SetAttribute().
|
private |
Time interval between CourseChange notifications.
Definition at line 125 of file leo-orbit-node-helper.h.
Referenced by LeoOrbitNodeHelper(), Install(), and SetResolution().