IMU Sensor frames

Hey everyone,
i’m trying to calculate the orientation by myself out of the imu data with the ahrs-Matlab-Filter and compare it with internal calculations. Unfortunately the results do not match and i’m tyring to find out why. How do the imu sensor frames lie inside the drone?

Thanks in advance for the help