CARLA
Loading...
Searching...
No Matches
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
11namespace carla {
12namespace geom {
13
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
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
51 };
52
53} // namespace geom
54} // namespace carla
MSGPACK_DEFINE_ARRAY(latitude, longitude, altitude)
GeoLocation(double latitude, double longitude, double altitude)
Definition GeoLocation.h:33
bool operator!=(const GeoLocation &rhs) const
Definition GeoLocation.h:46
bool operator==(const GeoLocation &rhs) const
Definition GeoLocation.h:42
This file contains definitions of common data structures used in traffic manager.