mars_lib  0.1.0.3dc76ee85e09
Modular and Robust Sensor-Fusion
pressure_sensor_state_type.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_SENSOR_STATE_TYPE_H
14 #define PRESSURE_SENSOR_STATE_TYPE_H
15 
17 #include <Eigen/Dense>
18 
19 namespace mars
20 {
22 {
23 public:
24  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
25 
26  Eigen::Vector3d p_ip_;
27  double bias_p_;
28  // technically also scale here, which is currently assumed one
29 
31  {
32  p_ip_.setZero();
33  bias_p_ = 0.0;
34  }
35 
36  static std::string get_csv_state_header_string()
37  {
38  std::stringstream os;
39  os << "t, ";
40  os << "p_ip_x, p_ip_y, p_ip_z, ";
41  os << "bias_p";
42 
43  return os.str();
44  }
45 
46  std::string to_csv_string(const double& timestamp) const
47  {
48  std::stringstream os;
49  os.precision(17);
50  os << timestamp;
51 
52  os << ", " << p_ip_(0) << ", " << p_ip_(1) << ", " << p_ip_(2);
53  os << ", " << bias_p_;
54 
55  return os.str();
56  }
57 };
58 } // namespace mars
59 
60 #endif // PRESSURE_SENSOR_STATE_TYPE_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: pressure_sensor_state_type.h:22
PressureSensorStateType()
Definition: pressure_sensor_state_type.h:30
double bias_p_
bias of pressure sensor
Definition: pressure_sensor_state_type.h:27
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d p_ip_
translation between IMU and Pressure sensor
Definition: pressure_sensor_state_type.h:26
static std::string get_csv_state_header_string()
Definition: pressure_sensor_state_type.h:36
std::string to_csv_string(const double &timestamp) const
Definition: pressure_sensor_state_type.h:46
Definition: buffer.h:27