2 * Copyright Droids Corporation, Microb Technology, Eirbot (2005)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Revision : $Id: quadramp.h,v 1.3.4.4 2009-05-18 12:29:51 zer0 Exp $
27 struct quadramp_filter
29 double var_2nd_ord_pos;
30 double var_2nd_ord_neg;
31 double var_1st_ord_pos;
32 double var_1st_ord_neg;
39 /** Initialization of the filter */
40 void quadramp_init(struct quadramp_filter *q);
42 void quadramp_reset(struct quadramp_filter *q);
44 void quadramp_set_2nd_order_vars(struct quadramp_filter *q,
45 double var_2nd_ord_pos,
46 double var_2nd_ord_neg);
48 void quadramp_set_1st_order_vars(struct quadramp_filter *q,
49 double var_1st_ord_pos,
50 double var_1st_ord_neg);
53 * Return 1 when (filter_input == filter_output && 1st_ord variation
54 * is 0 --speed is 0-- ).
56 uint8_t quadramp_is_finished(struct quadramp_filter *q);
61 * \param data should be a (struct quadramp_filter *) pointer
62 * \param in is the input of the filter
64 int32_t quadramp_do_filter(void *data, int32_t in);