Exploiting accelerometers to estimate displacement