mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
Loading...
Searching...
No Matches
bodyvel_sensor_state_type.h
Go to the documentation of this file.
1// Copyright (C) 2021 Martin Scheiber and 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 authors at <martin.scheiber@ieee.org>
11// and <christian.brommer@ieee.org>.
12
13#ifndef BODYVELSENSORSTATETYPE_H
14#define BODYVELSENSORSTATETYPE_H
15
17#include <Eigen/Dense>
18
19namespace mars
20{
22{
23public:
24 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
25
26 Eigen::Vector3d p_ib_;
27 Eigen::Quaternion<double> q_ib_;
28
29 BodyvelSensorStateType() : BaseStates(6) // size of covariance
30 {
31 p_ib_.setZero();
32 q_ib_.setIdentity();
33 }
34
35 static std::string get_csv_state_header_string()
36 {
37 std::stringstream os;
38 os << "t, ";
39 os << "p_ib_x, p_ib_y, p_ib_z, ";
40 os << "q_ib_w, q_ib_x, q_ib_y, q_ib_z";
41
42 return os.str();
43 }
44
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 << ", " << p_ib_(0) << ", " << p_ib_(1) << ", " << p_ib_(2);
52 os << ", " << q_ib_.w() << ", " << q_ib_.x() << ", " << q_ib_.y() << ", " << q_ib_.z();
53
54 return os.str();
55 }
56};
57} // namespace mars
58#endif // BODYVELSENSORSTATETYPE_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 bodyvel_sensor_state_type.h:22
static std::string get_csv_state_header_string()
Definition bodyvel_sensor_state_type.h:35
Eigen::Quaternion< double > q_ib_
Definition bodyvel_sensor_state_type.h:27
std::string to_csv_string(const double &timestamp) const
Definition bodyvel_sensor_state_type.h:45
BodyvelSensorStateType()
Definition bodyvel_sensor_state_type.h:29
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d p_ib_
Definition bodyvel_sensor_state_type.h:26
Definition buffer.h:27