Another thing: I tryed by curiosity to rotate my IMU not around the Z axis and horizontally, but by putting it perpendicular to the table (then rotate it aroud the horizontal axis), and the heading does vary from 0 to 360°... Maybe that I am wrong in my definition of the used axes that retreive the heading ?