diff options
author | Martin Miller | 2017-03-24 13:30:50 -0500 |
---|---|---|
committer | Martin Miller | 2017-03-24 13:30:50 -0500 |
commit | 9458b30126e346c9e0d373c9df5690655bf7f8ab (patch) | |
tree | b1c1f3ff7fb0fc8411c8034aec4a354fa6e8a9f8 | |
parent | a62bc5ac3429e3ae2b0d5f62e498abd8006bc98f (diff) | |
download | refslam-9458b30126e346c9e0d373c9df5690655bf7f8ab.zip refslam-9458b30126e346c9e0d373c9df5690655bf7f8ab.tar.gz |
Body can return velocity
-rw-r--r-- | src/body.cpp | 8 | ||||
-rw-r--r-- | src/body.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/body.cpp b/src/body.cpp index caa7cb9..a5c572a 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -234,6 +234,12 @@ Body::accelerometer_bias ( const Vector3d &b ) Vector3d Body::ned ( ) { - return X.segment(0,3) ; + return X.segment<3>(0); } /* ----- end of method Body::ned ----- */ +Vector3d +Body::vel ( ) +{ + return X.segment<3>(3); +} /* ----- end of method Body::vel ----- */ + @@ -22,6 +22,7 @@ class Body /* ==================== ACCESSORS ======================================= */ Vector3d ned(); + Vector3d vel(); /* ==================== MUTATORS ======================================= */ void accelerometer_bias( const Vector3d &b); |