Design of Data Terminal Interface of GPS Receiver Based on MSComm Control

1 Introduction

This article refers to the address: http://

The Global Positioning System (GPS) is a space satellite navigation and positioning system jointly developed by the US Army, Navy and Air Force in the 1970s. Its purpose is to provide the US military with real-time accurate positioning, navigation and timing services. The GPS system is usually composed of 3 departments. Composition: Space part: including 24 GPS satellites; ground control part: monitoring of GPS satellites; user part: receiving information from GPS satellites, etc., usually including GPS devices such as antennas and receivers, when positioning To determine the location of the user (including the three coordinates x, y, z), but also to consider the error t between the satellite clock and the receiver clock, to solve the four unknowns must establish four equations, usually By measuring the pseudorange between the satellite and the user, the corresponding equation is established, so it is necessary to observe 4 satellites at the same time in order to achieve precise positioning. With the development of the times, the GPS system is no longer confined to the US military and has been widely used. All aspects of social life, from geodetic mapping to vehicle navigation, can be found in view of the importance of satellite navigation technology in civil and military fields. Yi, China has also established the corresponding "Beidou navigation system", but currently the most widely used in China is the GPS system. This paper introduces the transmission and extraction method of positioning information between GPS receiver and PC for GPS system.

2 Format of positioning information

To realize the extraction and display of positioning information, we must first realize the transmission of positioning information, that is, the communication between the GPS receiver and the PC through the corresponding interface. The receiver introduced in this paper adopts the GPS receiving chip of SiRF Technology and receives it through the antenna. GPS satellite signals, and corresponding processing to generate positioning information, and then through the serial port (RS 232) output GPS communication protocol, this article uses the most widely used NMEA-0183 protocol in this agreement includes "$GPGGA", "$GPGSA ", "$GPGSV" and "$GPRMC" formats, this article uses the simplest form "$GPRMC" statement as an example to introduce the meaning of each data segment in the protocol. For example: $GPRMC, 161022. A, 3212.875, N, 11893.578, E, O. O, 11O. 4,140406,2.3,W,A*302

The data segments in this column are separated by commas, where:

$GPRMC is the frame header, which identifies the structure of the subsequent intraframe data; 161022 is the UTC standard time, the format is “hh/mm/ss”; A indicates that the data is valid, if V, the number of traceable satellites is less than 3; 3212.875 For latitude value, the format is "ddmm.mmmm"; N is the north latitude, if S is the south latitude; 11893.578 is the longitude value, the format is "dddmm.mmmm"; E is the east longitude, if W is the west longitude ;0.0 means speed; 110.4 means azimuth, from 000.0° to 359.9°; 140406 is UTC standard date, the format is “mm/dd/yy”; 2.3 means geomagnetic change, from 000 . O ° ~ 180.0 °; W represents the direction of geomagnetic change, including w or E;

Among these data, the main concern of this paper is geographic coordinates and time, namely latitude, longitude and UTC date and time.

3 transmission and extraction of positioning information

The transmission of positioning information, that is, the communication between the GPS receiver and the PC, usually uses the serial port to realize the MSComm control provided by VB in this paper to write the serial port program to achieve the purpose of communication. The MSComm control is widely used to realize serial communication, for him The introduction here will not repeat the specific serial communication in this article, you must set the relevant properties of the MSComm control. The settings that need to be changed based on the default settings include the following three parts:

(1) Considering that GPS serial communication uses fixed parameters, set the Settings property in the MSComm control to "4800, N, 8, 1", that is, the baud rate is 4 800 b/s, no parity. , the data bit is 8, the stop bit is 1

(2) According to the different receivers used, the inputMode property in the MSComm control needs to be set. In this paper, the "comInputMode Text" mode is used.

(3) Set the Commport attribute in the MSComm control to the corresponding serial port number according to the selected serial port. In this paper, it is "1".

The extraction of location information includes two parts:

(1) extracting information such as latitude and longitude from the "$GPRMC" data column;

(2) Display this information in the text box. This work can be programmed in the OnComm event in the MSComm control.

Some of the code is as follows:

First, assign the positioning information of the "$GPRMC" format in the cache to the string variable "GPRMC", and extract the required one from the variable "GPRMC" by the corresponding statement according to the format of "$GPRMC" introduced earlier. Information such as latitude, longitude, speed and time and date, and assigned to the corresponding variables, it is necessary to note that UTC time needs to be converted to Beijing time when extracting time information, and modulo operation is performed on 24 to ensure accurate time. The extracted positioning information is displayed in a pre-designed text box. Through these steps, the positioning information is extracted. The specific effect is shown in FIG. 2 .


4 Conclusion

This paper introduces a method of using GPS to realize GPS positioning information extraction. It has simple and practical features. This method can realize data communication between GPS receiver and PC, and can intuitively locate the required positioning information. The corresponding window is displayed

As the led lighting manufactueres and Wholesale Led Pixel Light company, we are not only offer Outdoor Led Lighting but also offer the Dj Light Controller, sd card controller, stand alone controller, Artnet Controller, Led Decoder , splitter and so on. In a word, if you have any led lighting project, welcome to choose our led lighting system. After all, our company iseeled have much more years experience in the led ligthing project field.  Welcome to contact me at any time .

Led Controller

Led Controller,Dvi Led Controller,Rgb Led Controller,Rgbw Led Controller

Shenzhen Iseeled Technology Co., Ltd. , http://www.iseeledlight.com