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-LocalCartesian.cpp
Go to the documentation of this file.
1
// Example of using the GeographicLib::LocalCartesian class
2
3
#include <iostream>
4
#include <exception>
5
#include <cmath>
6
#include <
GeographicLib/Geocentric.hpp
>
7
#include <
GeographicLib/LocalCartesian.hpp
>
8
9
using namespace
std
;
10
using namespace
GeographicLib
;
11
12
int
main
() {
13
try
{
14
Geocentric
earth(Constants::WGS84_a(), Constants::WGS84_f());
15
// Alternatively: const Geocentric& earth = Geocentric::WGS84();
16
const
double
lat0
= 48 + 50/60.0,
lon0
= 2 + 20/60.0;
// Paris
17
LocalCartesian
proj(
lat0
,
lon0
, 0, earth);
18
{
19
// Sample forward calculation
20
double
lat
= 50.9,
lon
= 1.8,
h
= 0;
// Calais
21
double
x
,
y
,
z
;
22
proj.
Forward
(
lat
,
lon
,
h
,
x
,
y
,
z
);
23
cout <<
x
<<
" "
<<
y
<<
" "
<<
z
<<
"\n"
;
24
}
25
{
26
// Sample reverse calculation
27
double
x
= -38e3,
y
= 230e3,
z
= -4e3;
28
double
lat
,
lon
,
h
;
29
proj.
Reverse
(
x
,
y
,
z
,
lat
,
lon
,
h
);
30
cout <<
lat
<<
" "
<<
lon
<<
" "
<<
h
<<
"\n"
;
31
}
32
}
33
catch
(
const
exception&
e
) {
34
cerr <<
"Caught exception: "
<<
e
.what() <<
"\n"
;
35
return
1;
36
}
37
}
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
GeographicLib
Namespace for GeographicLib.
Definition:
JacobiConformal.hpp:15
GeographicLib::LocalCartesian::Forward
void Forward(real lat, real lon, real h, real &x, real &y, real &z) const
Definition:
LocalCartesian.hpp:104
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition:
gnuplot_common_settings.hh:12
example::lon0
static constexpr double lon0
Definition:
testGPSFactor.cpp:41
h
const double h
Definition:
testSimpleHelicopter.cpp:19
GeographicLib::Geocentric
Geocentric coordinates
Definition:
Geocentric.hpp:67
Geocentric.hpp
Header for GeographicLib::Geocentric class.
example::lat0
static constexpr double lat0
Definition:
testGPSFactor.cpp:41
GeographicLib::LocalCartesian::Reverse
void Reverse(real x, real y, real z, real &lat, real &lon, real &h) const
Definition:
LocalCartesian.hpp:159
pybind_wrapper_test_script.z
z
Definition:
pybind_wrapper_test_script.py:61
y
Scalar * y
Definition:
level1_cplx_impl.h:124
std
Definition:
BFloat16.h:88
LocalCartesian.hpp
Header for GeographicLib::LocalCartesian class.
GeographicLib::LocalCartesian
Local cartesian coordinates.
Definition:
LocalCartesian.hpp:38
lon
static const double lon
Definition:
testGeographicLib.cpp:34
main
int main()
Definition:
examples/example-LocalCartesian.cpp:12
lat
static const double lat
Definition:
testGeographicLib.cpp:34
gtsam
Author(s):
autogenerated on Fri Mar 28 2025 03:01:31