Class: Sampler

Sampler

Module that naïvely resample an incomming vector frame at a given framerate. If 0 frame has been received since last tick, output last values. If more than 1 frame since last tick, output the mean of all the frames.

Constructor

new Sampler(optionsopt)

Parameters:
Name Type Attributes Description
options Object <optional>

Override default options.

Properties
Name Type Attributes Default Description
frameRate Number <optional>
20

output sampling rate (in Hz)

Source:
To Do:
  • - add option for output type (i.e. mean, max, min, last, median, etc.)