Proceedings of 0 International Conference on Modelling, Identification and Control, Wuhan, China, June 4-6, 0 Advanced Vehicle Monitoring System Based on Arcgis Silverlight SHANG Wenli, HE Chao, ZHOU Xiaofeng, HAN Zhonghua, PENG Hui and SHI Haibo Abstract Intelligent Vehicle Services System is currently a hot research issue of Internet of Things (IOT) application in automotive industry, and real-time monitoring of vehicles is one of the core and key modules. This paper discusses ArcGIS API for Silverlight and its application on Vehicle Monitor System, and introduces design principles and framework of Vehicle Monitoring System, as well as map matching and history track algorithm. A vehicle monitoring system is realized by using Arcgis API,.NET Framework, Visual Studio and Silverlight Tools. At last, design principle of main functions as split-screen monitor, vehicle location, map mark, electronic fence and historical track realized in Vehicle Monitoring System are introduced. Index Terms ArcGIS Silverlight Vehicle monitoring Map matching T I. INTRODUCTION HE Vehicle Monitoring System is background application system based on vehicle information, which integrates vehicle driving data, satellite positioning and communication functions, can provide a simple and effective vehicle management methods for service providers, and provide real-time vehicle information for passengers or customers []. Traffic blocking improvement, vehicles emergency dispatch, fleet management and other practical applications demand real-time vehicle monitoring. With rapid development of Global Satellite Positioning System and wireless communication technologies, real-time remote monitoring and positioning of moving targets is becoming possible, and the technology is becoming more mature [-4]. Now main fleet board system including CARMINAT vehicle positioning and dispatch system (France), TravTek vehicle location and dispatch system (General Motor Company in American), automotive electronic navigation system (SUMITOMO electronics Manuscript received March, 0. This work was supported in part by the National Natural Science Foundation of China (60904047, 6640) and Major Scientific and Technological project of Liaoning Province (06008). Shang Wenli is with Shenyang Institute of Automation, Chinese Academy of Science, Shenyang, China (corresponding author to provide phone: 04-836038 fax: 04-836078 e-mail: shangwl@ sia.cn). He Chao is with Graduate school of the Chinese Academy of Sciences, Shenyang, China (e-mail: hechao5549@sina.com). Zhou Xiaofeng is with Shenyang Institute of Automation, Chinese Academy of Science, Shenyang, China and the Graduate School of Chinese Academy of Science, Beijing (e-mail: zhouxf@sia. cn). Han Zhonghua is with Shenyang Jianzhu University, Shenyang, China (e-mail: hanzhonghua@sia.cn). Peng Hui is with Shenyang Institute of Automation, Chinese Academy of Science, Shenyang, China (e-mail: penghui@sia.cn). Shi Haibo is with Shenyang Institute of Automation, Chinese Academy of Science, Shenyang, China (e-mail: hbshi@sia.cn). company of Japanese), and Mercedes Benz FleetBoard fleet management systems, etc. [5]. Vehicle monitoring system is realized by combining GPS, GPRS and GIS, vehicle location and status information are collected with vehicle terminal, and data is transmitted from moving vehicles to monitoring center by wireless network communication technology. At last, vehicle location and status information is displayed dynamically in the monitoring center. Lei[6] gives a detailed description on functional modules and business processes of a fleet management information system, but not descripts system implementation process. Wu[7] and Li[8] introduce vehicle monitoring system developed based on C/S pattern in VB environment with ArcGIS Engine, which is now leading development modes. In this paper, a vehicle monitoring system is developed using API interface provided by ArcGIS Silverlight, Google Maps slice cache technology, and Visual Studio.NET Framework. Main functions of the system including split-screen monitoring, vehicle positioning, map mark, electronic fence, historical track, and vehicle inquiry. The paper is organized as following: Section is dedicated to introduce vehicle monitoring technology development. In Section, system framework, system design principles and map matching algorithm is described. In Section 3, we will introduce several key functions, including: Split Screen Monitoring, Electronic Fence, Vehicle Positioning, Map Mark, and Historical Track. The conclusion of this paper is given in Section 4. II. SYSTEM DESIGN A. System Framework The proposed system design framework based on WebGIS is shown in Figure. The entire system framework is divided into four layers: presentation layer, application layer, WCF service layer, and data layer. ) Data layer, which is used to maintain requirment space data and attribute data of the vehicle monitoring system. ArcgSDE database is adopted. ) WCF service layer, raw data used by silverlight application client program is provided by WCF service layer. 3) Application layer, which processes requests of the silverlight client in vehicle monitoring system and the ArcGIS map services. 4) Presentation Layer, which is visual interface provided by system to the client, and provides a variety of interoperability like queries, set, etc. 83
Proceedings of 0 International Conference on Modelling, Identification and Control, Wuhan, China, June 4-6, 0 Fig.. System framework Microsoft Silverlight is a cross-browser, cross-client platform technology, which can be used to design, develop and distribute network interaction program with rich interactive (RIAs, the Rich the Interface Application) multimedia experience. ArcGIS API for Silverlight is a programming interface for Application of WebGIS in Silverlight platform, which is based on the ArcGIS Server REST interface, and allows integration of services and functions provide by ArcGIS Server, ESRI, Inc. MapIt, and Bing Maps. B. System Design Principles In order to improve system coupling and components reusability, each client interface is designed in form of control set. Each control can re-use controls designed, so a good interface can be formed by assembly custom controls. For handling the client's request, the control itself does not include core handler, which needs to call event handle interface provided by application layer, and pass appropriate parameters. The mode can reduce maintenance complex of control and improve control flexibility. Control is designed using controls template provided by silverlight, both control contents and control structure are costumed according to system requirements. Specific XMAL syntax is as follows: <Style Target="self definition control"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType=" self definition control"> <!---here define control template -> </ControlTemplate> </Setter.Value> </Setter> </Style > Each control is encapsulated in <DictionaryResource/>, and is managed with generic.xaml files. C. Map Matching Arithmetic For GIS functions, package of Google Maps is used as base map, various elements layers are added in the above, and information and interfaces provide by layers is used to realize variety functions. Vehicle positioning and map mark use JSON data format, ArcGIS Silverlight provides API interface for receiving JSON format data, which encapsulates element attribute information as data in JSON format, and add them to layers. The mode improves system performance effectively. Interaction between interface and data is realized by data binding. Each Silverlight UI elements has DataContext property, which is used to bind data sources. System uses DataGrid control to bind data. For bound object collection, collection ObservableCollection is used. After data binding mode is set, while object collection data source changes, the control can effectively access notifications about the data source change. Vehicle positioning in vehicle monitoring system is based on GPS data. There is a certain error between GPS latitude and longitude data collected and the practical maps, so a series of algorithm is used to match position point with the correct travel path. Through study of related map matching algorithm [9-], an improved algorithm is proposed as follows: Algorithm steps: Step0: Initialization the vehicle location information and travel information at time t 0 Step: Obtain GPS location data at time t i Step: According to nearest point estimation algorithm, search for road space A Step3: According to vehicle travel information at time ti, predict possible vehicles road space B at time t i Step4: Candidate road space S=AUB Step5: According to nearest point estimation algorithm, take road with the shortest distance from as matching road. The algorithm can improve accuracy of map matching. Fig.. Map matching algorithm 833
Proceedings of 0 International Conference on Modelling, Identification and Control, Wuhan, China, June 4-6, 0 Historical track is achieved by processing a lot of historical data [0-]. In this paper, we use a algorithm based on the road model to reduce amount of historical travel data, which reduces also the data size, and using the optimized data to generate historical track. Specific method is used to extract feature points from the original data, and history track is formed according to these characteristics. Feature points are referred to main special point data that represents large amount of vehicle travel history data. Vehicle track data is selected according to deviation of vehicle direction. Set S as all track data set collection, Q as selected feature points collection, andq S. Set P,P as any two consecutive points in the collection Q. According to different application, set a threshold δ, then P,P must satisfy the condition d d [3] ( d is the direction of P, d is the direction of P ). Based on above principles, we design an algorithm, which get the feature points collection Q according to original data collection S and start point P 0, then generate vehicle history track, which greatly improves the system performance. The algorithm is as follows: Algorithm steps: Step0: Take GPS data ( S ) at time t 0 as track starting position, and add it to the collection Q. Update current travel direction data in collection Q with direction value in data. Step: Read next GPS data ( S ) in time order. Go to Step3 if position that represent is end point, algorithm is finished. Otherwise, go to Step. Step: Compare difference between vehicle travel direction data d t of GPS at time t with d. If d t d ( is the threshold value), then go to Step3 otherwise abnegate this data, and go to Step. Step3: Add position that GPS data represents into collection Q, Update current travel direction data d in collection Q with direction value in GPS data. History track generated based on the optimized data set cannot cover all the historical data, so track playback also involves a matching problem. Track playback matching is that while position which GPS data t represents is not on track ( t Q ), then match this GPS location to track. Track playback matching algorithm is as follows: Command and as two GPS data with adjacent time, and t t t (where t is time value in data, t is time value in data ), is track generated by and, then track matching is to projection position at time track. III. SYSTEM IMPLEMENTATION t to A. Split Screen Monitoring Split Screen Monitoring provides multiple windows on a display output device, and monitors different vehicles respectively at the same time. Number of monitor window is variable according to user's choice, and each monitoring window status is independent. Monitoring window is designed with the custom layout panel, mainly with silverlight Grid layout control. Row and Column values are set through window parameters, and defined map control is added to each cell. Firstly, layout panel class CustomPanel is defined, the class has a Grid class property, which corresponding to the Grid Control in XMAL file. The Grid class has two collection attributes as ColumnDefinitions and RowDefinitions. CustomPanel class defines a int property for receiving user input parameters, ColumnDefinitions and RowDefinitions are set according to attribute value. Then RowDefinitions and ColumnDefinitions is used to create the appropriate number of columns and row. Map service is bound to each windows according to Grid.SetColumn () and Grid.SetRow () method. Split Screen Monitoring is shown in Figure 3. Fig.3. Four Split Screen Monitoring windows B. Electronic Fence Electronic Fence can realize division of the polygon according to administrative regions, including provinces, municipalities and county levels. Polygon division use Draw class provide by ArcGIS Silverlight. According to the system design principles, this function is encapsulated into a control. While initialize control class, a Draw class is declared. MonitorDrawObject = new Draw() { LineSymbol = user-defined symbol FillSymbol= user-defined symbol } Add an event to this class so as to deal witn operation after draw graphics. MonitorDrawObject.DrawComple+=MonitorDrawObject _DrawComplete 834
Proceedings of 0 International Conference on Modelling, Identification and Control, Wuhan, China, June 4-6, 0 Administrative areas division is completed by query geographic base data stored in spatial database. These geographic data and draw graphics are Polygon class, vehicle cross-border is determined by judging whether vehicle regional is contained in the Polygon class. Editing function of the monitoring region is realized by using Editor class of ArcGIS Silverlight, which provides many command tool like edit, delete draw, etc. }, ""geometry"" : { <! set coordinate value--> } } ] }" Then FeatureSet.FromJson() is used to resolve data, Graphic class is created for each vehicle and added to the corresponding layer. The interface is provided by Maptip attributes of class Graphic in ArcGIS Silverlight is also used to create information prompt window while mouse appear at the top for each vehicle. Fig.4. Set the monitoring area C. Vehicle Positioning Vehicle positioning needs to converse the spatial reference system. Vehicle coordinates raw data transmitted by GPS is based on the geographic coordinate system, such as WGS84 latitude and longitude data, and the spatial reference is system defined with ID 436 in EPSG. But projection coordinate system is used in network map, such as Web Mercator projection. Projection transformation is firstly done before vehicle is located with coordinates. FromGeographic and ToGeographic method in class WebMercator provide projection conversion functions, but only adopt to converse the projection coordinate system with ID 000 and geographic coordinate system with ID 436. Other coordinate system need to call ISpatialReferenceFactory3 interface in ArcGIS Object Library. Position vehicles on the map is mainly realized through adding Graphics Layer on the map, namely adding GraphicsLayer, where vehicle attribute data is encapsulated in JSON format. The mode can improve system performance. Format is shown as following: string JSON= @"{ ""displayfieldname"" : ""AREANAME"", ""geometrytype"": ""esrigeometrypoint"", ""spatialreference"" : {""wkid"" : reference values}, ""fieldaliases"" : { <! set attribute other name--> }, ""features"" : [ { "attributes"" : { <! set attribute and value--> Fig.5. Vehicle location D. Map Mark Map mark function is achieved through three steps: capture mark position, pop-up information input window and add a label layers. For capture mark position, MouseClick event is added to the Map, then an event handler function new EventHandler <Map.MouseEventArgs> (Map_MouseClick) is created. MapPoint class of click position can be get by the MouseEventArgs parameter, so location information is obtained according to the MapPoint class. A BOOL value is declared in event handler function to control whether trigger event processing. Information window is realized by InfoWindow class in API, a control is defined and added to InfoWindow, which is used to process the input information. For add a label layer, MapPoint class is encapsulated into Graphic class, and then a GraphicsLayer layer is declared, and Graphics attribute of the GraphicsLayer class is added to the Graphic class. Fig.6. Add map mark 835
Proceedings of 0 International Conference on Modelling, Identification and Control, Wuhan, China, June 4-6, 0 E. History Track New GPS data are collected continually in process of vehicles moving, track optimization algorithm is used to generate track data. These data is used to generate Polyline elements, and then is added to the layers and displayed on the map. Fig.7. History track [7] Wu Jianhua. Development of Vehicle Monitoring-based GIS system based on ArcGIS Engine, Geo-Information Science, 0(): 88-94. (in Chinese) [8] Li Chunli, Zeng Zhiyuan, Xu Xuejun. Vehicle monitoring system based on ArcGIS Engine [J], Computer Engineering, 006, 3(4): 57-59. (in Chinese) [9] SUN Dihua, WEN Cunfing. Research of map-matching technology for moving fleet. Computer Engineering and Applications, 0, 47(): 49-5. (in Chinese) [0] LAI Yunbo, SUN Dihua, LIAO Xiaoyong, SUN Huanshan. Algorithm of map-matching based on road buffer analysis [J]. Application Research of Computers, 0, 8(9): 33-334. (in Chinese) [] CHEN Fei, ZOU Tao, WANG Lun. Improved projection-based map matching algorithm. Computer Engineering and Applications, 0, 47(3): 4-44. (in Chinese) [] Gao Haihui, Jia Kebin, He Ji. On Algorithms of path matching and track palyback and their implementation [J]. Computer Applications and Software, 00, 7(4): 6-8, 9. (in Chinese) [3] LI Xiang, LIN Hui, GUO Zhong-yang, ZHANG Xi-hui. Reducing Vehicle Tracking Data Volume through a Network-based Approach [J]. ACTA GEODAETICA et CARTOGRAPHICA SINICA, 008, 37(): 95-0. (in Chinese) IV. CONCLUSION A vehicle monitoring system is developed based on ArcGIS Silverlight, which has a higher interactivity and user experience. The system is now running well, and each function is modularized with high maintenance. This system still exist some problems, such as there is a certain deviation in vehicle map matching, and internal data structures of the historical track playback function need to be improved, better algorithm should be used to improve its operating efficiency. A scheduling mechanism is also needed to allocate instance object within vehicle monitoring system. ACKNOWLEDGMENT The authors would also like to acknowledge the helpful comments and suggestions of the Internet of Things (IOT) application technology software group. Their efforts are greatly appreciated. REFERENCES [] Berg Insight, Fleet Management and Wireless MM-5th Edition, March 00. [] Qimin CHENG, Chongjun YANG, ZhenFeng SHAO. Design and implementation of WebGIS-based GPS vehicle monotoring system [J]. Geo-information Science, 004,7 ():96-00. (in Chinese) [3] Yong Wang, Dafang Zhuang, Runhe Shi. A WebGIS-based system model of vehicle monitoring central platform [J]. Proceeding of Geoscience and Remote Sensing Symposium, 005. IGARSS '05. Proceedings. 005 IEEE International, Volume:. [4] Zechun Huanga, Dingfa Huanga, Zhu Xua, et al. GPS Vehicle Positioning Monitoring System Integrated with CORS and Mobile GIS [J]. Procedia Environmental Sciences, 0, 0 (C): 498-504. [5] Cheng Yipei. Design and Development of Vehicle Monitoring and Management System Based on GPS/GIS/GPRS [D], Master degree thesis, 009, 4. (in Chinese) [6] Lei Yuhai, Wang Yu. Research and development of management information system software for auto distribution office [J]. Technology & Economy in Areas of Communications (TEAC), 004, 6(3): 53-54. (in Chinese) 836