- From: Sandy Pond <sandy_pond_at_myrealbox.com>
- Date: Sun, 06 Mar 2005 16:16:40 -0500
On Fri, 2005-03-04 at 09:37 +0000, Bernd Porr wrote: > Give it to me. ;-) I'll add it to comedirecord. Once we've got > everything working as we want we can start thinking of comedi-routines. > > My idea for a comedi command is that it is sampling in the background > and performing averaging. Either with a syncrounus command or with a > soft timer for simpler cards. The user then can get averaged data > whenever he/she wants it and then issues a reset so that averaging > starts over again. > Averaging is only good for random noise. Filters are better. I'm not at work, and the ones at work are usually specific to the code, so I hacked a new one with good documentation. Also an example program. Compile with C99 on: gcc -std=c99 example_low_pass_filter.c low_pass_filter.c The example program feeds a square wave into the low_pass_filter and prints out a count, filter input and filter output. I'll leave it to you to plot, but you can use gnuplot: gnuplot> plot '< ./a.out' gnuplot> replot '< ./a.out' using 1:3
Attachments
- text/x-csrc attachment: low_pass_filter.c
- text/x-chdr attachment: low_pass_filter.h
- text/x-csrc attachment: example_low_pass_filter.c
Received on 2005-03-06Z21:16:40