To measure tilt angles, you need only a 3 axis accelerometer. Here is a good tutorial.
Any electronics connected to an automotive electrical system needs serious protection from high voltage spikes and voltage reversals. Also, the voltage of a car battery is too high to directly connect to an Arduino, so you need a voltage regulator module to bring it down to the range of about 7-9 V.