mars_lib  0.1.0.3dc76ee85e09
Modular and Robust Sensor-Fusion
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mars::GpsSensorStateType Class Reference

#include </home/runner/work/mars_lib/mars_lib/source/mars/include/mars/sensors/gps/gps_sensor_state_type.h>

+ Inheritance diagram for mars::GpsSensorStateType:
+ Collaboration diagram for mars::GpsSensorStateType:

Public Member Functions

 GpsSensorStateType ()
 
std::string to_csv_string (const double &timestamp) const
 to_csv_string export state to single csv string More...
 
- Public Member Functions inherited from mars::BaseStates
 BaseStates (int cov_size)
 

Static Public Member Functions

static std::string get_csv_state_header_string ()
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d p_ig_
 
Eigen::Vector3d p_gw_w_
 
Eigen::Quaterniond q_gw_w_
 
- Public Attributes inherited from mars::BaseStates
int cov_size_
 

Constructor & Destructor Documentation

◆ GpsSensorStateType()

mars::GpsSensorStateType::GpsSensorStateType ( )
inline
28  : BaseStates(9) // cov size
29  {
30  p_ig_.setZero();
31  p_gw_w_.setZero();
32  q_gw_w_.setIdentity();
33  }
BaseStates(int cov_size)
Definition: base_states.h:27
Eigen::Quaterniond q_gw_w_
Definition: gps_sensor_state_type.h:26
Eigen::Vector3d p_gw_w_
Definition: gps_sensor_state_type.h:25
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d p_ig_
Definition: gps_sensor_state_type.h:24

Member Function Documentation

◆ get_csv_state_header_string()

static std::string mars::GpsSensorStateType::get_csv_state_header_string ( )
inlinestatic
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  }

◆ to_csv_string()

std::string mars::GpsSensorStateType::to_csv_string ( const double &  timestamp) const
inline

to_csv_string export state to single csv string

Parameters
timestamp
Returns
string format [p_ig p_gw_w q_gw_w]
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  }

Member Data Documentation

◆ p_ig_

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d mars::GpsSensorStateType::p_ig_

◆ p_gw_w_

Eigen::Vector3d mars::GpsSensorStateType::p_gw_w_

◆ q_gw_w_

Eigen::Quaterniond mars::GpsSensorStateType::q_gw_w_

The documentation for this class was generated from the following file: