Hello,

I am developing a small IMU system (based on the gluopilot kalman filter).

I'm wondering, how accurate is the pitch estimation made by:

- Code: Select all
`pitch_rad = gravity_to_pitch(sensor_data.acc_x, sensor_data.acc_z);`

If this equation is computed in a loop and the PCB is rotated around the pitch axis, how accurately should this estimate the pitch angle? (That is without running a kalman filter).

I'm trying to get the scaling right for my sensors (I'm using the Freescale MMA7361 3-axis accelerometer and LPR/LP530 from ST for the gyros). Any advice on how I should go about doing this?

Currently I'm doing this:

- When system is first switched on all initialisations are done.

- After the ADC has been configured and turned on 64 samples are taken on each channel and averaged. The average is then taken to be the neutral value for the sensors.

- From then on I average 8 samples from each sensor to obtain the raw sensor value

- I try to scale the sensor by: (Raw value - Neutral value) * Scalefactor

- I am not sure how to compute the scaling factor.

As I understand it, the z-axis accelerometer when still and level should be experiencing a -1g force? Is this correct? If this is correct my z-axis accelerometer output should represent this -1 value?

Thank you

Tinus