xyControl  0.1
Quadrotor Flight Controller on AVR Basis
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Files | Macros
Configuration

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...
 

Detailed Description

Various default settings.

Macro Definition Documentation

#define ACC_ADDRESS   0x32

Accelerometer Address (0011001r)

Definition at line 117 of file config.h.

Referenced by accRead().

#define ACCFILTERFACTOR   SOFTWARELOWPASS

Accelerometer Low Pass Factor.

Definition at line 59 of file config.h.

Referenced by accRead().

#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

ADC Channel for Battery.

Definition at line 111 of file config.h.

Referenced by getVoltage().

#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

Time Constant.

Definition at line 72 of file config.h.

Referenced by kalmanInnovate().

#define GYRO_ADDRESS   0xD6

Gyroscope Address (110101xr, x = 1)

Definition at line 118 of file config.h.

Referenced by gyroRead().

#define GYROFILTERFACTOR   SOFTWARELOWPASS

Gyroscope Low Pass Factor.

Definition at line 60 of file config.h.

Referenced by gyroRead().

#define LED0DDR   DDRL

First LED Data Direction Register.

Definition at line 127 of file config.h.

Referenced by xyInit().

#define LED0PIN   PL6

First LED Pin.

Definition at line 128 of file config.h.

Referenced by xyInit().

#define LED0PORT   PORTL

First LED Port.

Definition at line 126 of file config.h.

#define LED1DDR   DDRL

Second LED Data Direction Register.

Definition at line 130 of file config.h.

Referenced by xyInit().

#define LED1PIN   PL7

Second LED Pin.

Definition at line 131 of file config.h.

Referenced by xyInit().

#define LED1PORT   PORTL

Second LED Port.

Definition at line 129 of file config.h.

#define LED2DDR   DDRG

Third LED Data Direction Register.

Definition at line 133 of file config.h.

Referenced by xyInit().

#define LED2PIN   PG5

Third LED Pin.

Definition at line 134 of file config.h.

Referenced by xyInit().

#define LED2PORT   PORTG

Third LED Port.

Definition at line 132 of file config.h.

#define LED3DDR   DDRE

Fourth LED Data Direction Register.

Definition at line 136 of file config.h.

Referenced by xyInit().

#define LED3PIN   PE2

Fourth LED Pin.

Definition at line 137 of file config.h.

Referenced by xyInit().

#define LED3PORT   PORTE

Fourth LED Port.

Definition at line 135 of file config.h.

#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

Filter Implementation to be used.

Definition at line 48 of file config.h.

#define PID_D   -13.0

Default PID D Constant.

Definition at line 98 of file config.h.

Referenced by pidInit().

#define PID_I   0.03

Default PID I Constant.

Definition at line 97 of file config.h.

Referenced by pidInit().

#define PID_INTMAX   PID_OUTMAX

Maximum PID Integral Sum.

Definition at line 64 of file config.h.

Referenced by pidInit().

#define PID_INTMIN   PID_OUTMIN

Minimal PID Integral Sum.

Definition at line 65 of file config.h.

Referenced by pidInit().

#define PID_OUTMAX   256

Maximum PID Output.

Definition at line 62 of file config.h.

Referenced by pidInit().

#define PID_OUTMIN   -256

Minimum PID Output.

Definition at line 63 of file config.h.

Referenced by pidInit().

#define PID_P   5.0

Default PID P Constant.

Definition at line 96 of file config.h.

Referenced by pidInit().

#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 RX_BUFFER_SIZE   64

UART Receive Buffer Size.

Definition at line 166 of file config.h.

#define SET_PITCHMINUS   2

Third Motor at the Bottom.

Definition at line 90 of file config.h.

Referenced by setMotorSpeeds().

#define SET_PITCHPLUS   0

First Motor at the Top.

Definition at line 89 of file config.h.

Referenced by setMotorSpeeds().

#define SET_ROLLMINUS   3

Fourth Motor at the Left.

Definition at line 88 of file config.h.

Referenced by setMotorSpeeds().

#define SET_ROLLPLUS   1

Second Motor at the Right.

Definition at line 87 of file config.h.

Referenced by setMotorSpeeds().

#define SOFTWARELOWPASS   1

Software Low-Pass on Gyro and ACC.

Definition at line 58 of file config.h.

#define SPISS   PB0

SPI Slave Select Pin.

Definition at line 160 of file config.h.

#define TX_BUFFER_SIZE   64

UART Transmit Buffer Size.

Definition at line 167 of file config.h.