Walk detection and step counting on unconstrained smartphones