G-sensor collision detection