• Luis Sanchez Padilla's avatar
    Add a directional cut off alternative to the kalman predictor to · 989a4870
    Luis Sanchez Padilla authored
    prevent rubber banding.
    
    Rubber banding, or spring effect, often happens when recent point data
    evaluation generates a considerable deceleration producing velocity
    direction opposite to the current direction. This could happen because
    of noise in the input pipeline or a sudden stop by the input pointer.
    In order to mitigate this side effect, the current velocity vector is
    compared with the future velocity vector by computing the dot product
    between these two. If the result of the product is zero or less, it
    means that they have opposing directions and the prediction is cut off.
    
    Change-Id: I8a863475021f8531a7f2946325d458cad6d1138c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1860329Reviewed-by: default avatarElla Ge <eirage@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Commit-Queue: Luis Sanchez Padilla <lusanpad@microsoft.com>
    Cr-Commit-Position: refs/heads/master@{#709979}
    989a4870
kalman_predictor_unittest.cc 7.76 KB