A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
leo-orbital-shell.h
Go to the documentation of this file.
1
// Copyright (c) Tim Schubert
2
//
3
// SPDX-License-Identifier: GPL-2.0-only
4
//
5
// Author: Tim Schubert <ns-3-leo@timschubert.net>
6
// Porting: Thiago Miyazaki <miyathiago@gmail.com> <t.miyazaki@unesp.br>
7
8
#ifndef LEO_ORBITAL_SHELL_H
9
#define LEO_ORBITAL_SHELL_H
10
11
#include "ns3/uinteger.h"
12
13
/**
14
* @file
15
* @ingroup leo
16
*/
17
18
namespace
ns3
19
{
20
class
LeoOrbitalShell
;
21
22
/**
23
* @brief Serialize an orbit parameters in csv format
24
*
25
* Serialized orbit parameters as a comma-separated list in this order:
26
* - altitude (km, from earth surface)
27
* - inclination (degrees relative to equator)
28
* - number of orbital planes
29
* - number of satellites per plane
30
*
31
* Planes are evenly spaced by 360 degrees divided by the number of planes, starting from the prime
32
* meridian for Walker Delta, or 180 degrees for Walker Star.
33
*
34
* Example: "700,98,2,12" (700 km altitude, 98 degrees of inclination, 2 planes, 12
35
* satellites/plane).
36
*
37
* @return the stream
38
* @param os the stream
39
* @param [in] orbit is an Orbit
40
*/
41
std::ostream&
operator<<
(std::ostream& os,
const
LeoOrbitalShell
& orbit);
42
43
/**
44
* @brief Deserialize an orbit in csv format
45
*
46
* Deserialized orbit parameters as a comma-separated list in this order:
47
* - altitude (km, from earth surface)
48
* - inclination (degrees relative to equator)
49
* - number of orbital planes
50
* - number of satellites per plane
51
* - Walker Delta phasing factor (optional, default 0)
52
* - RAAN span in degrees (optional, default 360)
53
*
54
*
55
* Planes are evenly spaced by 360 degrees divided by the number of planes, starting from the prime
56
* meridian for Walker Delta, or 180 degrees for Walker Star.
57
*
58
* Example: "700,98,2,12" (700 km altitude, 98 degrees of inclination, 2 planes, 12
59
* satellites/plane).
60
*
61
* If deserialization fails due to unexpected fields/comments/text, the orbit is initialized with
62
* all zero fields. Input stream error flags are cleared to continue parsing, so comments can be
63
* added, except in lines with orbital parameters.
64
*
65
* @return the stream
66
* @param is the stream
67
* @param [out] orbit is the Orbit
68
*/
69
std::istream&
operator>>
(std::istream& is,
LeoOrbitalShell
& orbit);
70
71
/**
72
* @ingroup leo
73
* @brief Orbit definition
74
*/
75
class
LeoOrbitalShell
76
{
77
public
:
78
/// constructor
79
LeoOrbitalShell
() =
default
;
80
81
/**
82
* @brief Constructor
83
* @param a altitude (km, from earth surface)
84
* @param i inclination (degrees)
85
* @param p number of planes
86
* @param s number of satellites per plane
87
* @param f Walker Delta phasing factor (default 0)
88
* @param r RAAN span in degrees (360 for Walker Delta, 180 for Walker Star)
89
*/
90
LeoOrbitalShell
(
double
a,
91
double
i,
92
std::size_t p,
93
std::size_t s,
94
double
f = 0,
95
double
r
= 360.0)
96
:
alt
(a),
97
inc
(i),
98
planes
(p),
99
sats
(s),
100
phasing
(f),
101
raanSpanDeg
(
r
)
102
{
103
}
104
105
/// Altitude of orbit (km, from earth surface)
106
double
alt
;
107
/// Inclination of orbit (degrees)
108
double
inc
;
109
/// Number of planes with that altitude and inclination
110
std::size_t
planes
;
111
/// Number of satellites in those planes
112
std::size_t
sats
;
113
/// Walker Delta phasing factor F (0 means no inter-plane stagger)
114
double
phasing
{0};
115
/// RAAN span in degrees (360 for Walker Delta, 180 for Walker Star)
116
double
raanSpanDeg
{360.0};
117
};
118
119
};
// namespace ns3
120
121
#endif
r
uint32_t r
Definition
cairo-wideint.c:775
ns3::LeoOrbitalShell
Orbit definition.
Definition
leo-orbital-shell.h:76
ns3::LeoOrbitalShell::inc
double inc
Inclination of orbit (degrees).
Definition
leo-orbital-shell.h:108
ns3::LeoOrbitalShell::LeoOrbitalShell
LeoOrbitalShell()=default
constructor
ns3::LeoOrbitalShell::sats
std::size_t sats
Number of satellites in those planes.
Definition
leo-orbital-shell.h:112
ns3::LeoOrbitalShell::raanSpanDeg
double raanSpanDeg
RAAN span in degrees (360 for Walker Delta, 180 for Walker Star).
Definition
leo-orbital-shell.h:116
ns3::LeoOrbitalShell::planes
std::size_t planes
Number of planes with that altitude and inclination.
Definition
leo-orbital-shell.h:110
ns3::LeoOrbitalShell::alt
double alt
Altitude of orbit (km, from earth surface).
Definition
leo-orbital-shell.h:106
ns3::LeoOrbitalShell::phasing
double phasing
Walker Delta phasing factor F (0 means no inter-plane stagger).
Definition
leo-orbital-shell.h:114
ns3::LeoOrbitalShell::LeoOrbitalShell
LeoOrbitalShell(double a, double i, std::size_t p, std::size_t s, double f=0, double r=360.0)
Constructor.
Definition
leo-orbital-shell.h:90
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition
angles.cc:148
ns3::operator>>
std::istream & operator>>(std::istream &is, Angles &a)
Definition
angles.cc:172
src
mobility
model
leo-orbital-shell.h
Generated on
for ns-3 by
1.16.1