mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
Loading...
Searching...
No Matches
gps_utils.h
Go to the documentation of this file.
1// Copyright (C) 2021 Martin Scheiber, Christian Brommer,
2// Control of Networked Systems, University of Klagenfurt, Austria.
3//
4// All rights reserved.
5//
6// This software is licensed under the terms of the BSD-2-Clause-License with
7// no commercial use allowed, the full terms of which are made available
8// in the LICENSE file. No license in patents is granted.
9//
10// You can contact the authors at <christian.brommer@ieee.org>
11// and <martin.scheiber@ieee.org>
12
13#ifndef PRESSURE_UTILS_H
14#define PRESSURE_UTILS_H
15
16#include <mars/buffer.h>
20
21namespace mars
22{
27{
28private:
29 double init_duration_{ 1.0 };
30 bool b_is_initialized_{ false };
31 bool b_verbose_{ false };
32
33public:
34 GPSInit() = default;
35 GPSInit(const double& init_duration);
36
40 void Reset();
41
50 GpsCoordinates get_gps_mean(const std::shared_ptr<SensorAbsClass>& sensor_handle, const Buffer& buffer,
51 const GpsCoordinates& cur_meas, const Time& cur_time);
52
56 void set_done();
57
62 bool IsDone() const;
63}; // class PressureInit
64} // namespace mars
65
66#endif // PRESSURE_UTILS_H
BufferClass that holds mars::BufferEntryType elements and provides access methods.
Definition buffer.h:35
The GPSInit class is an initializer for calculating the average coordinates over a given time window.
Definition gps_utils.h:27
void Reset()
Reset resets the initialization routine.
void set_done()
set_done sets the routine to done, even if no calculation was yet performed or unsuccesful
GPSInit(const double &init_duration)
GPSInit()=default
bool IsDone() const
IsDone returns the value of b_is_initialized_.
double init_duration_
window time to use measurements from
Definition gps_utils.h:29
GpsCoordinates get_gps_mean(const std::shared_ptr< SensorAbsClass > &sensor_handle, const Buffer &buffer, const GpsCoordinates &cur_meas, const Time &cur_time)
get_gps_mean calculates the mean over the given time window using the measurements in the buffer
bool b_is_initialized_
flag that determines if any previous initialization was successful
Definition gps_utils.h:30
bool b_verbose_
enable/disable output (currently hardcoded)
Definition gps_utils.h:31
Definition time.h:20
Definition buffer.h:27
The GpsCoordinates struct.
Definition gps_conversion.h:22