In order to timely get the running status of modern streetcars and to transmit data in a more stable and reliable way,we designed a positioning system for modern streetcars,it is based on transmission control protocol (TCP)socket and hypertext transfer protocol (HTTP) POST requests protocol.It uses dual-mode positioning module of BeiDou Navigation Satellite System (BDS)/Global Positioning System (GPS)to retrieve vehicles coordinates data,its centre platform receives data in the way of mainly using TCP protocol-based Socket communication server software but having HTTP POST request together with Hypertext Preprocessor (PHP)page as the supplement,its data is stored in MySQL database.The streetcars running status is displayed on Baidu map and TCP server software.Finally the system is capable of receiving,storing and displaying the operation data of streetcar in real time,and can automatically switch to HTTP Post request model to send data when the software at TCP server is down.Test result indicates that the system has high positioning precision,is stable and reliable in sending and receiving data as well as in operation,it is an optional positioning way for modern streetcar.%为实现实时获取现代有轨电车车辆的运行状态以及更稳定可靠的传输数据,设计一个基于 TCP Socket 和 HTTP 的 POST请求的现代有轨电车定位系统。使用 BDS /GPS 双模定位模块获取车辆的坐标等数据,中心平台以基于 TCP 协议的 Socket 通信服务器端软件为主、HTTP 的 POST 请求配合 PHP 页面为辅的方式接收数据,用 MySQL 数据库存储数据,在 TCP 服务器端软件和百度地图上显示列车的运行状态。该系统能够实时获取、存储并显示列车的运行数据,在 TCP 服务器端软件出故障时能自动切换到 HTTP的 POST 请求方式发送数据。测试结果表明,该系统定位精度高,收发数据及运行稳定可靠,可作为现代有轨电车的一种可选择的定位方式。
展开▼