Skip to content
Snippets Groups Projects
Commit e6fbad2c authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Use derived SBs

parent cbf55406
No related branches found
No related tags found
2 merge requests!54devel->main,!51Resolve "follow core 465 Migrate from StateBlock to StateDerived"
......@@ -20,7 +20,7 @@
//
//--------LICENSE_END--------
#include "imu/sensor/sensor_compass.h"
#include "core/state_block/state_block.h"
#include "core/state_block/state_block_derived.h"
#include "core/state_block/state_quaternion.h"
namespace wolf
......@@ -29,10 +29,10 @@ namespace wolf
SensorCompass::SensorCompass(const Eigen::VectorXd& _extrinsics,
ParamsSensorCompassPtr _params) :
SensorBase("SensorCompass",
std::make_shared<StateBlock>(_extrinsics.head(3), true),
std::make_shared<StateQuaternion>(_extrinsics.tail(4), true),
std::make_shared<StateBlock>(_params->bias_prior_state,
_params->bias_prior_mode == "fix"),
std::make_shared<StatePoint3d>(_extrinsics.head(3), true, false),
std::make_shared<StateQuaternion>(_extrinsics.tail(4), true, false),
std::make_shared<StateParams3>(_params->bias_prior_state,
_params->bias_prior_mode == "fix"),
3,
false, // P static
false, // O static
......@@ -46,8 +46,8 @@ SensorCompass::SensorCompass(const Eigen::VectorXd& _extrinsics,
// Global Magnetic Field 'F' state block
addStateBlock('F',
std::make_shared<StateBlock>(params_compass_->field_prior_state,
params_compass_->field_prior_mode == "fix"));
std::make_shared<StateParams3>(params_compass_->field_prior_state,
params_compass_->field_prior_mode == "fix"));
if (params_compass_->field_prior_mode == "factor")
addPriorParameter('F',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment