我正在为我工作的公司开发一个Android应用程序。 这个应用程序将由我们的员工使用,为我们的客户提供产品。 现在他们使用TomTom设备,该设备还可以检测驾驶员对汽车制动/加速的难度。 因为我们想要尝试使用所有正在使用的功能的设备,我正试图找到如何使用Android设备执行此操作。
目前我们的目标是使用Zebra(摩托罗拉)TC75作为设备,它有一个加速度计。 我找到了关于如何调用它的传感器的以下文档,它正在工作。 https://developer.xamarin.com/recipes/android/os_device_resources/accelerometer/get_accelerometer_readings/
然而,我真的不知道值是什么值来检测硬破坏/加速正在发生。
有人可能会让我朝着正确的方向努力让这个工作吗? 或者我希望发现的东西不可能?
提前致谢。
PimDröge
I'm developing an Android App for the company i work for. This app is going to be used by our employees that deliver products to our customers. Right now they use a TomTom device which also detects how hard an driver is braking/accelerating with the car. As we want to try to get 1 device with all functions that are being used right now i'm trying to find how to do this with an android device.
Right now we aim on using the Zebra (Motorola) TC75 as device and it has an accelerometer in it. I found the following document on how to call it's sensors and it is working. https://developer.xamarin.com/recipes/android/os_device_resources/accelerometer/get_accelerometer_readings/
However i have honestly no clue what the values are to detect that hard breaking/accelerating is happening.
Could someone possibly push me into the right direction to get this working? Or is the thing i wish to detect not possible?
Thanks in advance.
Pim Dröge
最满意答案
加速计做了名字所说的 - 测量加速度(速度随时间推移的第一推导 - >距离随时间推移的第二推导62)。
加速度计返回的值描述沿坐标系三个轴的加速度变化,单位为m / s2。
看到
https://developer.xamarin.com/recipes/android/os_device_resources/accelerometer/get_accelerometer_readings/#Additional_Information
因此,您需要一些数值数学来整合这些值以获得速度和距离。 简单的算法应该没问题,但是如果你需要更多的稳定性,可以使用像Runge-Kutta这样的高阶算法。
accelerometer does what the name says - measures acceleration (1st derivation of speed over time -> 2nd derivation of distance over time 62).
The accelerometer returns values that describe the changes in acceleration along the three axes of the coordinate system measured in m/s2.
see
https://developer.xamarin.com/recipes/android/os_device_resources/accelerometer/get_accelerometer_readings/#Additional_Information
So, you'll need a bit numerical math to integrate the values to obtain speed and distance. Simple alogorithms should be OK, but if you'll need more stability go for higher order algorithms like Runge-Kutta.
更多推荐
发布评论