I'm trying to make a drone controlled by a raspberry pi, and for it I need accurate pitch, roll and yaw data. I've tried using a complementary filter but it's just too slow and laggy. I've been doing a lot of research and I've found that the MPU6050 has a DMP to process all the data and it outputs a quaternion which can be used for pitch, roll and yaw. However, from all the research I've been doing, I can only find sources on how to access it using a arduino and there's nothing for the raspberry pi.
My question is, are there any sources detailing exactly how to extract the DMP data from the MPU6050, or libraries for the raspberry pi (zero w to be specific but that doesn't matter) to read these DMP values (preferabbly in c++)?