mars_lib  0.1.0.3dc76ee85e09
Modular and Robust Sensor-Fusion
measurement_base_class.h
Go to the documentation of this file.
1 // Copyright (C) 2022 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 MEASUREMENT_BASE_CLASS_H
12 #define MEASUREMENT_BASE_CLASS_H
13 
15 #include <Eigen/Dense>
16 
17 namespace mars
18 {
19 class BaseMeas : public MeasInterface
20 {
21 public:
22  Eigen::MatrixXd meas_noise_;
23  bool has_meas_noise{ false };
24 
25  bool get_meas_noise(Eigen::MatrixXd* meas_noise)
26  {
27  if (this->has_meas_noise)
28  {
29  *meas_noise = this->meas_noise_;
30  return true;
31  }
32  else
33  {
34  meas_noise = nullptr;
35  return false;
36  }
37  }
38 
39  void set_meas_noise(const Eigen::MatrixXd& meas_noise)
40  {
41  this->meas_noise_ = meas_noise;
42  }
43 };
44 } // namespace mars
45 
46 #endif // MEASUREMENT_BASE_CLASS_H
Definition: measurement_base_class.h:20
void set_meas_noise(const Eigen::MatrixXd &meas_noise)
Definition: measurement_base_class.h:39
Eigen::MatrixXd meas_noise_
Definition: measurement_base_class.h:22
bool has_meas_noise
Definition: measurement_base_class.h:23
bool get_meas_noise(Eigen::MatrixXd *meas_noise)
get the measurement noise associated with the current sensor measurement
Definition: measurement_base_class.h:25
Definition: measurement_interface.h:20
Definition: buffer.h:27