Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e96bc7ab authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Movement estimates for pointer location

Previously, when optimizing the least squares fit for the special case
of unweighted, 2nd degree polynomial, only the linear term was being
computed (and populated) for simplicity. However, that broke movement
estimates for pointer location, since the full quadratic equation is
needed for those.

In this CL, populate all of the coefficients. Since the heavy
computations in the loop have already been performed, this should not
impact the running time of the function.

Reference: https://www.azdhs.gov/documents/preparedness/
state-laboratory/lab-licensure-certification/technical-resources/
calibration-training/12-quadratic-least-squares-regression-calib.pdf

Bug: 114017699
Bug: 111195578
Bug: 114171278

Test: added the function to a small program with a main() method to test
the following data:
(x, y): ([1, 2, 3], [1, 4, 8]), ([1, 4, 8], [1, 1, 1]), ([1, 4, 8], [1,
4, 8]), ([1, 2, 3], [1, 4, 9]).
Confirmed that the output is correct. Also, locally enabled movement
estimates in pointer location and confirmed that they look reasonable
(compared to a last known good build, 4245776).

Change-Id: I79003ac6ab480f514c1b0085794cd6d5aa0e0bc1
parent 474b02d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment