summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Filter_EWMA2
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2011-01-24 21:18:52 +0000
committerWim Vriend <facetracknoir@gmail.com>2011-01-24 21:18:52 +0000
commit5a63e2a7735fa982885b1164e35aedbaabf95047 (patch)
tree786a2317a3d51f9116006b44f5eea0f5ab249c2a /FTNoIR_Filter_EWMA2
parenta1126d63fe3068cc5651c8c3060647a33e4bb710 (diff)
EWMA2-filter implemented.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@43 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FTNoIR_Filter_EWMA2')
-rw-r--r--FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
index 059e2807..d982406a 100644
--- a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
+++ b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
@@ -215,6 +215,16 @@ void FTNoIR_Filter_EWMA2::FilterHeadPoseData(THeadPoseData *current_camera_posit
new_camera_position->pitch=output[4];
new_camera_position->roll=output[5];
+ //
+ // Also update the 'current' position, for the next iteration.
+ //
+ current_camera_position->x=output[0];
+ current_camera_position->y=output[1];
+ current_camera_position->z=output[2];
+ current_camera_position->yaw=output[3];
+ current_camera_position->pitch=output[4];
+ current_camera_position->roll=output[5];
+
//update filter memories ready for next sample
for (i=0;i<6;i++)
{