Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
gtsam
3rdparty
GeographicLib
examples
examples/example-GravityModel.cpp
Go to the documentation of this file.
1
// Example of using the GeographicLib::GravityModel class
2
3
#include <iostream>
4
#include <exception>
5
#include <
GeographicLib/GravityModel.hpp
>
6
7
using namespace
std
;
8
using namespace
GeographicLib
;
9
10
int
main
() {
11
try
{
12
GravityModel
grav(
"egm96"
);
13
double
lat
= 27.99,
lon
= 86.93,
h
= 8820;
// Mt Everest
14
double
gx, gy, gz;
15
grav.
Gravity
(lat,
lon
,
h
, gx, gy, gz);
16
cout << gx <<
" "
<< gy <<
" "
<< gz <<
"\n"
;
17
}
18
catch
(
const
exception&
e
) {
19
cerr <<
"Caught exception: "
<< e.what() <<
"\n"
;
20
return
1;
21
}
22
}
main
int main()
Definition:
examples/example-GravityModel.cpp:10
lat
static const double lat
Definition:
testGeographicLib.cpp:35
std
Definition:
Half.h:150
GravityModel.hpp
Header for GeographicLib::GravityModel class.
GeographicLib::GravityModel::Gravity
Math::real Gravity(real lat, real lon, real h, real &gx, real &gy, real &gz) const
Definition:
src/GravityModel.cpp:289
GeographicLib
Namespace for GeographicLib.
Definition:
JacobiConformal.hpp:15
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
GeographicLib::GravityModel
Model of the earth's gravity field.
Definition:
GravityModel.hpp:83
h
const double h
Definition:
testSimpleHelicopter.cpp:16
lon
static const double lon
Definition:
testGeographicLib.cpp:35
gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:02