mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
Loading...
Searching...
No Matches
gps_w_vel_sensor_state_type.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 GPSVELSENSORSTATETYPE_H
12#define GPSVELSENSORSTATETYPE_H
13
15#include <Eigen/Dense>
16
17namespace mars
18{
20{
21public:
22 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
23
24 Eigen::Vector3d p_ig_;
25 Eigen::Vector3d p_gw_w_;
26 Eigen::Quaterniond q_gw_w_;
27
29 {
30 p_ig_.setZero();
31 p_gw_w_.setZero();
32 q_gw_w_.setIdentity();
33 }
34
35 static std::string get_csv_state_header_string()
36 {
37 std::stringstream os;
38 os << "t, ";
39 os << "p_ig_x, p_ig_y, p_ig_z, ";
40 os << "p_gw_w_x, p_gw_w_y, p_gw_w_z, ";
41 os << "q_gw_w_w, q_gw_w_x, q_gw_w_y, q_gw_w_z";
42
43 return os.str();
44 }
45
51 std::string to_csv_string(const double& timestamp) const
52 {
53 std::stringstream os;
54 os.precision(17);
55 os << timestamp;
56
57 os << ", " << p_ig_(0) << ", " << p_ig_(1) << ", " << p_ig_(2);
58 os << ", " << p_gw_w_(0) << ", " << p_gw_w_(1) << ", " << p_gw_w_(2);
59 Eigen::Vector4d q_gw_w = q_gw_w_.coeffs(); // x y z w
60 os << ", " << q_gw_w(3) << ", " << q_gw_w(0) << ", " << q_gw_w(1) << ", " << q_gw_w(2);
61
62 return os.str();
63 }
64};
65} // namespace mars
66#endif // GPSVELSENSORSTATETYPE_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 gps_w_vel_sensor_state_type.h:20
Eigen::Vector3d p_gw_w_
Definition gps_w_vel_sensor_state_type.h:25
std::string to_csv_string(const double &timestamp) const
to_csv_string export state to single csv string
Definition gps_w_vel_sensor_state_type.h:51
static std::string get_csv_state_header_string()
Definition gps_w_vel_sensor_state_type.h:35
GpsVelSensorStateType()
Definition gps_w_vel_sensor_state_type.h:28
Eigen::Quaterniond q_gw_w_
Definition gps_w_vel_sensor_state_type.h:26
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d p_ig_
Definition gps_w_vel_sensor_state_type.h:24
Definition buffer.h:27