From 816411abf8e9ff633a29449cc0ac445c11f73a1c Mon Sep 17 00:00:00 2001 From: Martin Miller Date: Sat, 18 Mar 2017 20:32:08 -0500 Subject: Major rewrite moves state variables into state. Rather than maintain X and P in the main function they are moved into the body and state classes, respectively. This will become much more important when features are added and the accounting becomes more complicated. --- src/body.h | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/body.h') diff --git a/src/body.h b/src/body.h index 04196d2..f201683 100644 --- a/src/body.h +++ b/src/body.h @@ -2,6 +2,8 @@ #define body_INC #include #include +#include "types.h" + using Eigen::Matrix; using Eigen::Vector3d; using Eigen::Quaternion; @@ -21,16 +23,22 @@ class Body /* ==================== ACCESSORS ======================================= */ /* ==================== MUTATORS ======================================= */ + void accelerometer_bias( const Vector3d &b); + void enu( const UTM &utm); + void update(const Matrix &dx); + void vel(const Matrix &v); /* ==================== OPERATORS ======================================= */ - void motionModel ( Matrix &X, const Vector3d &acc, - const Vector3d &ang, const Quaternion &q, const double dt); - Matrix F(const Matrix &X, const Vector3d &ang, const Quaternion &q); - void skewSymmetric(const Vector3d &x, Matrix &y); - void H(Matrix &H); - Matrix h(const Matrix &X); + Matrix F(const Vector3d &ang, const Quaternion &q); + Matrix H(); + Matrix h(); + void motionModel ( const Vector3d &acc, const Vector3d &ang, + const Quaternion &q, const double dt); Matrix Q(double dt); Matrix R(); + Matrix S(const Matrix &P); + void skewSymmetric(const Vector3d &x, Matrix &y); + void unicsv(); protected: /* ==================== METHODS ======================================= */ @@ -41,6 +49,9 @@ class Body /* ==================== METHODS ======================================= */ /* ==================== DATA MEMBERS ======================================= */ + Matrix X; + char utm_c; + int utm_i; }; /* ----- end of class Body ----- */ -- cgit v1.1