GPS Information Processing System Based on Single Chip Microcomputer

Source: Internet
Author: User
GPS Information Processing System Based on Single Chip Microcomputer

Global Positioning
System, GPS) is a non-autonomous navigation and positioning System developed by the United States in 1970s and fully established in 1994 based on satellite signals

With the ability to provide high-precision 3D location, 3D speed and time information around the world, around the clock, and in real time, he has effectively solved the problems of human navigation and positioning.
With the continuous improvement of positioning systems around the world and the continuous improvement of software and hardware, the application field is not
It has been widely used and developed in both military and civil fields.
Real
In applications, after receiving signals from the orbital satellite, the GPS receiver is demodulated to output GPS positioning data in a standard format. The data must be further processed before it can be displayed on the user data terminal.
Figure 1 shows the hardware structure of GPS Information Processing Based on Single Chip Microcomputer.

1. GPS receiver output data format

NMEA-0183 is a universal interface standard developed by the National Oceanic Electronics Association for asynchronous communication of marine instrument data. It is a string consisting of ASCII characters.
GPS receiver outputs GPS positioning data in NMEA-0183 standard format,
The data terminal device needs to obtain the location information and time information from the NMEA0183 data stream output by GPS in real time.
The GPS receiver provides multiple statement formats, including
GPGGA, GPGSA, GPGSV, uplmc, GPZDA, and GPGLL
You can select one or more statements as needed.
The system selects to receive and parse GPGLL and GPZDA to obtain geographical confidence
And UTC time (including date). The UTC time gets the local time information through the time difference correction.

The NMEA0183 statement contains multiple data items separated by commas. The statement ends with the carriage return (CR) and line feed (LF) characters.

 The format of the GPZDA statement is as follows:

 In the preceding statement, the meaning of each data item is as follows:


① Statement type: $ GPZDA; ② UTC time: 14523.62; ③ UTC day: 01 ~ 31; ④ UTC month: 01 ~ 12; ⑤ UTC: 2001 a year; ⑥ local time difference: 10
7. Local Time Difference: 34 points; average checksum: 6E
The Checksum package
Including $ Operator

The format of the GPGLL statement is as follows:

In the preceding statement, the meaning of each data item is as follows:


① Statement type: $ GPGLL; ② latitude value; ③ north latitude; ④ longitude value; ⑤ west longitude; ⑥ UTC time, in minutes and seconds from time to time. second second format; 7 Status, A = positioning, V = uncertain; token Verification
And: 2C
The Checksum includes the $ operator.

The UART that receives the above GPS information is completed by the single-chip microcomputer AT89C51.
GPGLL is 55 characters and GPZDA is 38 characters
Considering the limited number of RAM units in the single-chip microcomputer, to adapt to the simultaneous output of GPS data
Because of the large amount of data, it is necessary to selectively receive sentence patterns.

2 Main Program Design

The main program mainly includes the following parts: initialization, receiving GPS data, GPS information processing, timeout processing judgment, etc.
GPS data is received in interrupt mode, and data processing is completed by an independent subroutine, mainly including
Extraction of time and location information
After the data is received and processed, it is transmitted to the LCD
Display
The time-out interval setting matches the GPS data update speed.
Yes. Its purpose is to ensure that the location and time information provided by GPS are synchronized with the user's visual information.

The main program flowchart 2 shows

GPS receivers generally adopt the RS 232C/RS 485/422 standard: the transmission rate can be set, there are 4 800 B/s, etc., data bit: 8
B. Stop position: 1 B

For single-chip microcomputer, select timer 1 as the baud rate generator, the baud rate depends on the overflow Rate
The formula for calculating the baud rate is as follows:

If the system clock speed is 11.059 2 MHz, for a baud rate of 4 800 B/s, the reload value of timer 1 is FAH.

3. Data Processing subroutine Design

The content stored in the receiving buffer is an ASCII code (character). Therefore, it must be converted when it is processed into data.

For time data, it is processed into the compressed BCD format, for example, for the following GPZDA information:

$ GPZDA, 114523,18, 11,2006, 10, 34 * 6E <CR> <LF>

After processing, the following information is obtained: 11 H (hour), 45 H (minute), 23 H (second), 18 H (day), 11 H (month), 20
H (century)-06 H (AGE), 10 H (Time Difference)

GPS Data Processing subroutine first converts the received time data to the above BCD data
After obtaining the UTC time and local time difference based on GPZDA, you can change it to local time.
Output
Time correction should take into account the carry and borrow Problems
During the program design process, the leap year, the large month, and the small month must be handled separately.

The GPS Information Processing flowchart with time difference correction is shown in figure 3.
In the figure, Hour indicates UTC, Min indicates UTC, and Sec indicates
UTC second, Day indicates UTC Day, Mon indicates UTC month, YearH indicates UTC century, and YearL indicates UTC time; D_Hour and D_Min indicate time difference and minute


Common GPS receivers output NMEA0183 data in V2.1, V2.0, and V1.5 versions. The time difference between V2.1 and V2.0 is fixed to minutes, while that between V2.0 and V1.5 is only hours.
To meet the general application requirements, the actual information is parsed Based on V2.1.
For V2.0 and V1.5, you only need to set D_min in the above program to 0.

4 Conclusion


The GPS information processing system solves the problems of standard GPS data interpretation, information extraction, conversion and display.
In addition, he has the time difference correction function for users around the world to use.
Taking the single-chip microcomputer as the control core, LCD and keyboard as the human-machine interface
To meet users' general needs at a low cost.
Currently, the system has
Successful application in Marine Navigation System

 

 

 

Original: Huang Ling (Nanjing information Vocational and Technical College, Nanjing 210046, China)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.