hi there.
also the filter discussion is lost.
there are two possibilities to increase stability of any tracking.

kalman filter
should be the harder one but the results should be the best. 
DESP (Double Exponential Smoothing)
DESP is only a few lines of c++ code as you can see here:
DESP::DESP(float nAlpha) : alpha(nAlpha), spt(1e10), spt2(1e10)
{
}
void
DESP::reinit()
{
spt = spt2 = 1e10;
}
void
DESP::observe(float nValue)
{
if(spt==1e10 && spt2==1e10)
spt = spt2 = nValue;
float spt_new = alpha*nValue + (1alpha)*spt;
float spt2_new = alpha*spt_new + (1alpha)*spt2;
spt = spt_new;
spt2 = spt2_new;
}
float
DESP::predict(int delta_t)
{
if(delta_t==0)
return 2spt  spt2;
else
return (2+(alphadelta_t)/(1alpha))spt  (1+(alphadelta_t)/(1alpha))*spt2 ;
}
the function of the filter technices are illustrated and compared in the following
paper