xyControl
0.1
Quadrotor Flight Controller on AVR Basis
|
Various default settings. More...
Files | |
file | config.h |
Various default settings. | |
Macros | |
#define | ORIENTATION_FILTER FILTER_KALMAN |
Filter Implementation to be used. More... | |
#define | COMPLEMENTARY_TAU 0.5 |
Time Contant for Low and High Pass Filter in the Complementary Filter. More... | |
#define | SOFTWARELOWPASS 1 |
Software Low-Pass on Gyro and ACC. More... | |
#define | ACCFILTERFACTOR SOFTWARELOWPASS |
Accelerometer Low Pass Factor. More... | |
#define | GYROFILTERFACTOR SOFTWARELOWPASS |
Gyroscope Low Pass Factor. More... | |
#define | PID_OUTMAX 256 |
Maximum PID Output. More... | |
#define | PID_OUTMIN -256 |
Minimum PID Output. More... | |
#define | PID_INTMAX PID_OUTMAX |
Maximum PID Integral Sum. More... | |
#define | PID_INTMIN PID_OUTMIN |
Minimal PID Integral Sum. More... | |
#define | DT 0.01f |
Time Constant. More... | |
#define | Q1 5.0f |
Q Matrix Diagonal Element 1. More... | |
#define | Q2 100.0f |
Q Matrix Diagonal Element 2. More... | |
#define | Q3 0.01f |
Q Matrix Diagonal Element 3. More... | |
#define | R1 1000.0f |
R Matrix Diagonal Element 1. More... | |
#define | R2 1000.0f |
R Matrix Diagonal Element 2. More... | |
#define | SET_ROLLPLUS 1 |
Second Motor at the Right. More... | |
#define | SET_ROLLMINUS 3 |
Fourth Motor at the Left. More... | |
#define | SET_PITCHPLUS 0 |
First Motor at the Top. More... | |
#define | SET_PITCHMINUS 2 |
Third Motor at the Bottom. More... | |
#define | PID_P 5.0 |
Default PID P Constant. More... | |
#define | PID_I 0.03 |
Default PID I Constant. More... | |
#define | PID_D -13.0 |
Default PID D Constant. More... | |
#define | MOTORCOUNT 4 |
Amount of motors. More... | |
#define | BATT_MAX 15 |
Battery Voltage Reference (ADC 5V) More... | |
#define | BATT_CHANNEL 0 |
ADC Channel for Battery. More... | |
#define | ACC_ADDRESS 0x32 |
Accelerometer Address (0011001r) More... | |
#define | GYRO_ADDRESS 0xD6 |
Gyroscope Address (110101xr, x = 1) More... | |
#define | MAG_ADDRESS 0x3C |
Magnetometer Address. More... | |
#define | MOTOR_BASEADDRESS 0x52 |
Address of first motor controller. More... | |
#define | LED0PORT PORTL |
First LED Port. More... | |
#define | LED0DDR DDRL |
First LED Data Direction Register. More... | |
#define | LED0PIN PL6 |
First LED Pin. More... | |
#define | LED1PORT PORTL |
Second LED Port. More... | |
#define | LED1DDR DDRL |
Second LED Data Direction Register. More... | |
#define | LED1PIN PL7 |
Second LED Pin. More... | |
#define | LED2PORT PORTG |
Third LED Port. More... | |
#define | LED2DDR DDRG |
Third LED Data Direction Register. More... | |
#define | LED2PIN PG5 |
Third LED Pin. More... | |
#define | LED3PORT PORTE |
Fourth LED Port. More... | |
#define | LED3DDR DDRE |
Fourth LED Data Direction Register. More... | |
#define | LED3PIN PE2 |
Fourth LED Pin. More... | |
#define | BANK0PORT PORTG |
First Bank Selection Port. More... | |
#define | BANK0DDR DDRG |
First Bank Selection Data Direction Register. More... | |
#define | BANK0PIN PG3 |
First Bank Selection Pin. More... | |
#define | BANK1PORT PORTG |
Second Bank Selection Port. More... | |
#define | BANK1DDR DDRG |
Second Bank Selection Data Direction Register. More... | |
#define | BANK1PIN PG4 |
Second Bank Selection Pin. More... | |
#define | BANK2PORT PORTL |
Third Bank Selection Port. More... | |
#define | BANK2DDR DDRL |
Third Bank Selection Data Direction Register. More... | |
#define | BANK2PIN PL5 |
Third Bank Selection Pin. More... | |
#define | SPISS PB0 |
SPI Slave Select Pin. More... | |
#define | RX_BUFFER_SIZE 64 |
UART Receive Buffer Size. More... | |
#define | TX_BUFFER_SIZE 64 |
UART Transmit Buffer Size. More... | |
Various default settings.
#define ACC_ADDRESS 0x32 |
#define ACCFILTERFACTOR SOFTWARELOWPASS |
#define BANK0DDR DDRG |
First Bank Selection Data Direction Register.
Definition at line 144 of file config.h.
Referenced by xmemInit().
#define BANK0PIN PG3 |
First Bank Selection Pin.
Definition at line 145 of file config.h.
Referenced by xmemInit(), and xmemSetBank().
#define BANK0PORT PORTG |
First Bank Selection Port.
Definition at line 143 of file config.h.
Referenced by xmemInit(), and xmemSetBank().
#define BANK1DDR DDRG |
Second Bank Selection Data Direction Register.
Definition at line 147 of file config.h.
Referenced by xmemInit().
#define BANK1PIN PG4 |
Second Bank Selection Pin.
Definition at line 148 of file config.h.
Referenced by xmemInit(), and xmemSetBank().
#define BANK1PORT PORTG |
Second Bank Selection Port.
Definition at line 146 of file config.h.
Referenced by xmemInit(), and xmemSetBank().
#define BANK2DDR DDRL |
Third Bank Selection Data Direction Register.
Definition at line 150 of file config.h.
Referenced by xmemInit().
#define BANK2PIN PL5 |
Third Bank Selection Pin.
Definition at line 151 of file config.h.
Referenced by xmemInit(), and xmemSetBank().
#define BANK2PORT PORTL |
Third Bank Selection Port.
Definition at line 149 of file config.h.
Referenced by xmemInit(), and xmemSetBank().
#define BATT_CHANNEL 0 |
#define BATT_MAX 15 |
Battery Voltage Reference (ADC 5V)
Definition at line 110 of file config.h.
Referenced by getVoltage().
#define COMPLEMENTARY_TAU 0.5 |
Time Contant for Low and High Pass Filter in the Complementary Filter.
In essence, time periods shorter than TAU come from gyro data, longer time periods come from the Accelerometer data. In seconds!
Definition at line 55 of file config.h.
Referenced by complementaryExecute().
#define DT 0.01f |
#define GYRO_ADDRESS 0xD6 |
Gyroscope Address (110101xr, x = 1)
Definition at line 118 of file config.h.
Referenced by gyroRead().
#define GYROFILTERFACTOR SOFTWARELOWPASS |
#define LED0DDR DDRL |
#define LED1DDR DDRL |
#define LED1PIN PL7 |
#define LED2DDR DDRG |
#define LED3DDR DDRE |
#define LED3PIN PE2 |
#define MAG_ADDRESS 0x3C |
Magnetometer Address.
Definition at line 119 of file config.h.
Referenced by magRead(), and magWriteRegister().
#define MOTOR_BASEADDRESS 0x52 |
Address of first motor controller.
Definition at line 120 of file config.h.
Referenced by motorTask().
#define MOTORCOUNT 4 |
Amount of motors.
Definition at line 104 of file config.h.
Referenced by motorInit(), motorSet(), and motorTask().
#define ORIENTATION_FILTER FILTER_KALMAN |
#define PID_D -13.0 |
#define PID_I 0.03 |
#define PID_INTMAX PID_OUTMAX |
#define PID_INTMIN PID_OUTMIN |
#define PID_OUTMAX 256 |
#define PID_OUTMIN -256 |
#define PID_P 5.0 |
#define Q1 5.0f |
Q Matrix Diagonal Element 1.
Definition at line 75 of file config.h.
Referenced by kalmanInnovate().
#define Q2 100.0f |
Q Matrix Diagonal Element 2.
Definition at line 76 of file config.h.
Referenced by kalmanInnovate().
#define Q3 0.01f |
Q Matrix Diagonal Element 3.
Definition at line 77 of file config.h.
Referenced by kalmanInnovate().
#define R1 1000.0f |
R Matrix Diagonal Element 1.
Definition at line 80 of file config.h.
Referenced by kalmanInnovate().
#define R2 1000.0f |
R Matrix Diagonal Element 2.
Definition at line 81 of file config.h.
Referenced by kalmanInnovate().
#define SET_PITCHMINUS 2 |
#define SET_PITCHPLUS 0 |
#define SET_ROLLMINUS 3 |
#define SET_ROLLPLUS 1 |
#define SOFTWARELOWPASS 1 |