where t is time of arrival of current sample, t-1 is time of arrival of previous sample and at = (axt, ayt, azt). A moving time window Ts seconds is selected for stability stability to make sure that the device is stable for Ts Seconds and the sd value is computed for each incoming sample and stored in a queue(in first-in-first-out fashion) for maintaining a moving window of samples, and the size of queue is taken as Ts*S (where S is the sampling rate of the accelerometer Sensor). In addition to the sd value computation, the acceleration values axt, ayt, azt are maintained in three separate queues of size Ts*S to determine stabilization Correction values after the device is stabilized. All the sd values in the queue are checked against a preset stability SD with a condition as shown in Equation 4.2