如何改进计步器算法? [英] how to improve Pedometer Algorithm?
本文介绍了如何改进计步器算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Windows手机中有一个程序,计算没有步骤和aldo no of jummping我使用这个算法来创建应用程序但它不起作用任何人可以帮助我更好的代码或对此代码的任何修改
提前预付
I have a program in windows phone that calculate no of steps and aldo no of jummping I use this algorithm to create the app but It doesn't work perfect can any one help me with a better code or any modification to this code
thanx in advance
if(M>=2)
{
if(magnitude==true)
{
count = count + 1;
magnitude = false;
}
else
{
magnitude = true;
}
if (IsWalking)
{
TextBlock_CountStep_Center.Text = (count*2).ToString();
TextBlock_CounterStep_Cornner.Text =( count*2).ToString();
}
if (IsJumping)
{
TextBlock_CountStep_Center.Text = (count / 2).ToString();
TextBlock_CounterStep_Cornner.Text = (count / 2).ToString();
}
}
推荐答案
这篇关于如何改进计步器算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文