Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Classes
Class List
Class Hierarchy
Class Members
All
!
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
f
k
l
m
n
o
p
r
s
t
v
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
Enumerator
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
gtsam
3rdparty
GeographicLib
examples
examples/example-GravityCircle.cpp
Go to the documentation of this file.
1
// Example of using the GeographicLib::GravityCircle class
2
3
#include <iostream>
4
#include <exception>
5
#include <
GeographicLib/GravityModel.hpp
>
6
#include <
GeographicLib/GravityCircle.hpp
>
7
8
using namespace
std
;
9
using namespace
GeographicLib
;
10
11
int
main
() {
12
try
{
13
GravityModel
grav(
"egm96"
);
14
double
lat
= 27.99,
lon0
= 86.93,
h
= 8820;
// Mt Everest
15
{
16
// Slow method of evaluating the values at several points on a circle of
17
// latitude.
18
for
(
int
i
= -5;
i
<= 5; ++
i
) {
19
double
lon
=
lon0
+
i
* 0.2;
20
double
gx, gy, gz;
21
grav.
Gravity
(
lat
,
lon
,
h
, gx, gy, gz);
22
cout <<
lon
<<
" "
<< gx <<
" "
<< gy <<
" "
<< gz <<
"\n"
;
23
}
24
}
25
{
26
// Fast method of evaluating the values at several points on a circle of
27
// latitude using GravityCircle.
28
GravityCircle
circ = grav.
Circle
(
lat
,
h
);
29
for
(
int
i
= -5;
i
<= 5; ++
i
) {
30
double
lon
=
lon0
+
i
* 0.2;
31
double
gx, gy, gz;
32
circ.
Gravity
(
lon
, gx, gy, gz);
33
cout <<
lon
<<
" "
<< gx <<
" "
<< gy <<
" "
<< gz <<
"\n"
;
34
}
35
}
36
}
37
catch
(
const
exception&
e
) {
38
cerr <<
"Caught exception: "
<<
e
.what() <<
"\n"
;
39
return
1;
40
}
41
}
GeographicLib::GravityCircle
Gravity on a circle of latitude.
Definition:
GravityCircle.hpp:41
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
GeographicLib
Namespace for GeographicLib.
Definition:
JacobiConformal.hpp:15
main
int main()
Definition:
examples/example-GravityCircle.cpp:11
example::lon0
static constexpr double lon0
Definition:
testGPSFactor.cpp:41
h
const double h
Definition:
testSimpleHelicopter.cpp:19
GravityModel.hpp
Header for GeographicLib::GravityModel class.
GravityCircle.hpp
Header for GeographicLib::GravityCircle 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::GravityCircle::Gravity
Math::real Gravity(real lon, real &gx, real &gy, real &gz) const
Definition:
src/GravityCircle.cpp:19
std
Definition:
BFloat16.h:88
GeographicLib::GravityModel::Circle
GravityCircle Circle(real lat, real h, unsigned caps=ALL) const
Definition:
src/GravityModel.cpp:307
lon
static const double lon
Definition:
testGeographicLib.cpp:34
GeographicLib::GravityModel
Model of the earth's gravity field.
Definition:
GravityModel.hpp:83
i
int i
Definition:
BiCGSTAB_step_by_step.cpp:9
lat
static const double lat
Definition:
testGeographicLib.cpp:34
gtsam
Author(s):
autogenerated on Fri Mar 28 2025 03:01:31