#define Kp 2.0f // proportional gain governs rate of convergence to accelerometer/magnetometer#define Ki 0.005f // integral gain governs rate of convergence of gyroscope biases#define halfT 0.5f // half the sample period
Possibly "float" but it depends how the definitions are used later on. In this code it's just definition for the precompiler.
#define GRAVITY 16384.0f#define SCALE_PID_PARAMS 1000.0f
This has a good answer, there are links to relevant info:http://stackoverflow.com/questions/4828167/purpose-of-a-f-appended-to-a-number