1. A method, implemented by one or more devices, comprising: receiving, by the one or more devices, acceleration measurements from a three axis accelerometer mounted in a vehicle; determining, by the one or more devices and based on the acceleration measurements, a dominant orientation of the accelerometer in relation to gravity, the determination of the dominant orientation including calculating a first transformation angle and a second transformation angle as parameters to perform coordinate realignment of a coordinate frame of the accelerometer to a coordinate frame of the vehicle; identifying, by the one or more devices and based on the acceleration measurements, an occurrence of acceleration events of the vehicle, each of the acceleration events including a plurality of acceleration measurements in which a magnitude of the plurality of acceleration measurements are greater than a threshold value; determining, by the one or more devices and based on an analysis of the acceleration events, a third transformation angle as a parameter to perform coordinate realignment of the coordinate frame of the accelerometer to the coordinate frame of the vehicle; and storing, by the one or more devices, the first, second, and third transformation angles.