Latest version of my quadcopter controller with an LPC1768 and MPU9250.

Dependencies:   mbed

Currently running on a custom PCB with 30.5 x 30.5mm mounts. There are also 2 PC apps that go with the software; one to set up the PID controller and one to balance the motors and props. If anyone is interested, send me a message and I'll upload them.

Filters/LPfilter.h

Committer:
Anaesthetix
Date:
2018-07-09
Revision:
0:0929d3d566cf
Child:
4:fab65ad01ab4

File content as of revision 0:0929d3d566cf:

#ifndef __LPfilter_H__
#define __LPfilter_H__

#define LP_A 0.02008336556421
#define LP_B 1.561018075801
#define LP_C -0.6413515380576
#define LP_D 1.0f
#define LP_E 2.0f
#define LP_F 1.0f


class LPfilter {	
	private:
		float filterbuffer[3];
		float out;
	public:
		float run(float input);
};

class LPfilter2 {
	private:
		float filterbuffer1[3];
		float filterbuffer2[3];
		float out_temp;
		float out;
	public:
		float run(float input);
};

class LPfilter2_1 {
	private:
		float filterbuffer1[3];
		float filterbuffer2[3];
		float out_temp;
		float out;
	public:
		float run(float input);
};

#endif