Solved! Go to Solution.
Haven't used Acceleration before but sounds like a cool idea.
If I was you I would start by setting up a basic app that displays the acceleration.Z (Up and down) in a label and Acc.Y (forward and back). Then go for a quick walk and keep an eye on which way the numbers are going, and where they start when the app first loads. That should give you an idea of when you should 'record a step'.
Next, you'd also need something to keep looping to check what the values are of Z & Y. if the loop checks and the value is higher than the limit you have set for a 'step', then get it to update a variable or something. A timer could handle the looping every 0.5 seconds or so, and an if statement on the timer to check if the values fall inside/outside your range.
My guess is it wouldn't be super accurate, but it's a good start. To make it more accurate, potentially get the timer to loop much quicker, every 0.1 seconds. and save the current Acc.Y to a variable. if the new value is higher than the previous value then you'd save it as a 'step'.
You could use Lat/Long, but then you'd have to do some step averaging based on the distance someone has walked. e.g. 1 step every 1.2 metres or something.
Haven't used Acceleration before but sounds like a cool idea.
If I was you I would start by setting up a basic app that displays the acceleration.Z (Up and down) in a label and Acc.Y (forward and back). Then go for a quick walk and keep an eye on which way the numbers are going, and where they start when the app first loads. That should give you an idea of when you should 'record a step'.
Next, you'd also need something to keep looping to check what the values are of Z & Y. if the loop checks and the value is higher than the limit you have set for a 'step', then get it to update a variable or something. A timer could handle the looping every 0.5 seconds or so, and an if statement on the timer to check if the values fall inside/outside your range.
My guess is it wouldn't be super accurate, but it's a good start. To make it more accurate, potentially get the timer to loop much quicker, every 0.1 seconds. and save the current Acc.Y to a variable. if the new value is higher than the previous value then you'd save it as a 'step'.
You could use Lat/Long, but then you'd have to do some step averaging based on the distance someone has walked. e.g. 1 step every 1.2 metres or something.
I think this is a very interesting from the perspective of 'could it be done' with Power Apps, but if this is for a serious App I'd advise that you probably don't want to do this with PowerApps.
I don't think that a timer will continue to run and record the accelerometer data if Power Apps is not running in the foreground on the device which I think makes Power Apps impractical in this scenario.
Don't most phones these days have a low power co-processor that can track steps? Maybe you could easily access that from a native app.
How do I do that from a native app and what do you mean exactly? i am kind of new to this. Can you explain more please?
I tried recording the change of numbers of accY and accZ but the numbers keep on changing even if the phone is fixed on a table. is that normal? And why would I consider it a step if the value goes higher than the range? What if it gets lower? This is what I am trying to know I cant find how a single step is measured using x,y and z. Shouldn't there be a fixed formula to deduce the number of steps accurately?
User | Count |
---|---|
170 | |
95 | |
77 | |
72 | |
59 |
User | Count |
---|---|
215 | |
166 | |
97 | |
95 | |
74 |