Accuracy of localization improved with correcting orientation and apply pedometer algorithm based on activity recognised