Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pedometer (Step Counter)

I am developing a Pedometer Android application to count number of steps taken and using the steps calculate the distance covered and calories burned. I have followed the tutorial Create a Simple Pedometer and Step Counter in Android and done exactly like it. It detects number of steps when the sensor detects motion.

But there are some problems with it:

  1. When I stand at the same place with my device in my hand and just move my hand or give a jerk to device, it detects the change and adds to step count.
  2. If I move very slowly with device in my hand it does not detect the change.
  3. If i jump, then it adds several steps in the counter.

I have checked some other applications from Play Store they do not do this kind of stuff.

I have searched but cannot find an appropriate solution or tutorial for it. Any help or suggestions. Thanks

like image 405
Harry .Naeem Avatar asked Oct 19 '17 06:10

Harry .Naeem


People also ask

Can I use my phone as a pedometer?

It's your phone, of course. Thanks to built-in accelerometers, the phone can easily pull pedometer duty. All you need is an app that records the results (and, ideally, syncs them with other apps). Let's take a look at some of the best step-counter apps for Android.

What is the best free pedometer app?

Ranked highly by both iOS and Android users, the Pacer Pedometer & Step Tracker is our pick for best overall. This fitness app is a step counter, activity tracker, and social support all wrapped up in one easy-to-use program.

Is there a free step counter app?

EasyFit Pedometer is, just like the others, a free pedometer for Android designed to help you get fitter by walking more. The app monitors your step count, distance, active time and the total of calories burned.


1 Answers

The problem here is that your implementation is not sophisticated enough: it only checks if there is a spike in the accelerometer data and assumes that the spike is coming from a step. It has no idea where the spike in acceleration is really coming from: it might as well come from you jumping or shaking the device in your hand.

How to make it more accurate then? Well, that is a really difficult question which has been topic for scientific papers for a really long time. Even the most sophisticated fitness trackers (which use machine learning, signal processing and other statistical methods) have difficulties to determine when the step is real and when it is just noice or user playing with the device.

Luckily Android does have it's own builtin step counter and step detector, which are more sophisticated than the class in yor example.

So unless you really want to learn signal processing and AI (which I highly recommended, although I don't know much about the data science of step detection), I would suggest to use builtin detector and counter.

like image 70
TukeV Avatar answered Sep 18 '22 14:09

TukeV