A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
mobility
model
geographic-positions.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2014 University of Washington
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Benjamin Cizdziel <ben.cizdziel@gmail.com>
19
*/
20
21
#include <ns3/vector.h>
22
#include <ns3/random-variable-stream.h>
23
24
#ifndef GEOGRAPHIC_POSITIONS_H
25
#define GEOGRAPHIC_POSITIONS_H
26
27
namespace
ns3
28
{
29
35
class
GeographicPositions
36
{
37
38
public
:
50
enum
EarthSpheroidType
51
{
52
SPHERE
,
53
GRS80
,
54
WGS84
55
};
56
71
static
Vector
GeographicToCartesianCoordinates
(
double
latitude,
72
double
longitude,
73
double
altitude,
74
EarthSpheroidType
sphType);
75
101
static
std::list<Vector>
RandCartesianPointsAroundGeographicPoint
(
double
originLatitude,
102
double
originLongitude,
103
double
maxAltitude,
104
int
numPoints,
105
double
maxDistFromOrigin,
106
Ptr<UniformRandomVariable>
uniRand);
107
108
};
109
110
}
// namespace ns3
111
112
#endif
/* GEOGRAPHIC_POSITIONS_H */
113
ns3::GeographicPositions::WGS84
Definition:
geographic-positions.h:54
ns3::Ptr< UniformRandomVariable >
ns3::GeographicPositions::SPHERE
Definition:
geographic-positions.h:52
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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:89
ns3::GeographicPositions
Consists of methods dealing with Earth geographic coordinates and locations.
Definition:
geographic-positions.h:35
ns3::GeographicPositions::EarthSpheroidType
EarthSpheroidType
Spheroid model to use for earth: perfect sphere (SPHERE), Geodetic Reference System 1980 (GRS80)...
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:53
ns3::GeographicPositions::GRS80
Definition:
geographic-positions.h:53
Generated on Wed Nov 7 2018 10:02:05 for ns-3 by
1.8.14