C. Post-Processing
Once drift cancellation is complete, the data is subject to cleaning and smoothing. Occasionally, some of the quaternions
are miscalculated due to sensor or software inaccuracies. The cleaning filter traverses the recording to compare every
frame of motion against its predecessors. A frame is deemed inaccurate if it exceeds the filter’s threshold. All inaccuracies
are discarded and substituted for new interpolated values. The cleaning is followed by smoothing where a Gaussian mask is applied to every frame of motion to filter out any remaining noise. The user can adjust or disable the amount of smoothing depending on the task in hand. For example, a fluent motion may be desired for an animation while raw data may be preferred for scientific studies.