ultimate imu and arduino mega

hello I also have an ultimate imu, and a mega arduino my problem is I do not know how to implement the program in the LPC2148 to calculate the angles and how to read angles in the arduino if you have any solutions