mpu-6050 i2c library interrupt issue/ hmc9883l 9dof solution

hi everybody.
over the last couple of days ive been wrestling with the mpu-6050 dmp stuff. more specifically, jeff rowbergs i2c library, which is a huge help.

i have a question though as to how the interrupts are handled in the dmp6 example sketch. it seems that this is not the most responsive way to handle the dmp data ready signal, as if the code within the main loop is in a while loop for example, the interrupt wont actually interrupt.

hence im wondering if anyone has a version of the dmp6 sketch which handles interrupts traditionally, ie the yaw pitch roll, in my case, get updated each and every time the interrupt fires.

secondly, im wondering if anyone has any experience porting pansentis 9150 library over to the 6050 with a separate compass on the aux i2c lines? i have a hmc5883l and i really want to use the dmp output of the 6050 and the mag values to feed an ekf (extended kalman filter) or similar, as is done on the 9150. this way my gyro yaw drift will be nulled.

actually does anyone have any filters at all designed to take data from the mpu6050 and hmc5883l and combine it?

cheers

FreeIMU library does just that. Unfortunately the guy behind FreeIMU, Fabio Varesano passed away 6 months months ago, so support is limited. However, his website has links to his forum and the library. You do NOT need his FreeIMU hardware to use his library. I used a MPU6050 with a HMC5883L attached to the aux i2c and it worked great.

He uses a sensor fusion algorithm called a MARG orientation filter.

If you use his libary, you will need to modify the freeIMU.h file to define the sensors you are using, to make sure it disables the barometer since you don't have one. But it is very simple, the code is already there, you just have to comment out a line and uncomment out another. Fabio designed the libary to be used with all sorts of variations of hardware.

http://www.varesano.net/projects/hardware/FreeIMU