#ifndef _DOG_FILTER_H_
#define _DOG_FILTER_H_

#include "zf_common_headfile.h"
#include "zf_common_debug.h"

struct DOG_KARMAN_FILTER;
struct DOG_LOWPASS_FILTER;

// ˲
typedef struct DOG_KARMAN_FILTER{
	/* ˲ */
	float Kq;
	float Kr;
	
	/* ˲ */
	float last_p;
	float now_p;
	float value;
	float Kg;
	
	/* Ա */
	float (*karman_filter)(struct DOG_KARMAN_FILTER* this, float input);	// ˲
}DOG_KARMAN_FILTER;

// ˲
float karman_filter(struct DOG_KARMAN_FILTER* this, float input);

// 캯
void karman(struct DOG_KARMAN_FILTER* this, float Kq, float Kr);
// 
void _karman(struct DOG_KARMAN_FILTER* this);

// ͨ˲
typedef struct DOG_LOWPASS_FILTER{
	/* ͨ˲ */
	float K;
	
	/* ͨ˲ */
	float last_p;
	float new_value;
	float old_value;
	
	/* Ա */
	float (*lowpass_filter)(struct DOG_LOWPASS_FILTER* this, float input);	// ˲
}DOG_LOWPASS_FILTER;

// ͨ˲
float lowpass_filter(struct DOG_LOWPASS_FILTER* this, float input);

// 캯
void lowpass(struct DOG_LOWPASS_FILTER* this, float K);
// 
void _lowpass(struct DOG_LOWPASS_FILTER* this);

#endif

