In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Many years ago, I don't know how to hear that there is a small converter that can convert the car CAN bus to serial port, and then there is a small device that can be converted to Bluetooth or WIFI interface. This gadget is capable of acquiring OBD II data. OBD II standards are widely used in various automotive controllers, and various status data and warnings of the vehicle can be obtained through these data.
Therefore, many awesome people developed many applications on computers, especially mobile phones, based on this gadget. After obtaining data through Bluetooth or WIFI, process and display it. The use of data is varied, such as custom meters, and then use the windshield to achieve HUD head-up display, use the mobile phone to clear the simple fault alarm (code elimination)... I was also very interested at that time, spent dozens of dollars to buy two to play. In order to write today's article, I went to taobao to take a look, and now it has become cheaper. It looks like this little thing:
There are many applications for collecting data using OBD II communications. I liked Torque years ago and it supports plugins. Usually driving is not much, but a few times a year home, like a person driving at night. Every time I drive a long distance, I like to turn on the OBD II device connected to my mobile phone, because this app can not only display, but also record Log.
I always wondered what these logs could be used for. Fuel consumption analysis? Driving habits? Record driving status? Anyway, keep the data logged and ready to see, maybe one day you can use GIS to show some data analysis on a map? Just like when I was doing mobile communication a long time ago, I collected BTS signal data and GPS information from road test, and then displayed and analyzed the signal quality on the map.
I went home this year and recorded the data again, and then suddenly I had an idea: MVP offered a free Power BI subscription. Since it is a powerful data analysis visualization tool, can it be used to realize my previous ideas? So he downloaded the Log file from his phone and observed it carefully.
I didn't set the log record specially before (I didn't realize it could be customized at first). In the default Log file, GPS time, longitude, latitude, speed (m/s), altitude, three-dimensional acceleration and other data were recorded once per second. For convenience of reading, I added a column of speed conversion to km/h. Power BI is used later to analyze this Log file.
First of all, I looked for the report presentation of Power BI. There are really reports based on geographical information. Drag the data to the corresponding empty space, and Power BI automatically generates the report. First of all, a report of latitude, longitude and altitude, so that I know how to climb mountains on my way home ~
You can adjust the color of the data graph to make height differences more intuitive. I chose red as high and blue as low, so I can intuitively see that there are many higher mountains to climb at the border of Zhejiang, Anhui and Jiangxi, mainly through Yuling Mountain Range, Zhanggong Mountain Range, etc.
It's complicated on the highway. All the way home, the speed limit is 120 for a while, 100 for a while, 80 for a while. I'm pretty disciplined about driving. You don't believe me? There's data to prove it.
Using longitude, latitude and average speed as report data inputs, you can visually see the speed of vehicles on a road on a map. In the Shanghai-Hangzhou section of G60, the speed limit is 120, which is even more "red". On the other hand, the mountain road goes downhill, and the speed limit is generally 80. Therefore, combined with the previous picture, this section is more "blue".
In addition to satisfying my long-held desire to display data on maps, reports can also be used to make "slices" of data. For example, I can check the direction and magnitude of acceleration versus altitude and whatnot. Because of the use of a coordinate axis, the data is not very intuitive here, but the mountain is reflected.
So, I plotted the vertical acceleration separately, and when you look at it against altitude, it's pretty obvious. In order to express "overweight and weightlessness" haha, I added a G=9.8 reference line. Of course, this is not rigorous. Just like the three-dimensional acceleration collected by the acceleration sensor of the mobile phone has direction and "bad data", it is only used as a reference here.
Deliberately left some problematic data ~10 G's. The pilot probably can't stand it either, haha. In addition to the vertical acceleration G(z), it is interesting to analyze the acceleration G(x) in the vehicle direction and the acceleration G(y) in the lateral direction. Again, I didn't carefully align the phone sensors and vehicle orientation, so the data is just a simple principle reference.
The acceleration G(x) in the direction of the vehicle can know the acceleration and deceleration of the vehicle. The old driver with good driving habits will generally minimize the rapid acceleration and deceleration, reduce fuel consumption and avoid accidents. This section uses cluster and line charts, and you can see that there are some bad data points with high G values, while most of the data falls into a relatively concentrated area.
The corresponding lateral acceleration G(y) can be correlated to the situation where the vehicle turns. On good days, I usually go around corners at a constant speed and don't brake much. Sharp turns are also prone to accidents, and attention must be focused on entering and exiting the bend. Along the way, many sharp brakes when entering the corner are even equipped with isolation barriers. As you can see from the graph, most of the cornering acceleration is concentrated in a relatively small range, except for a few bad data points.
Careful you may have noticed, the same value range, why the drag bar on the graph line is much longer than the graph below? Since the data is collected once a second, there are nearly 30,000 rows of data in the whole journey. For ease of presentation, I use advanced filtering of views. Different numbers of data samples are filtered out for different time string inclusions.
The data content of this analysis is still relatively small. I found that Torgue logs can actually customize the fields, and I should find a chance to grab some data to analyze next. At the same time, OBD II data I found that someone has done a library with Python, wait for time to try to connect Bluetooth OBD II devices with Raspberry Pi, and then report the data to IoT Hub try ~ Don't look at the data of ××× million, this file is also about 4MB. On the cloud platform, machine learning ML can also be used to analyze the relationship between road conditions, driving styles and fuel consumption ~ The development of mobile Internet and cloud computing technology has made it possible to turn previous ideas into reality.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.