sorry i dun get understand wad u mean by using a weight-age system?
able to explain in simpler terms?
not exactly a programming pro here
How are you feeding the tracked points into the motion builder ?
Are you doing this realtime or capture first stored into a file and then import this file into the motion builder ?
The idea is sampling averaging.
Suppose I have 0.3, 0.4, 0.1, -0.1. The average will be 0.175. This is a simple averaging with constant weightage across all samples.
If you consider 0.3 is current time frame T's tracked value, 0.4 is frame of T-1 and 0.1 T-2 and -0.1 is T-3 and so forth. Then you can simply put up a sliding window idea to apply your sampling.
Suppose the following tracked stream values
[ 0.3 0.4 0.1 -0.1 ] -0.2 0.0 0.3 0.5 0.7
At T, my actual tracked value after sampling is
[ 0.175 ]
At T - 1, the sliding window should be
0.3 [ 0.4 0.1 -0.1 -0.2 ] 0.0 0.3 0.5 0.7
[ 0.15 ]
As you can see the fluctuation between 0.175 and 1.15 is not as large, that's because this resultant value is after a simple averaging. The simple concept is to minimise on marginal error, use more samples to derive out your actual value.
The larger your sliding window, meanwhile is CURRENT FRAME + 3 PREVIOUS FRAME, the more stable your derived values but you get a less responsive change. Imagine you suddenly move your hand, it will take a long while for the sliding window to give tracked values to reflect the new position of your hand because it takes time for the sliding window to move into the new set of values where it stablized at the new coordinates.
To be more responsive, use a weightage system in the sliding window as such
[ 0.5 * T1, 0.25 * T2, 0.15 * T3, 0.1 * T4 ]
Tx are actual tracked values in the sliding window. You still get average sampling which helps in dismissing errors, but more sensitive now. I believe there are more eleborate algorithm in margin errors management. You might need to read up more if you are interested in this field. This field is not exactly my forte, so there are limitation to how much I can advice. This is a starting point you can try.
If you want to play with robotics and relevant fields, you need to work on good mathematics and programming skill sets.