[英]Driving Style Detection using Smartphone Sensors
I want to measure the acceleration (forward and lateral separately) using an android smartphone device in order to be able to analyse the driving behavior/style. 我想使用Android智能手机设备测量加速度(分别向前和横向),以便能够分析驾驶行为/风格。
My approach would be as follows: 我的方法如下:
Calibration (no motion / first motion): While the car is stationary, I would calculate the magnitude of gravity using Sensor.TYPE_GRAVITY
and rotate it straight to the z-axis (pointing downwards assuming a flat surface). 校准(无运动/第一次运动):当汽车静止时,我会使用
Sensor.TYPE_GRAVITY
计算重力的大小,并将其直接旋转到z轴(指向下方,假设是平坦的表面)。 That way, the pitch and roll angles should be near zero and equal to the angles of the car relativ to the world. 这样, 俯仰角和俯仰角应接近零并且等于汽车相对于世界的角度。
After this, I would start moving straight forward with the car to get a first motion indication using Sensor.TYPE_ACCELEROMETER
and rotate this magnitude straight to the x-axis (pointing forward). 在此之后,我将开始使用汽车直接向前移动,以使用
Sensor.TYPE_ACCELEROMETER
获得第一个运动指示,并将此幅度直接旋转到x轴(指向前方)。 This way, the yaw angle should be equal to the vehicle's heading relativ to the world. 这样, 偏航角应该等于车辆相对于世界的方向。
Update Orientation (while driving): To be able to keep the coordinate systems aligned while driving I am going to use Sensor.TYPE_GRAVITY
to maintain the roll and pitch of the system via 更新方向(驾驶时):为了能够在驾驶时保持坐标系统对齐我将使用
Sensor.TYPE_GRAVITY
来维持系统的滚动和俯仰
where A_x,y,z is the acceleration of gravity. 其中A_x,y,z是重力加速度。
Usually, the yaw angle would be maintained via Sensor.ROTATION_VECTOR
or Sensor.MAGNETIC_FIELD
. 通常,偏航角将通过
Sensor.ROTATION_VECTOR
或Sensor.MAGNETIC_FIELD
维持。 However, the reason behind not using them is because I am going to use the application also in electrical vehicles . 然而,不使用它们的原因是因为我将在电动车辆中使用该应用程序。 The high amounts of volts and ampere produced by the engine would presumably make the accuracy of those sensor values suffer.
由发动机产生的大量伏特和安培可能会使这些传感器值的精度受损。 Hence, the best alternative that I know (although not optimal) is using the GPS course to maintain the yaw angle.
因此,我所知道的最佳替代方案(尽管不是最佳的)是使用GPS路线来维持偏航角。
By applying all aforementioned rotations it should be possible to maintain an alignment between the smartphone's and vehicle's coordinate systems and, hence, giving me the pure forward and lateral acceleration values on the x-axis and y-axis. 通过应用所有上述旋转,应该可以保持智能手机和车辆坐标系之间的对齐,从而在x轴和y轴上给出纯粹的前向和横向加速度值。
In regards to finding acceleration, if you have access to the source code of the GPS couldn't you find the forward motion by calculating the distance/time from the GPS? 关于寻找加速度,如果你有权访问GPS的源代码,你不能通过计算GPS的距离/时间来找到前向运动吗?
If the goal is to find driving behavior and style I would imagine gathering a large data set and then using ak means cluster algorithm to sort the data followed by an lstmRNN (to make predictions) could be another method. 如果目标是找到驾驶行为和风格,我会想象收集一个大型数据集,然后使用ak意味着聚类算法对数据进行排序,然后使用lstmRNN(进行预测)可能是另一种方法。 (Though this requires you to have data from a large set I don't know if this is possible nor do am I aware of what factors you would want to incorporate in your data set).
(虽然这要求您从大型集合中获取数据,但我不知道这是否可行,我也不知道您希望在数据集中包含哪些因素)。
Sounds like an interesting problem though. 虽然听起来像一个有趣的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.