my_math.h 1011 Bytes
#ifndef __MY_MATH_H
#define __MY_MATH_H
#include "sys.h"
#include "math.h"
//extern double SetDir;
//extern double ActualDir;
//extern double piderr;
//extern double piderr_next;
//extern double piderr_last;

//u16 Math_ascll(u16 ascll);         //ascll转十进制
//u32 Math_power10(u8 power);        //10的次幂
//u16 Math_power16(u8 power);        //16的次幂
u16 Math_crc(u16 crc_a,u16 crc_b); //异或
//double Math_abs(double num);         //绝对值
//double Math_square(double num);      //平方
double Math_remainder(double a,int b);//
double Math_function(double x,double k1,double k2,double k3,double k4,double k5,double k6);
//double Math_integral(double x,double k1,double k2,double k3,double k4,double k5,double k6);
//int Math_integer(double num);

double Math_angle(u8 a,double b);    //计算旋转角度
double Math_circle(u8 a,double b,u8 c);   //计算旋转弧长
double Math_trayphi(u8 a);          //计算托盘旋转角度
double PID_realize(double dir,double Actualvalue);
void PID_clear(void);//pid参数清除
#endif