CARLA
GnssMeasurement.h
Go to the documentation of this file.
1 // Copyright (c) 2019 Intel Labs.
2 //
3 // This work is licensed under the terms of the MIT license.
4 // For a copy, see <https://opensource.org/licenses/MIT>.
5 
6 #pragma once
7 
10 
12 
13 namespace carla {
14 namespace sensor {
15 namespace data {
16 
17  /// A change of GNSS Measurement.
18  class GnssMeasurement : public SensorData {
19 
20  using Super = SensorData;
21 
22  protected:
23 
25 
26  friend Serializer;
27 
28  explicit GnssMeasurement(const RawData &&data)
29  : Super(data){
30 
32  _geo_location = gnss_data;
33 
34  }
35 
36  public:
37 
39  return _geo_location;
40  }
41 
42  double GetLongitude() const {
43  return _geo_location.longitude;
44  }
45 
46  double GetLatitude() const {
47  return _geo_location.latitude;
48  }
49 
50  double GetAltitude() const {
51  return _geo_location.altitude;
52  }
53 
54  private:
55 
57 
58  };
59 
60 } // namespace data
61 } // namespace sensor
62 } // namespace carla
GnssMeasurement(const RawData &&data)
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
SensorData(size_t frame, double timestamp, const rpc::Transform &sensor_transform)
Definition: SensorData.h:25
Base class for all the objects containing data generated by a sensor.
Definition: SensorData.h:20
static geom::GeoLocation DeserializeRawData(const RawData &message)
A change of GNSS Measurement.
geom::GeoLocation GetGeoLocation() const
Wrapper around the raw data generated by a sensor plus some useful meta-information.
Definition: RawData.h:20