Work on kalman filter interface.

This commit is contained in:
jgoppert 2015-11-12 16:41:07 -05:00
parent 0a110a1b02
commit b9924820e1
3 changed files with 11 additions and 15 deletions

View File

@ -98,6 +98,12 @@ public:
return r;
}
void operator*=(const Quaternion & other)
{
Quaternion &self = *this;
self = self * other;
}
Matrix41 derivative(const Matrix31 & w) const {
const Quaternion &q = *this;
Type dataQ[] = {

View File

@ -6,12 +6,12 @@ namespace matrix {
template<typename Type, size_t M, size_t N>
int kalman_correct(
const SquareMatrix<Type, M> & P,
const Matrix<Type, M, M> & P,
const Matrix<Type, N, M> & C,
const SquareMatrix<Type, N> & R,
const Vector<Type, N> &r,
Vector<Type, M> & dx,
SquareMatrix<Type, M> & dP,
const Matrix<Type, N, N> & R,
const Matrix<Type, N, 1> &r,
Matrix<Type, M, 1> & dx,
Matrix<Type, M, M> & dP,
float & beta
)
{

View File

@ -5,16 +5,6 @@
using namespace matrix;
template int kalman_correct<float, 6, 5>(
const SquareMatrix<float, 6> & P,
const Matrix<float, 5, 6> & C,
const SquareMatrix<float, 5> & R,
const Vector<float, 5> &r,
Vector<float, 6> & dx,
SquareMatrix<float, 6> & dP,
float & beta
);
int main()
{
const size_t n_x = 6;