summaryrefslogtreecommitdiffstats
path: root/include/netutils
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-03-14 19:39:54 -0700
committerAlex Ray <aray@google.com>2013-07-30 13:56:56 -0700
commit5e35370a3bd941d8e797b9e9beb1b378e00157d5 (patch)
tree2e56043d2502ba011a01c65768a827fb56b82824 /include/netutils
parent29d4d20c24fa94f2db71bd0edcbe4b64d59e4d6e (diff)
downloadsystem_core-5e35370a3bd941d8e797b9e9beb1b378e00157d5.zip
system_core-5e35370a3bd941d8e797b9e9beb1b378e00157d5.tar.gz
system_core-5e35370a3bd941d8e797b9e9beb1b378e00157d5.tar.bz2
Improve VelocityTracker numerical stability.
Replaced VelocityTracker with a faster and more accurate native implementation. This avoids the duplicate maintenance overhead of having two implementations. The new algorithm requires that the sample duration be at least 10ms in order to contribute to the velocity calculation. This ensures that the velocity is not severely overestimated when samples arrive in bursts. The new algorithm computes the exponentially weighted moving average using weights based on the relative duration of successive sample periods. The new algorithm is also more careful about how it handles individual pointers going down or up and their effects on the collected movement traces. The intent is to preserve the last known velocity of pointers as they go up while also ensuring that other motion samples do not count twice in that case. Bug: 4086785 Change-Id: I2632321232c64d6b8faacdb929e33f60e64dcdd3
Diffstat (limited to 'include/netutils')
0 files changed, 0 insertions, 0 deletions