Luckily, this should be relatively simple. Anyone who wants to make this should be looking at the Chromium touchpad code (runs linux, and my Pixelbook touchpad is as good as a macbook touchpad. For example, the touch input filter: https://chromium.googlesource.com/chromiumos/platform/touch_... )
I think you'd get most of the quality with a kalman filter (A really cool filter that takes unstable input, and corrects it based on probabilities to give very high quality output).
[1] http://douglas.mayle.org/files/synaptics-two-finger-click.di...