Clamps Dictionary
ssensor-make-zupt
Function
(ssensor-make-zupt id &key (timeout 3.0) (threshold 0.1))
Create a position-reset watcher for sensor id.
State machine:
- Wait until acc magnitude is within threshold g of 1g (sensor still), OR no data arrives for timeout seconds (delta gate suppressing TX).
- Once still for timeout seconds, reset position once.
- Wait until acc magnitude exceeds threshold (sensor moving again).
- Go to 1.
Returns an unwatch thunk to stop the watcher.
Arguments
id |
Integer in the range [1..127] denoting the id of the sensor. |
:timeout |
Seconds still before resetting velocity. Default: 3.0. |
:threshold |
Max deviation from 1g to consider stationary. Default: 0.1. |