From dea8e97a10ba23fc0aeb98ac57106540936c73f4 Mon Sep 17 00:00:00 2001 From: Martin Miller Date: Mon, 27 Mar 2017 13:01:36 -0500 Subject: Change Body::update to Body::dx Update was too vague since a lot of things get updated. dx more clearly refers to the incremental update after a Kalman update. --- src/body.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/body.cpp') diff --git a/src/body.cpp b/src/body.cpp index 1fd66d4..e6afe8a 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -20,21 +20,22 @@ /* *-------------------------------------------------------------------------------------- * Class: Body - * Method: Body :: update + * Method: Body :: dx * Description: Increments the state by dx after a Kalman update. *-------------------------------------------------------------------------------------- */ void -Body::update ( const Matrix &dx ) +Body::dx ( const Matrix &del ) { - X += dx; + X += del; + // Constrain the height if (X[2]<-1.) { X[2]=-1.; } else if (X[2]>-0.2) { X[2]=-0.2; } return ; -} /* ----- end of method Body::update ----- */ +} /* ----- end of method Body::dx ----- */ void Body::vel ( const Matrix &v ) -- cgit v1.1