OptionalJacobians
parent
13cca7be00
commit
1229ca6fee
|
|
@ -78,20 +78,18 @@ public:
|
||||||
|
|
||||||
/** Correct an accelerometer measurement using this bias model, and optionally compute Jacobians */
|
/** Correct an accelerometer measurement using this bias model, and optionally compute Jacobians */
|
||||||
Vector3 correctAccelerometer(const Vector3& measurement,
|
Vector3 correctAccelerometer(const Vector3& measurement,
|
||||||
boost::optional<Matrix&> H = boost::none) const {
|
OptionalJacobian<3, 6> H = boost::none) const {
|
||||||
if (H) {
|
if (H) {
|
||||||
H->resize(3, 6);
|
(*H) << -I_3x3, Z_3x3;
|
||||||
(*H) << -Matrix3::Identity(), Matrix3::Zero();
|
|
||||||
}
|
}
|
||||||
return measurement - biasAcc_;
|
return measurement - biasAcc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Correct a gyroscope measurement using this bias model, and optionally compute Jacobians */
|
/** Correct a gyroscope measurement using this bias model, and optionally compute Jacobians */
|
||||||
Vector3 correctGyroscope(const Vector3& measurement,
|
Vector3 correctGyroscope(const Vector3& measurement,
|
||||||
boost::optional<Matrix&> H = boost::none) const {
|
OptionalJacobian<3, 6> H = boost::none) const {
|
||||||
if (H) {
|
if (H) {
|
||||||
H->resize(3, 6);
|
(*H) << Z_3x3, -I_3x3;
|
||||||
(*H) << Matrix3::Zero(), -Matrix3::Identity();
|
|
||||||
}
|
}
|
||||||
return measurement - biasGyro_;
|
return measurement - biasGyro_;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue