You can use the accelerometer and the 3-axis gyro in the iPhone 4 to do more accurate relative rotational detection (especially when traveling in a car).
A better explanation of the differences between the 3-axis gyro and the 3-axis accelerometer, AND the 3-axis digital compass is available...