Research on car navigation system terminal

introduction

This article refers to the address: http://

Faced with the huge automobile market and the construction and improvement of the highway network in various provinces and cities across the country, the requirements for traffic management informationization are getting higher and higher. The potential of GPS in-vehicle systems is immeasurable, and its development prospects are optimistic. Japanese and Western companies are involved in this high-tech competition. Many manufacturers in various developed countries have accelerated the pace of research on car navigation systems. With the development of embedded technology, many bottlenecks with insufficient resources have been largely solved. The vehicle positioning system consists of three parts: the vehicle positioning terminal, the wireless communication link and the vehicle monitoring management system. Its main function is to transmit the information useful to the user such as the dynamic position (longitude and latitude), time and altitude of the moving target to the monitoring center through the wireless communication link, and then display the moving track of the moving target on the electronic map. The parameters such as the exact position, speed, direction of motion and vehicle status of the vehicle are monitored and inquired, which provides a visual basis for dispatch management, improves vehicle operating efficiency, and can also play a role in energy saving and emission reduction. It also plays a role in protecting the earth to a certain extent. In this paper, the gps positioning technology is applied to the air vehicle, and the existing positioning technology is combined to complete the positioning monitoring task, which will greatly improve the positioning accuracy and safety, and at the same time reduce the capital investment and have a broad development space.

Overall system design

Structural design of system hardware

The vehicle monitoring system consists of three parts: the vehicle end (including arm industrial computer, touch screen, gps receiving module and power supply), communication system (gprs) and monitoring center. The gps module on the vehicle side receives the position, time and other data of the global positioning satellite in real time, and sends it to the arm mini industrial computer in the vehicle to obtain the current position of the vehicle and display it on the electronic map: on the other hand, the data will pass the gprs terminal module. Sending to the remote monitoring center server enables the monitoring center to obtain the location information of all vehicles in real time, providing a basis for vehicle safety monitoring and remote exposure. The spi interface is connected to the can bus, and the can bus is connected to the sensor to detect the main technical parameters of the car. The can bus module can connect the system with other vehicle modules, and complete the state information of the collected vehicle and further control. The can bus module mainly includes the controller and transceiver of the CAN bus. Here, the mcp2510 of Microchip and the pca82c250 of Philips are selected respectively. Among them, the CAN bus controller mcp2510 implements the CAN bus protocol, and the CAN bus transceiver pca82c250 provides an interface between the protocol controller and the physical transmission line. Since the can bus controller mcp2510 has a spi interface, it is connected to the spi0 of the s3c2440 in the system. The fault detection module mainly detects the main technical parameters of the car and displays it on the lcd display. If a fault is detected, an alarm signal is issued. The main technical parameters tested in this paper include fuel consumption, braking force, steering force, engine temperature, coolant temperature, headlamps, and interior noise and exhaust. The module mainly converts various signals into electrical signals through various sensors, and then uses the signal processing circuit to perform corresponding processing on the electrical signals, so that it can perform data transmission with the can bus module. The block diagram of the hardware of the vehicle end is shown in Figure 1.

4.jpg

Figure 1 Block diagram of the hardware components of the vehicle

Application structure

The overall flow chart of the application is shown in Figure 2. Since the gprs module and the gps module are connected through the serial port and the monitoring terminal, the initialization of the program system is to initialize the serial port, so that the serial port works according to the requirements of the gprs and gps modules. The shared memory is then created in preparation for communication between the gprs communication subprocess and the gps subprocess. The gps subprocess is responsible for receiving gps information from the serial port and writing this information into the shared memory. The gprs subprocess sends the gps information in the shared memory to the remote monitoring server through the network.

3.jpg

Gps driver preparation

In order for the application on arm to be able to process the navigation signals received by gps, the driver for gps is written.

This gps driver is also a character driver. First, understand the relationship between applications, libraries, kernels, and drivers in embedded development: the application calls the application library function to complete the function; the application accesses various resources in the form of files; Part of the program library directly completes the function. Some functions are completed by the kernel through system calls. The kernel processes the system call, calls the device driver, and the device driver directly communicates with the hardware. As shown in Figure 3

2.jpg

Generally, there are three types of device drivers for linux, character devices, block devices, and network devices. The driver for the gps module I am going to talk about is a character device. When a read/write request is issued by a character device, the actual hardware i/o operation generally occurs immediately. In device management, in addition to the device type, the kernel requires a pair of parameters called the master-slave device number to uniquely identify a device. Devices with the same major device number use the same driver, and slave device numbers are used to distinguish instances of specific devices. Use the command cat/proc/devices to view the major device numbers of all devices in the system. So at the beginning of the gps driver, define the device name #define device_name "s3c2440-gps" and then define the main device number. I let the system automatically assign it, in case the main device number is already occupied, static int gps_major=0; the driver A module initialization function as an entry, such as module_init (s3c2440_gps_init) declare the initialization function of the current module to the kernel; then write the initialization function of gps: static int __init s3c2440_gps_init (void) function, register a device in this function, return the main device number, Can be written as: gps_major=register_chrdev (0, device _name, & s3c2440_gps_fops), s3c2440_gps_fops is a defined structure that specifies the interface that the driver provides to the application. Such as: static struct file_operations s3c2440_gps _fops = {.owner= this_module,.

Open= s3c2440_gps_open,.release= s3c2440_gps_release=s3c2440_gps_release, .ioctl=s3c2440_gps_ioctl}; continue writing down, gps_class=class_create(this_module,device_name); create the class for this device in the /sysfs directory. Then register the class of this device, such as device_create(gps_class,null,mkdev(gps_major,0), null, device_name).

Gps application is the implementation of positioning function

To achieve gps positioning, you must first parse the gps packet. After gps is powered on, it will return a certain format of data at a certain time. The data format is $information type, and the characters at the beginning of each line are $, then Is the information type, followed by the data, separated by commas, the complete data types are as follows: $gprmc,080655.00, a,4546.40891, n,12639.65641,e,1.045,328.42,170809,,,a*60 information type: gpgsv : visible satellite information, gpgll: geolocation information, gprmc: recommended minimum positioning information, gpvtg: ground speed information, gpgga: gps positioning information, gpgsa: current satellite information, here I only parse gprmc and gpgga information. A detailed description of gprmc data: $gprmc, "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", " 11", "12" *hh "1" utc time, hhmmss (hours and seconds) format "2" positioning status, a = effective positioning, v = invalid positioning "3" latitude ddmm.mmmm (degrees) format (front 0 will also be transmitted) "4" latitude hemisphere n (north hemisphere) or s (southern hemisphere) "5" longitude dddmm.mmmm (degrees) format (the previous 0 will also be transmitted) "6" longitude hemisphere e (east longitude) Or w (western)...

Instant Water Purifier

Homehold Instant Water Purifier,Water Purifier For Home,Large Faux Water Purifier,Healthy Water Purifier

JOYOUNG COMPANY LIMITED , https://www.globaljoyoung.com

Posted on