mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
Loading...
Searching...
No Matches
velocity_sensor_state_type.h
Go to the documentation of this file.
1// Copyright (C) 2024 Christian Brommer, Control of Networked Systems, University of Klagenfurt,
2// 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 author at <christian.brommer@ieee.org>
11
12#ifndef VELOCITYSENSORSTATETYPE_H
13#define VELOCITYSENSORSTATETYPE_H
14
16#include <Eigen/Dense>
17
18namespace mars
19{
21{
22public:
23 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
24
25 Eigen::Vector3d p_iv_;
26
27 VelocitySensorStateType() : BaseStates(3) // size of covariance
28 {
29 p_iv_.setZero();
30 }
31
32 static std::string get_csv_state_header_string()
33 {
34 std::stringstream os;
35 os << "t, ";
36 os << "p_iv_x, p_iv_y, p_iv_z";
37
38 return os.str();
39 }
40
41 std::string to_csv_string(const double& timestamp) const
42 {
43 std::stringstream os;
44 os.precision(17);
45 os << timestamp;
46
47 os << ", " << p_iv_(0) << ", " << p_iv_(1) << ", " << p_iv_(2);
48 return os.str();
49 }
50};
51} // namespace mars
52#endif // VELOCITYSENSORSTATETYPE_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 velocity_sensor_state_type.h:21
VelocitySensorStateType()
Definition velocity_sensor_state_type.h:27
std::string to_csv_string(const double &timestamp) const
Definition velocity_sensor_state_type.h:41
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d p_iv_
Definition velocity_sensor_state_type.h:25
static std::string get_csv_state_header_string()
Definition velocity_sensor_state_type.h:32
Definition buffer.h:27