11 #ifndef GPSVELSENSORCLASS_H
12 #define GPSVELSENSORCLASS_H
36 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
45 std::cout <<
"Created: [" << this->
name_ <<
"] Sensor" << std::endl;
69 std::shared_ptr<CoreType> latest_core_data)
74 std::string calibration_type;
78 calibration_type =
"Given";
87 std::cout <<
"Empty calibration AUTO init not implemented yet" << std::endl;
92 BufferDataType result(std::make_shared<CoreType>(*latest_core_data.get()),
93 std::make_shared<EmptySensorData>(sensor_state));
97 std::cout <<
"Info: Initialized [" <<
name_ <<
"] with [" << calibration_type <<
"] Calibration at t=" << timestamp
100 std::cout <<
"Info: [" <<
name_ <<
"] Calibration(rounded):" << std::endl;
101 std::cout <<
"\tPosition[m]: [" << sensor_state.
state_.value_.transpose() <<
" ]" << std::endl;
107 const CoreStateType& prior_core_state, std::shared_ptr<void> latest_sensor_data,
121 core_data.
state_ = prior_core_state;
124 std::shared_ptr<EmptySensorData> sensor_data(std::make_shared<EmptySensorData>());
125 sensor_data->set_cov(prior_cov);
126 sensor_data->state_ = prior_sensor_state;
128 BufferDataType state_entry(std::make_shared<CoreType>(core_data), sensor_data);
130 *new_state_data = state_entry;
136 const Eigen::MatrixXd& correction)
142 corrected_sensor_state.
value_ = prior_sensor_state.
value_ + correction.block(0, 0, 3, 1);
143 return corrected_sensor_state;
The BaseSensorData class binds the sensor state and covariance matrix.
Definition: bind_sensor_data.h:29
EIGEN_MAKE_ALIGNED_OPERATOR_NEW T state_
Definition: bind_sensor_data.h:30
Eigen::MatrixXd get_full_cov() const
get_full_cov builds the full covariance matrix
Definition: bind_sensor_data.h:63
Eigen::MatrixXd sensor_cov_
covariance of the sensor states
Definition: bind_sensor_data.h:37
The BufferDataType binds the core and sensor state in form of a shared void pointer.
Definition: buffer_data_type.h:36
Definition: core_state_type.h:21
static constexpr int size_error_
Definition: core_state_type.h:38
Definition: core_type.h:19
CoreStateMatrix cov_
Definition: core_type.h:22
CoreStateType state_
Definition: core_type.h:21
Definition: empty_sensor_class.h:33
BufferDataType Initialize(const Time ×tamp, std::shared_ptr< void >, std::shared_ptr< CoreType > latest_core_data)
Initialize the state of an individual sensor.
Definition: empty_sensor_class.h:68
EIGEN_MAKE_ALIGNED_OPERATOR_NEW EmptySensorClass(const std::string &name, std::shared_ptr< CoreState > core_states)
Definition: empty_sensor_class.h:38
EmptySensorStateType ApplyCorrection(const EmptySensorStateType &prior_sensor_state, const Eigen::MatrixXd &correction)
Definition: empty_sensor_class.h:135
bool CalcUpdate(const Time &, std::shared_ptr< void >, const CoreStateType &prior_core_state, std::shared_ptr< void > latest_sensor_data, const Eigen::MatrixXd &prior_cov, BufferDataType *new_state_data)
CalcUpdate Calculates the update for an individual sensor definition.
Definition: empty_sensor_class.h:106
virtual ~EmptySensorClass()=default
void set_initial_calib(std::shared_ptr< void > calibration)
set_initial_calib Sets the calibration of an individual sensor
Definition: empty_sensor_class.h:62
EmptySensorStateType get_state(const std::shared_ptr< void > &sensor_data)
Definition: empty_sensor_class.h:50
Eigen::MatrixXd get_covariance(const std::shared_ptr< void > &sensor_data)
get_covariance Resolves a void pointer to the covariance matrix of the corresponding sensor type Each...
Definition: empty_sensor_class.h:56
Definition: empty_sensor_state_type.h:20
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Vector3d value_
Definition: empty_sensor_state_type.h:24
std::string name_
Name of the individual sensor instance.
Definition: sensor_abs_class.h:23
bool is_initialized_
True if the sensor has been initialized.
Definition: sensor_abs_class.h:24
bool const_ref_to_nav_
True if the reference should not be estimated.
Definition: sensor_abs_class.h:27
Definition: update_sensor_abs_class.h:24
bool initial_calib_provided_
True if an initial calibration was provided.
Definition: update_sensor_abs_class.h:38
std::shared_ptr< CoreState > core_states_
Definition: update_sensor_abs_class.h:42
std::shared_ptr< void > initial_calib_
Definition: update_sensor_abs_class.h:37