I am seekin to calculate the total number of steps to enhance the DISPLAYS of indoor running.
Since I did not immediately found other data, I calculated it using the averageCadence as follows
TotSteps= 2 * elapsedTime.toFloat() / 60000 * avaerageCadence.toFloat;
(1) In the simulation environment everything works fine.
(2) When installed on the fenix the total number of steps - after coming to an halt without switching any button - fluctuates,e.g., between 170 and 180.
Which is nearly correct. However it bothers me that the counter increases AND decreases while being in the REST. So I thought that some wired rounding could be the cause. I modified the code to
var MaxStepsF=0.00;
var CurrStepsF=0.00;
var MaxStepsL=0;
var MaxStepsO=0;
CurrStepsF = AI.elapsedTime.toFloat()/60000*AI.averageCadence.toFloat();
if (CurrStepsF.toFloat() > MaxStepsF) {
MaxStepsF=CurrStepsF.toFloat();
MaxStepsO=MaxStepsL;
MaxStepsL=CurrStepsF.toLong();
}
with subsequent display of MaxStepsL;
Unfortunately, this is not the solution. The total number of steps MaxStepsL fluctuates further, and I am starting not to see the wood of the trees.
Any help ??