mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
Loading...
Searching...
No Matches
gps_measurement_type.h
Go to the documentation of this file.
1// Copyright (C) 2021 Christian Brommer, Control of Networked Systems, University of Klagenfurt, Austria.
2//
3// All rights reserved.
4//
5// This software is licensed under the terms of the BSD-2-Clause-License with
6// no commercial use allowed, the full terms of which are made available
7// in the LICENSE file. No license in patents is granted.
8//
9// You can contact the author at <christian.brommer@ieee.org>
10
11#ifndef GPSMEASUREMENTTYPE_H
12#define GPSMEASUREMENTTYPE_H
13
16#include <utility>
17
18namespace mars
19{
21{
22public:
24
25 GpsMeasurementType(double latitude, double longitude, double altitude)
26 : coordinates_(std::move(latitude), std::move(longitude), std::move(altitude))
27 {
28 }
29
30 static std::string get_csv_state_header_string()
31 {
32 std::stringstream os;
33 os << "t, ";
34 os << "lat, lon, alt";
35
36 return os.str();
37 }
38
39 std::string to_csv_string(const double& timestamp) const
40 {
41 std::stringstream os;
42 os.precision(17);
43 os << timestamp;
44
45 os << ", " << coordinates_.latitude_ << ", " << coordinates_.longitude_ << ", " << coordinates_.altitude_;
46
47 return os.str();
48 }
49};
50} // namespace mars
51#endif // GPS_MEASUREMENTTYPE_H
Definition measurement_base_class.h:20
Definition gps_measurement_type.h:21
static std::string get_csv_state_header_string()
Definition gps_measurement_type.h:30
std::string to_csv_string(const double &timestamp) const
Definition gps_measurement_type.h:39
GpsCoordinates coordinates_
Definition gps_measurement_type.h:23
GpsMeasurementType(double latitude, double longitude, double altitude)
Definition gps_measurement_type.h:25
Definition buffer.h:27
The GpsCoordinates struct.
Definition gps_conversion.h:22
double longitude_
Definition gps_conversion.h:29
double altitude_
Definition gps_conversion.h:30
double latitude_
Definition gps_conversion.h:28