Coverage Control Library
Loading...
Searching...
No Matches
geographiclib_wrapper.h
Go to the documentation of this file.
1
/*
2
* This file is part of the CoverageControl library
3
*
4
* Author: Saurav Agarwal
5
* Contact: sauravag@seas.upenn.edu, agr.saurav1@gmail.com
6
* Repository: https://github.com/KumarRobotics/CoverageControl
7
*
8
* Copyright (c) 2024, Saurav Agarwal
9
*
10
* The CoverageControl library is free software: you can redistribute it and/or
11
* modify it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or (at your
13
* option) any later version.
14
*
15
* The CoverageControl library is distributed in the hope that it will be
16
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18
* Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License along with
21
* CoverageControl library. If not, see <https://www.gnu.org/licenses/>.
22
*/
23
32
#ifndef CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GEOGRAPHICLIB_WRAPPER_H_
33
#define CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GEOGRAPHICLIB_WRAPPER_H_
34
35
#include <GeographicLib/LocalCartesian.hpp>
36
37
#include "
CoverageControl/typedefs.h
"
38
39
namespace
CoverageControl
{
40
41
class
GeoLocalTransform
{
42
private
:
43
GeographicLib::LocalCartesian geo_obj_;
44
45
public
:
46
GeoLocalTransform
(
double
const
lat,
double
const
lon,
double
const
height) {
47
geo_obj_ = GeographicLib::LocalCartesian(lat, lon, height);
48
}
49
50
void
Reset
(
double
const
lat,
double
const
lon,
double
const
height) {
51
geo_obj_.Reset(lat, lon, height);
52
}
53
54
Point3
Forward
(
double
const
lat,
double
const
lon,
55
double
const
height)
const
{
56
Point3
xyz;
57
geo_obj_.Forward(lat, lon, height, xyz[0], xyz[1], xyz[2]);
58
return
xyz;
59
}
60
61
Point3
Reverse
(
double
const
x,
double
const
y,
double
const
height)
const
{
62
Point3
lla;
63
geo_obj_.Reverse(x, y, height, lla[0], lla[1], lla[2]);
64
return
lla;
65
}
66
};
67
68
}
/* namespace CoverageControl */
69
#endif
// CPPSRC_CORE_INCLUDE_COVERAGECONTROL_GEOGRAPHICLIB_WRAPPER_H_
CoverageControl::GeoLocalTransform
Definition
geographiclib_wrapper.h:41
CoverageControl::GeoLocalTransform::Forward
Point3 Forward(double const lat, double const lon, double const height) const
Definition
geographiclib_wrapper.h:54
CoverageControl::GeoLocalTransform::Reset
void Reset(double const lat, double const lon, double const height)
Definition
geographiclib_wrapper.h:50
CoverageControl::GeoLocalTransform::Reverse
Point3 Reverse(double const x, double const y, double const height) const
Definition
geographiclib_wrapper.h:61
CoverageControl::GeoLocalTransform::GeoLocalTransform
GeoLocalTransform(double const lat, double const lon, double const height)
Definition
geographiclib_wrapper.h:46
CoverageControl::Point3
Eigen::Vector3d Point3
Definition
typedefs.h:46
CoverageControl
Namespace for the CoverageControl library.
Definition
abstract_controller.h:34
typedefs.h
Contains typedefs for the library.
cppsrc
core
include
CoverageControl
geographiclib_wrapper.h
Generated by
1.12.0