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-TransverseMercatorExact.cpp
Go to the documentation of this file.
1
// Example of using the GeographicLib::TransverseMercatorExact class
2
3
#include <iostream>
4
#include <iomanip>
5
#include <exception>
6
#include <
GeographicLib/TransverseMercatorExact.hpp
>
7
8
using namespace
std
;
9
using namespace
GeographicLib
;
10
11
int
main
() {
12
try
{
13
TransverseMercatorExact
proj(Constants::WGS84_a(), Constants::WGS84_f(),
14
Constants::UTM_k0());
15
// Alternatively:
16
// const TransverseMercatorExact& proj = TransverseMercatorExact::UTM();
17
double
lon0
= -75;
// Central meridian for UTM zone 18
18
{
19
// Sample forward calculation
20
double
lat
= 40.3,
lon
= -74.7;
// Princeton, NJ
21
double
x
,
y
;
22
proj.
Forward
(
lon0
,
lat
,
lon
,
x
,
y
);
23
cout <<
x
<<
" "
<<
y
<<
"\n"
;
24
}
25
{
26
// Sample reverse calculation
27
double
x
= 25e3,
y
= 4461e3;
28
double
lat
,
lon
;
29
proj.
Reverse
(
lon0
,
x
,
y
,
lat
,
lon
);
30
cout <<
lat
<<
" "
<<
lon
<<
"\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::TransverseMercatorExact
An exact implementation of the transverse Mercator projection.
Definition:
TransverseMercatorExact.hpp:83
GeographicLib
Namespace for GeographicLib.
Definition:
JacobiConformal.hpp:15
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
GeographicLib::TransverseMercatorExact::Reverse
void Reverse(real lon0, real x, real y, real &lat, real &lon, real &gamma, real &k) const
Definition:
src/TransverseMercatorExact.cpp:408
y
Scalar * y
Definition:
level1_cplx_impl.h:124
main
int main()
Definition:
examples/example-TransverseMercatorExact.cpp:11
std
Definition:
BFloat16.h:88
GeographicLib::TransverseMercatorExact::Forward
void Forward(real lon0, real lat, real lon, real &x, real &y, real &gamma, real &k) const
Definition:
src/TransverseMercatorExact.cpp:348
lon
static const double lon
Definition:
testGeographicLib.cpp:34
TransverseMercatorExact.hpp
Header for GeographicLib::TransverseMercatorExact class.
lat
static const double lat
Definition:
testGeographicLib.cpp:34
gtsam
Author(s):
autogenerated on Fri Mar 28 2025 03:01:32