Research on Location Method of Vehicle Trajectory based on
Intelligent Terminal
Hangtian He
1
, Haiyan Wang
1
, Hao Zhang
1
,Qing Liu
1
and Jindong Zhang
1, a, *
1
College of Computer Science and Technology, Jilin University, Changchun, China
Keywords: Android, GPS, Sensors, Data Acquisition, Real-time Monitoring.
Abstract: With of people's living standards improving, small cars have gradually become the first choice. However,
the consequent traffic problems restrict the development of our society. Based on Android OS and
combined with GPS positioning and smart phone sensor components, this paper develops a software for
real-time monitoring of vehicle speed and trajectory. The position, speed, acceleration and trajectory of cars
are collected and monitored, and the processed data are uploaded to the mobile client through the network
of the mobile phone, and the driving status of the vehicle is monitored in real time through the Android
client. In order to ensure the accuracy of data recording, the minimum distance of GPS and refresh time
interval (refresh once in a second, if the distance exceeds 0.3m compared with the historical location, the
monitoring data will be written into the file). To ensure the real-time performance of acceleration data and
GPS data, the refresh time interval of the body sensor is set to 0.5 s.
1 INTRODUCTION
With the development of human society, there are
more and more automobiles. Though it brings great
convenience to human beings, traffic problems are
becoming more and more serious. According to the
survey, a large part of traffic problems is caused by
malfunction of automobiles. However, no
malfunction occurs abruptly. It can be predicted in
advance by monitoring the state of automobiles,
which can largely alleviate traffic problems.
Therefore, real-time monitoring of the running state
of automobiles is of great importance (
LUO Bing-
Yang, et.al, 2016
). There are two main characteristics
of great mobility and wide range in automobile
industry. Therefore, for real-time monitoring of
automobiles, there is a high demand for real-time
interaction of information. So it is necessary to
establish an informationalized, graphical and online
application platform (
Huang Aqiong, Gu Yunhui, Fu Li,
2013) so as to meet the real-time monitoring of
trajectory and speed of cars. GPS and 4G network
are used to transmit the real-time running state of
cars to the mobile phone to achieve real-time
monitoring, the mobile phone can acquire the
driving state of the car in.
With the advancement of scientific information
technology, computer technology and network
technology have been greatly improved, and on this
basis, remote management monitoring technology
(
Ma Jian, 2016) has been realized. In recent years,
Web-based vehicle monitoring has been
continuously studied and applied, and develops
rapidly in many fields, for example, remote
monitoring and network management technology
has been widely used in vehicle management system
(
Han J W, Kamber M, 2001).At present, wireless data
communication module, sensor module and satellite
positioning module have been applied to the
information monitoring system like vehicle
positioning, vehicle operation status and so on at
home and abroad (
Moridong, Luo, et.al, 2016). Now
the popularity of mobile phones with Android OS
enables us to achieve a real-time monitoring of
vehicle operation status in a more economical and
convenient way, namely, monitoring vehicle
operation combining Android with GPS and mobile
phone’s sensor components in real-time.
He, H., Wang, H., Zhang, H., Liu, Q. and Zhang, J.
Research on Location Method of Vehicle Trajectory based on Intelligent Terminal.
DOI: 10.5220/0008869900970101
In Proceedings of 5th International Conference on Vehicle, Mechanical and Electrical Engineering (ICVMEE 2019), pages 97-101
ISBN: 978-989-758-412-1
Copyright
c
2020 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
97
2 APPLICATION DESIGN
The purpose of this application is to develop a
software based on Smartphone (Android version 6.0
or above and pre-installed Google GPS system
services and body sensor components), which can
automatically record the speed and trajectory of the
vehicle in the background and generate a record file.
Figure 1. Flow chart of the program.
2.1 Relevant Technologies
This application is developed on Android platform
by combining GPS module of Google system
service, body sensor module of mobile phone and
Baidu Map SDK. Main technologies used are as
follows:
2.1.1 About Android System
This application development is based on Android
version 6.0 or above. Android version 6.0 or above
has changed its permission control mechanism,
meaning the app needs to be granted with the
permission declaration by the system (
Yang Jun,
2015
). And the time to be granted is when the user
installs APP. The implementation method is to add
permission application in Manifest file. And the
permission is divided into four levels:
Normal: Low-risk permissions, user’s
confirmation is not required for installation
Dangerous: High-risk permissions. User's
confirmation is required for installation.
Signature: The permission can only be granted if
the digital signature of the application applying for
the permission is the same as that of the application
declaring the permission.
SignatureOrSystem: The application with the
same signature or application permission is a system
application (in system image), which is similar to
Signature. Try not to use this option, Signature is
suitable in most situations.
2.1.2 GPS Module
The GPS service component obtains four sets of
data, [Position 1, d1] [Position 2, d2] [Position 2, d2]
[Position 3, d3], which are mainly (satellite position
and distance from signal receiver) (
Fang Xingbo, Tao
Tingye, Gao Fei, 2017). After many high frequency
measurements of positioning points, the speed and
direction of the GPS signal receiver are obtained,
which is fed back to the “Location” variable through
the monitor for users to use.
2.2 Realization of Main Functions
There are three main modules in this software: GPS
information acquisition module, acceleration
information acquisition module and writing in local
SD card module.
2.2.1 GPS Information Acquisition Module
Figure 2. Flow chart of acquisition of GPS information
module.
Two tools are needed in this module: GPS module
embedded in mobile phone and Baidu map
development tool.
1. Configuration Information Description File
Step 1: Declare the permission for accessing to
GPS Declare service component
Step 2: Set the KEY value for developing Baidu
Map;
Step 3: Implement Location Listener positioning
interface
Step 4: Set Location Source (this); Register
positioning monitor
Positioning parameters: Longitude, Latitude,
Speed, Direction setting
Display the positioning layer and trigger the
positioning.
Step 5: get method returns positioning result
2.2.2 Acceleration Information Acquisition
Module
ICVMEE 2019 - 5th International Conference on Vehicle, Mechanical and Electrical Engineering
98
Figure 3. Flow chart of acquisition of acceleration
information module.
Step 1: Declare the permission for the program to
access to body sensors in Mainfiest.XML
Step 2: Implement sensor interface EventListener
Step 3: Rewrite the onSensorEvent Changed
(SensorEvent event) method and return the result of
the acceleration of the positioning direction. (Values
[0]: X-axis acceleration Values (
LUO Bing-Yang,
et.al, 2016
): Y-axis acceleration Values (
Huang
Aqiong, Gu Yunhui, Fu Li, 2013
): z-axis acceleration)
2.2.3 Write to Local File Module
Figure 4. Flow chart of write file module.
Step 1: Declare the permission for the program to
access to GPS in configuration information
description file
Step 2: Judge whether SD cards exist
Step 3: Get the root directory of the SD card:
Environment.getExternalStorageDirectory().getAbso
lutePath()
Step 4: Get the default file storage path: FILE.
getAbsolutePath ();
Step 5: Read files using BufferReader
Write in files using BufferWriter (in append
mode).
3 ANALYSIS OF THE ACQUIRED
MONITORING DATA
Test environment: (This test only aims at the
purpose of testing whether the software can monitor
the speed and trajectory of vehicle)
This test data is based on the data obtained from
the track and field sports test in South Campus of
Jilin University, at 7:30 pm, on July 6, 2019. Fig. 7.
is the complete motion path map, and Fig. 5and 8.
are the velocity and acceleration data segments
obtained by random detection.
Figure 5. Acceleration curve diagram (part).
Research on Location Method of Vehicle Trajectory based on Intelligent Terminal
99
Figure 6. Scattered positioning points diagram.
Figure 7. Travel trajectory diagram.
The test results may be slightly different in
different test equipment due to hardware factors
such as different mobile phone models and sensor
models. The results of the monitoring data reflect the
movement status of every second in the testing
process, and the complete trajectory through the
positioning point and the direction of movement is
obtained, which can achieve the expected purpose of
monitoring the speed and trajectory of the vehicle.
ICVMEE 2019 - 5th International Conference on Vehicle, Mechanical and Electrical Engineering
100
Figure 8. Velocity curve diagram (part).
4 CONCLUSIONS
In this paper, a set of application software is
developed on Android platform using GPS
positioning service component and sensor
component on the mobile phone, which can monitor
the vehicle's transportation speed, trajectory and
record in real time. The software meets the demands
of middle and low-end mobile phone users for fast
operating speed and less memory, and can adapt to
the latest Android system.
Test the operating environment: The software
runs normally in many mobile phones with Android
6.0 or above operational systems. The accuracy of
positioning and monitoring data is in 5-10m, which
meets the accuracy requirements of monitoring and
collecting motion data and is consistent with the
expected results.
Module expansion application: The location
information module and acceleration acquisition
module in the program can also be widely used in
other positioning or motion monitoring software.
ACKNOWLEDGEMENTS
This work is supported by National Key Research
and Development Program of China
(2017YFB0102500), Natural Science Foundation of
Jilin province (20170101133JC), the Fundamental
Research Funds for the Central Universities, and
Jilin University (5157050847, 2017XYB252).
REFERENCES
Fang Xingbo, Tao Tingye, Gao Fei. Design of App for
Mobile Location and Navigation Based on Android.
19th East China Surveying and Mapping Society
Academic Exchange Conference and 2017 Cross-
Strait Surveying and Mapping Technology Exchange
and Academic Seminar, 2017.
Han J W, Kamber M. Data mining: concepts and
techniques [M]. San Francisco, US: Morgan
Kaufmann, 2001.
Huang Aqiong, Gu Yunhui, Fu Li. Application of Internet
of Things in Road Transportation [J]. Electronics
World. Ph17, 13-14, 2013.
LUO Bing-Yang, CHEN Miao, CHEN Ya, PAN Yi.
Monitoring and Diagnosis of Car Vehicle Terminal
Based on Android Handset. Computer Systems &
Applications. Ph2, 263-267, 2016.
Ma Jian. Design and implementation of Web-based remote
monitoring system for equipment [D]. Taiyuan City:
Zhongbei University, 2016:2-12.
Moridong, Luo Hongyu, Jiang De, Shengcunbao.
Automobile Monitoring System Based on GPRS and
Android. Data Communications, Ph4, 17-22, 2016.
Yang Jun, Android 6.0 Added Detail Management
Application Authority, Computer & Network, Ph16,
39, 2015.
Research on Location Method of Vehicle Trajectory based on Intelligent Terminal
101