#ifndef _DOG_DATA_H_
#define _DOG_DATA_H_

#include "stdio.h"

#define CHECK(x) 			((x)==1?1:((x)==0?-1:0))	// 1->1;0->-1
#define DEG2RAD(x) 			(double)(PI*(x)/180.0)		// Ƕ->
#define RAD2DEG(x) 			(double)(180.0*(x)/PI)		// ->Ƕ
#define ROUND(x,y) 			((x-(x%y))/y)				// 
#define PYTHAGOREAN(x,y) 	(sqrt((x)*(x)+(y)*(y)))		// 

#define SQRT_3			(double)(1.7320508075688772935274463415059)
#define SQRT_2			(double)(1.4142135623730950488016887242097)
#define SIN_30 			(double)(0.5)
#define SIN_45 			(double)(0.70710678118654752440084436210485)
#define SIN_60 			(double)(0.86602540378443864676372317075294)
#define COS_30 			(double)(0.86602540378443864676372317075294)
#define COS_45 			(double)(0.70710678118654752440084436210485)
#define COS_60 			(double)(0.5)

/*  bool  */
typedef enum _bool_{
	False = 0,
	True = 1,
	Float = 2
}_bool_;

/*  ת  */
typedef enum _rotate_dir_{
	positive = 1,
	negative = 0,
}_rotate_dir_;

/* ģ PID Ӽ */
typedef enum _fuzzy_subset_{
	NB = 0,			// 
	NM = 1,			// 
	NS = 2,			// С
	ZERO = 3,		// 
	PS = 4,			// С
	PM = 5,			// 
	PB = 6,			// 
	PID_NONE = 7	// Ĭ
}_fuzzy_subset_;

/*  */
typedef enum _data_kind_{
	INT8 = 0,
	UINT8 = 1,
	INT16 = 2,
	UINT16 = 3,
	INT32 = 4,
	UINT32 = 5,
	FLOAT = 6,
	DOUBLE = 7
}_data_kind_;

/* ˶ */
typedef enum _move_solve_kind_{
	SPEED_YAW_SOLVE = 0,
	XY_SPEED_SOLVE = 1
}_move_solve_kind_;

#endif