mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
Loading...
Searching...
No Matches
pressure_utils.h
Go to the documentation of this file.
1// Copyright (C) 2022-2023 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 PressureInit() = default;
35
40 PressureInit(const double& init_duration);
41
42 void Reset();
43
53 Pressure get_press_mean(const std::shared_ptr<SensorAbsClass>& sensor_handle, const Buffer& buffer,
54 const Pressure& cur_meas, const Time& cur_time);
55
56 bool IsDone();
57}; // class PressureInit
58} // namespace mars
59
60#endif // PRESSURE_UTILS_H
BufferClass that holds mars::BufferEntryType elements and provides access methods.
Definition buffer.h:35
Pressure initalization object to calcualte mean initial pressure.
Definition pressure_utils.h:27
PressureInit(const double &init_duration)
PressureInit()=default
bool b_is_initialized_
Flag to determine if initialization was performed successfully.
Definition pressure_utils.h:30
double init_duration_
Duration in sec used to average initialization.
Definition pressure_utils.h:29
bool b_verbose_
Flag to enable verbos output.
Definition pressure_utils.h:31
Pressure get_press_mean(const std::shared_ptr< SensorAbsClass > &sensor_handle, const Buffer &buffer, const Pressure &cur_meas, const Time &cur_time)
Calculates the mean pressure of the given sensor_handles's measurement.
Definition time.h:20
Definition buffer.h:27
The Pressure struct describes the raw pressure measurement used for conversion later.
Definition pressure_conversion.h:25