A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
geographic-positions.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 University of Washington
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Benjamin Cizdziel <ben.cizdziel@gmail.com>
18
*/
19
20
#include <ns3/random-variable-stream.h>
21
#include <ns3/vector.h>
22
23
#ifndef GEOGRAPHIC_POSITIONS_H
24
#define GEOGRAPHIC_POSITIONS_H
25
26
namespace
ns3
27
{
28
34
class
GeographicPositions
35
{
36
public
:
48
enum
EarthSpheroidType
49
{
50
SPHERE
,
51
GRS80
,
52
WGS84
53
};
54
69
static
Vector
GeographicToCartesianCoordinates
(
double
latitude,
70
double
longitude,
71
double
altitude,
72
EarthSpheroidType
sphType);
73
92
static
Vector
CartesianToGeographicCoordinates
(Vector pos,
EarthSpheroidType
sphType);
93
119
static
std::list<Vector>
RandCartesianPointsAroundGeographicPoint
(
120
double
originLatitude,
121
double
originLongitude,
122
double
maxAltitude,
123
int
numPoints,
124
double
maxDistFromOrigin,
125
Ptr<UniformRandomVariable>
uniRand);
126
};
127
128
}
// namespace ns3
129
130
#endif
/* GEOGRAPHIC_POSITIONS_H */
ns3::GeographicPositions
Consists of methods dealing with Earth geographic coordinates and locations.
Definition:
geographic-positions.h:35
ns3::GeographicPositions::RandCartesianPointsAroundGeographicPoint
static std::list< Vector > RandCartesianPointsAroundGeographicPoint(double originLatitude, double originLongitude, double maxAltitude, int numPoints, double maxDistFromOrigin, Ptr< UniformRandomVariable > uniRand)
Generates uniformly distributed random points (in ECEF Cartesian coordinates) within a given altitude...
Definition:
geographic-positions.cc:169
ns3::GeographicPositions::EarthSpheroidType
EarthSpheroidType
Spheroid model to use for earth: perfect sphere (SPHERE), Geodetic Reference System 1980 (GRS80),...
Definition:
geographic-positions.h:49
ns3::GeographicPositions::WGS84
@ WGS84
Definition:
geographic-positions.h:52
ns3::GeographicPositions::GRS80
@ GRS80
Definition:
geographic-positions.h:51
ns3::GeographicPositions::SPHERE
@ SPHERE
Definition:
geographic-positions.h:50
ns3::GeographicPositions::GeographicToCartesianCoordinates
static Vector GeographicToCartesianCoordinates(double latitude, double longitude, double altitude, EarthSpheroidType sphType)
Converts earth geographic/geodetic coordinates (latitude and longitude in degrees) with a given altit...
Definition:
geographic-positions.cc:61
ns3::GeographicPositions::CartesianToGeographicCoordinates
static Vector CartesianToGeographicCoordinates(Vector pos, EarthSpheroidType sphType)
Inverse of GeographicToCartesianCoordinates using [1].
Definition:
geographic-positions.cc:97
ns3::Ptr< UniformRandomVariable >
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mobility
model
geographic-positions.h
Generated on Sun Mar 3 2024 17:11:05 for ns-3 by
1.9.1