CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
geom
GeoLocation.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#pragma once
8
9
#include "
carla/MsgPack.h
"
10
11
namespace
carla
{
12
namespace
geom
{
13
14
class
GeoLocation
{
15
public
:
16
17
// =========================================================================
18
// -- Public data members --------------------------------------------------
19
// =========================================================================
20
21
double
latitude
= 0.0;
22
23
double
longitude
= 0.0;
24
25
double
altitude
= 0.0;
26
27
// =========================================================================
28
// -- Constructors ---------------------------------------------------------
29
// =========================================================================
30
31
GeoLocation
() =
default
;
32
33
GeoLocation
(
double
latitude
,
double
longitude
,
double
altitude
)
34
:
latitude
(
latitude
),
35
longitude
(
longitude
),
36
altitude
(
altitude
) {}
37
38
// =========================================================================
39
// -- Comparison operators -------------------------------------------------
40
// =========================================================================
41
42
bool
operator==
(
const
GeoLocation
&rhs)
const
{
43
return
(
latitude
== rhs.
latitude
) && (
longitude
== rhs.
longitude
) && (
altitude
== rhs.
altitude
);
44
}
45
46
bool
operator!=
(
const
GeoLocation
&rhs)
const
{
47
return
!(*
this
== rhs);
48
}
49
50
MSGPACK_DEFINE_ARRAY
(
latitude
,
longitude
,
altitude
);
51
};
52
53
}
// namespace geom
54
}
// namespace carla
MsgPack.h
carla::geom::GeoLocation::altitude
double altitude
Definition
GeoLocation.h:25
carla::geom::GeoLocation::MSGPACK_DEFINE_ARRAY
MSGPACK_DEFINE_ARRAY(latitude, longitude, altitude)
carla::geom::GeoLocation::GeoLocation
GeoLocation(double latitude, double longitude, double altitude)
Definition
GeoLocation.h:33
carla::geom::GeoLocation::latitude
double latitude
Definition
GeoLocation.h:21
carla::geom::GeoLocation::operator!=
bool operator!=(const GeoLocation &rhs) const
Definition
GeoLocation.h:46
carla::geom::GeoLocation::GeoLocation
GeoLocation()=default
carla::geom::GeoLocation::operator==
bool operator==(const GeoLocation &rhs) const
Definition
GeoLocation.h:42
carla::geom::GeoLocation::longitude
double longitude
Definition
GeoLocation.h:23
carla::geom
Definition
Misc.h:24
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
Generated by
1.18.0