Skip to content

Look ahead buffer to prevent overshoot #2

@Glodigit

Description

@Glodigit

As the spacemouse is velocity based, there is inertia when it comes to changing direction, meaning that it's easy to overshoot or overcorrect and undershoot a UI target.

A proposed idea is to create a look-ahead buffer of the last 5 complete mouse positions, and the actual mouse position is the oldest element. If the average decerases beond a set limit, stop sending new cursor events.

I say "complete", as 3DxPoint receives X-axis and Y-axis events at different times, but always receives 0 as the last event on that axis. For example, the received values could be:

  • X = 4
  • Y = 12
  • X = 15
  • X = 18
  • Y = 30
  • X = 0
  • Y = 12
  • Y = 4
  • Y = 0

These should be put in the buffer like so: (4, 12) (15, 12) (18, 30) (0, 12) (0, 4) (0, 0). This is also for #1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions