From 38fde07865f57d558d3e11d77d13cd2523960164 Mon Sep 17 00:00:00 2001 From: Tim Sweet Date: Fri, 15 Jun 2018 12:58:59 -0700 Subject: [PATCH] cleanup reabse --- src/filter/kalman.c | 3 --- src/filter/kalman.h | 1 - 2 files changed, 4 deletions(-) diff --git a/src/filter/kalman.c b/src/filter/kalman.c index 82b8af65..f71f48b8 100644 --- a/src/filter/kalman.c +++ b/src/filter/kalman.c @@ -23,8 +23,6 @@ void init_kalman(kalman_t *filter, float q) filter->x = 0.0f; //set intial value, can be zero if unknown filter->lastX = 0.0f; //set intial value, can be zero if unknown filter->e = 1.0f; - filter->vel = 0.0f; //set intial value, can be zero if unknown - filter->lastVel = 0.0f; //set intial value, can be zero if unknown filter->acc = 0.0f; //set intial value, can be zero if unknown } @@ -102,7 +100,6 @@ inline float kalman_process(kalman_t* kalmanState, volatile float input, volatil //update last state kalmanState->lastX = kalmanState->x; - kalmanState->lastVel = kalmanState->vel; if (target != 0.0f) { kalmanState->e = ABS(1.0f - (target/kalmanState->lastX)); diff --git a/src/filter/kalman.h b/src/filter/kalman.h index 0e2a28e8..03024951 100644 --- a/src/filter/kalman.h +++ b/src/filter/kalman.h @@ -20,7 +20,6 @@ typedef struct kalman float acc; //acceleration float lastX; //previous state float e; - float lastVel; //previous velocity float processCount; //keeps track of the process covariance } kalman_t;