简体   繁体   English

使用智能手机进行运动感应

[英]Motion Sensing Using Smartphone

I have problem in detect position for the iPhone mobile using accelerometer sensor I tried to integrate the accelerometer value twice to get position, but I had big error in the position after integration. 我在使用加速度传感器检测iPhone手机的位置时遇到问题,我试图两次对加速度计值进行积分以获取位置,但是积分后我的位置存在较大误差。 I set the sample rate 100 . 我将采样率设置为100。 I sent accelerometer data to computer over wireless network to C# sever 我通过无线网络将加速度计数据发送到计算机到C#服务器

 dt=0.01// dt is the interval between two samples  
    volx+=linearAcceration[0]*dt;// volx is volcity over x axis 

posx+=volx*dt;//posx is position over x axis

Where I used linear acceleration and calculated it using this equations: 我使用线性加速度并使用以下方程式对其进行计算的地方:

float factoralpha=0.9f;
        Gravity[0] = Gravity[0] * factoralpha + (1 - factoralpha) * xacc;//xacc is acceleration over x axis
        Gravity[1] = Gravity[1] * factoralpha + (1 - factoralpha) * yacc;//yacc is acceleration over y axis
        Gravity[2] = Gravity[2] * factoralpha + (1 - factoralpha) * zacc;//zacc is acceleration over z axis
        linearAcceration[0] =   xacc - Gravity[0];
        linearAcceration[1] =  yacc - Gravity[1];
        linearAcceration[2] =  zacc - Gravity[2];

I need the position for control the tennis racket in my computer game 我需要在电脑游戏中控制网球拍的位置

Could anyone help me to simulate hand movements using accelelometer+gyroscope or get accurate position using accelerometer and gyroscope 谁能帮助我使用加速度计+陀螺仪模拟手的运动,或者使用加速度计和陀螺仪获得准确的位置

I don't want to discourage you, but getting accurate position using an accelerometer and gyroscope is not a simple matter. 我不想阻止您,但是使用加速度计和陀螺仪获得准确的位置并非易事。 While the math says that integrating acceleration twice will yield position, the truth is, the noise in the system quickly dominates the true position signal (noise in the accel itself, all the little taps and jolts it takes, plus quantization noise due to slow ~100Hz sampling). 虽然数学上说两次积分加速度会产生位置,但事实是,系统中的噪声迅速控制了真实位置信号(加速度本身的噪声,所需要的所有轻敲和颠簸,加上由于缓慢而产生的量化噪声〜 100Hz采样)。 Dead reckoning systems today can run only for several 10s of seconds or maybe 1-2 minutes before requiring a recalibration of position. 如今,航位推算系统只能运行几十秒钟,甚至可能需要1-2分钟才能重新定位。 This can be done via triangulation via Bluetooth or WiFi beacons, or by placing the racket near a thing in a known place, like a previously positioning NFC tag. 可以通过蓝牙或WiFi信标进行三角测量,或者将球拍放在已知位置的物体附近,例如之前放置的NFC标签,以完成此操作。 Also, it's likely that 100Hz is not enough, you'll need perhaps 1-2KHz heavily (max rate of accels these days is ~2KHz) filtered down to a bandwidth of ~20Hz, depending upon the speed of movement of your tennis racket. 另外,很可能100Hz不够,您可能需要1-2KHz的频率(目前最大加速度为〜2KHz)过滤掉到〜20Hz的带宽,具体取决于网球拍的运动速度。 I doubt a standard cellphone can achieve this since I think they sample ~100Hz maximum. 我怀疑标准手机能否实现这一目标,因为我认为它们的最大采样频率约为100Hz。 Companies (I'm not sure who) are working on such systems, but they are more difficult to achieve good results than you might expect. 公司(我不确定是谁)正在使用这样的系统,但是要取得好的结果比您预期的要困难得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM