车祸最低门槛 [英] Minimum threshold for car accident
本文介绍了车祸最低门槛的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用加速度计来检测车祸.我在检测车祸时需要最小阈值有问题.检测车祸所需的最低阈值.
I am using accelerometer to detect the car accident. I am having a problem with minimum threshold value is required to detect the car accident. What minimum threshold required to detect car accident.
@Override
public void onSensorChanged(SensorEvent event) {
float x = event.values[0];
float y = event.values[1];
float z = event.values[2];
float gX = x / 9.8f;
float gY = y / 9.8f;
float gZ = z / 9.8f;
float gForce = FloatMath.sqrt(gX * gX + gY * gY + gZ * gZ);
if(gForce > //HERE IS NEED THRESHOLD VALUE)
}
推荐答案
基于谷歌搜索,我估计峰值加速度幅度> 40G可能表明发生了车祸.请参阅此本文,以了解车祸期间数据的基础研究.
Based on Googling around, I'd estimate a peak acceleration magnitude of >40G would indicate a car crash. See this this paper for a basic study of data during car crashes.
或者,您可以自己撞死几辆汽车并获得一些测试数据. :)
Alternatively, you could crash a few cars yourself and get some test data. :)
这篇关于车祸最低门槛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文