mars_lib  0.1.0.3dc76ee85e09
Modular and Robust Sensor-Fusion
empty_sensor_state_type.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 EMPTYSENSORSTATETYPE_H
12 #define EMPTYSENSORSTATETYPE_H
13 
15 #include <Eigen/Dense>
16 
17 namespace mars
18 {
20 {
21 public:
22  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
23 
24  Eigen::Vector3d value_;
25 
26  EmptySensorStateType() : BaseStates(3) // cov size
27  {
28  value_.setZero();
29  }
30 
31  static std::string get_csv_state_header_string()
32  {
33  std::stringstream os;
34  os << "t, ";
35  os << "value";
36 
37  return os.str();
38  }
39 
45  std::string to_csv_string(const double& timestamp) const
46  {
47  std::stringstream os;
48  os.precision(17);
49  os << timestamp;
50 
51  os << ", " << value_(0) << ", " << value_(1) << ", " << value_(2);
52  return os.str();
53  }
54 };
55 } // namespace mars
56 #endif // EMPTYSENSORSTATETYPE_H
The BaseStates class is used to ensure that all sensor data classes define a covariance size for the ...
Definition: base_states.h:23
Definition: empty_sensor_state_type.h:20
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d value_
Definition: empty_sensor_state_type.h:24
std::string to_csv_string(const double &timestamp) const
to_csv_string export state to single csv string
Definition: empty_sensor_state_type.h:45
EmptySensorStateType()
Definition: empty_sensor_state_type.h:26
static std::string get_csv_state_header_string()
Definition: empty_sensor_state_type.h:31
Definition: buffer.h:27