MSCEqF 1.0
Multi State Constraint Equivariant Filter for visual inertial navigation
Loading...
Searching...
No Matches
propagator.hpp
1// Copyright (C) 2023 Alessandro Fornasier.
2// Control of Networked Systems, University of Klagenfurt, Austria.
3//
4// All rights reserved.
5//
6// This software is licensed under the terms of the BSD-2-Clause-License with
7// no commercial use allowed, the full terms of which are made available
8// in the LICENSE file. No license in patents is granted.
9//
10// You can contact the authors at <alessandro.fornasier@ieee.org>
11
12#ifndef PROPAGATOR_HPP
13#define PROPAGATOR_HPP
14
15#include "msceqf/options/msceqf_options.hpp"
16#include "msceqf/symmetry/symmetry.hpp"
17#include "sensors/sensor_data.hpp"
18#include "msceqf/state/state.hpp"
19#include "types/fptypes.hpp"
20#include "utils/tools.hpp"
21
22namespace msceqf
23{
25{
26 public:
27 using ImuBuffer = std::deque<Imu>;
28
35
48 void insertImu(MSCEqFState& X, const SystemState& xi0, const Imu& imu, fp& timestamp);
49
59 bool propagate(MSCEqFState& X, const SystemState& xi0, fp& timestamp, const fp& new_timestamp);
60
61 private:
76 ImuBuffer getImuReadings(const fp& t0, const fp& t1);
77
86 Imu lerp(const Imu& pre, const Imu& post, const fp& alpha);
87
96 void propagateMean(MSCEqFState& X, const SystemState& xi0, const Imu& u, const fp& dt);
97
106 void propagateCovariance(MSCEqFState& X, const SystemState& xi0, const Imu& u, const fp& dt);
107
118 const MatrixX stateMatrix(MSCEqFState& X, const SystemState& xi0, const Imu& u) const;
119
127 const MatrixX inputMatrix(MSCEqFState& X, const SystemState& xi0) const;
128
146 const MatrixX discreteTimeMatrix(const MatrixX& A, const MatrixX& B, const fp& dt) const;
147
148 ImuBuffer imu_buffer_;
149 Matrix12 Q_;
150
151 int state_transition_order_;
152 uint imu_buffer_max_size_;
153
154 std::mutex mutex_;
155
156 static constexpr fp eps_ = 1e-6;
157};
158
159} // namespace msceqf
160
161#endif // PROPAGATOR_HPP
this class represent the state of the MSCEqF. This includes the state of the lifted system (element o...
Definition state.hpp:30
Definition propagator.hpp:25
Propagator(const PropagatorOptions &opts)
Construct a Propagator object given the options.
std::deque< Imu > ImuBuffer
The Imu measurement buffer.
Definition propagator.hpp:27
void insertImu(MSCEqFState &X, const SystemState &xi0, const Imu &imu, fp &timestamp)
insert a new IMU measurement into the imu buffer, if the given IMU measurement has a grater timestamp...
bool propagate(MSCEqFState &X, const SystemState &xi0, fp &timestamp, const fp &new_timestamp)
This function implements the mean and covariance propagation from timestamp to new_timestamp for the ...
The SystemState class represent the state of the system posed on the Homogenous space.
Definition system.hpp:29
Struct for one IMU reading. It includes timestamp, angular velocity and linear acceleration....
Definition sensor_data.hpp:29
Definition msceqf_options.hpp:112