(clamp x min max)Clamps a value x to the range [min, max] such that the return
value is always within that range.
Clamps a value `x` to the range [`min`, `max`] such that the return value is always within that range.
(scale x in-min in-max out-min out-max)Maps a value x from the input domain of [in-min, in-max] to
the output range of [out-min, out-max].
Maps a value `x` from the input domain of [`in-min`, `in-max`] to the output range of [`out-min`, `out-max`].
(set-coefficients c kp ki kd)Sets the Kp, Ki, and Kd coefficients of a PID controller c.
Coefficients should be specified in units of "per second", and
will be scaled for the controller's actual sample rate.
Sets the Kp, Ki, and Kd coefficients of a PID controller `c`. Coefficients should be specified in units of "per second", and will be scaled for the controller's actual sample rate.
(set-sample-period c sample-period-ms)Sets a PID controller c's sample sample-period, in millseconds.
Sets a PID controller `c`'s sample sample-period, in millseconds.
(set-sample-rate c rate)Sets a PID controller c's sample rate, in Hz.
Sets a PID controller `c`'s sample rate, in Hz.
(update c time-ms input)Updates a PID controller.
Updates a PID controller.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |