GPS-based accurate time service method and electronic equipment

文档序号:660822 发布日期:2021-04-27 浏览:7次 中文

阅读说明:本技术 一种基于gps的精确授时方法及电子设备 (GPS-based accurate time service method and electronic equipment ) 是由 胡军 于 2020-12-30 设计创作,主要内容包括:本发明涉及GPS技术领域,具体涉及一种基于GPS的精确授时方法及电子设备,本发明利用串口接收中断接收GPS模块按照秒单位发送的UTC时钟信号;结合PPS信号进行误差补偿操作,并于解析处理器配置PPS信号输入通道;采用上升沿中断进行系统触发,并在PPS触发中断中第一时间对毫秒数据进行清零;对上一次获取的GPS发送的报文信息解析出来的秒时钟加一秒;通过解码卫星信号输出准确的同步时标PPS接收机及NMEA-0813协议报文。本发明结合GPS发送的UTC时间进行技术手段,从而控制误差只有ns级别的授时时间信息,满足授时精度要求较高的应用场合。(The invention relates to the technical field of GPS, in particular to a precise time service method based on GPS and an electronic device, wherein the invention uses a serial port to receive and interrupt UTC clock signals sent by a GPS module according to second units; combining the PPS signal to carry out error compensation operation, and configuring a PPS signal input channel in the analysis processor; performing system triggering by adopting rising edge interruption, and resetting millisecond data at the first time in PPS triggering interruption; adding one second to a second clock analyzed from the message information sent by the last acquired GPS; and outputting an accurate synchronization time scale PPS receiver and a NMEA-0813 protocol message by decoding the satellite signal. The invention combines UTC time transmitted by GPS to carry out technical means, thereby controlling the error to be only ns-level time service time information and meeting the application occasion with higher time service precision requirement.)

1. An accurate time service method based on GPS is characterized by comprising the following steps:

s1, receiving and interrupting UTC clock signals sent by the GPS module according to the second unit by using a serial port;

s2, combining PPS signal to carry out error compensation operation, and configuring PPS signal input channel in the analysis processor;

s3, performing system triggering by adopting rising edge interruption, and clearing millisecond data at the first time in PPS triggering interruption;

s4, adding one second to the second clock analyzed from the message information sent by the last acquired GPS;

s5 outputs accurate synchronous time scale PPS receiver and NMEA-0813 protocol message through decoding satellite signal.

2. The GPS-based accurate time service method according to claim 1, wherein the method transforms, amplifies and processes the received GPS signal, interprets a navigation message sent by a GPS satellite, and calculates the three-dimensional position, the three-dimensional velocity and the time information of the survey station in real time.

3. The GPS-based precision time service method according to claim 1, wherein the NMEA-0813 protocol packet contains UTC time and location signals.

4. The accurate time service method based on GPS according to claim 1, wherein, in the method, the message of NMEA-0813 protocol outputs the time service information after generating high level PPS signal and keeping fixed time length.

5. The GPS-based accurate time service method according to claim 4, wherein in the method, in the application occasions with higher time service precision requirements, PPS signals or other auxiliary means are combined to realize accurate time service, and real-time monitoring and error compensation of GPS clocks are realized.

6. An electronic device based on GPS for accurate time service comprises a GPS receiving module, a serial port receiving interrupt, an external PPS input interrupt, a microprocessor unit and a memory for storing an execution instruction, wherein when the microprocessor unit executes the execution instruction stored in the memory, the microprocessor unit executes the GPS-based accurate time service method according to any one of claims 1 to 5.

7. The GPS-based electronic device with accurate time service according to claim 6, wherein the GPS receiving module is connected with the microprocessor unit through the serial port receiving interrupt and an external PPS input interrupt.

8. The GPS-based electronic device with accurate time service according to claim 6, wherein the GPS receiving module acquires C/A code information, captures the signals of the selected satellites to be tested according to a certain altitude cut-off angle, tracks the operation of the satellites, and transforms, amplifies and processes the received GPS signals.

Technical Field

The invention relates to the technical field of GPS, in particular to a GPS-based accurate time service method and electronic equipment.

Background

With the rapid development of the current world science and technology, higher and higher requirements are provided for time service accuracy in different industries and different fields, and the time service system relates to various industries in life, such as vehicle navigation, electric power systems, ship transportation, high-altitude communication and the like. The GPS time service is different from the network time service, the GPS is a new generation of American satellite navigation system, can continuously provide high-precision position, speed and time information for users in real time all day long, and comprises three parts of space, ground control and user equipment.

The space part, i.e. the satellite constellation, transmits three pseudo-random codes per second via two bands L1, L2: c/a code (coarse code), P code (fine code) and Y code (encrypted P code). The C/A code has the primary positioning precision of 25m, the multiple positioning precision of 8m and the timing precision of 100ns, can be used in a gratuitous way all over the world, the P code has the primary positioning precision of 10m, the multiple positioning precision can reach centimeter level, and the timing precision of 10ns can only be used by military and authorized civil departments of America and Union countries.

The module mainly captures signals of satellites to be detected selected according to a certain height cut-off angle, tracks the operation of the satellites, and converts, amplifies and processes the received GPS signals so as to measure the propagation time of the GPS signals from the satellites to an antenna of the receiving module, interprets a navigation message sent by the GPS satellites and calculates the three-dimensional position, three-dimensional speed and time information of the measuring station in real time.

The GPS receiving module outputs an accurate synchronous time scale PPS receiver and an NMEA-0813 protocol message by decoding satellite signals, the message contains UTC time, position and other signals, along with the higher integration level and the lower price of the GPS receiving module, the GPS receiving module only analyzes the output NMA-0813 protocol message to obtain UTC time by adopting an application occasion with low precision requirement, and the time error of the scheme is hundreds of milliseconds.

Disclosure of Invention

Aiming at the defects of the prior art, the invention discloses a GPS-based accurate time service method and electronic equipment, and aims to mainly adopt a method for improving time service to reach ns level on the basis of GPS time service and carry out technical means by combining UTC time sent by a GPS, so that the control error is only ns-level time service time information, and the application occasion with higher time service accuracy requirement is met.

The invention is realized by the following technical scheme:

in a first aspect, the invention discloses a precise time service method based on a GPS, which comprises the following steps:

s1, receiving and interrupting UTC clock signals sent by the GPS module according to the second unit by using a serial port;

s2, combining PPS signal to carry out error compensation operation, and configuring PPS signal input channel in the analysis processor;

s3, performing system triggering by adopting rising edge interruption, and clearing millisecond data at the first time in PPS triggering interruption;

s4, adding one second to the second clock analyzed from the message information sent by the last acquired GPS;

s5 outputs accurate synchronous time scale PPS receiver and NMEA-0813 protocol message through decoding satellite signal.

Furthermore, the method transforms, amplifies and processes the received GPS signal, interprets the navigation message sent by the GPS satellite, and calculates the three-dimensional position, three-dimensional speed and time information of the survey station in real time.

Furthermore, the NMEA-0813 protocol message contains UTC time and location signals.

Furthermore, in the method, the NMEA-0813 protocol message outputs the time service information after generating the high level PPS signal and keeping the high level PPS signal for a fixed time length.

Furthermore, in the method, in an application occasion with a higher time service precision requirement, the PPS signal or other auxiliary means is combined to realize precise time service, and the real-time monitoring and the error compensation of the GPS clock are realized.

In a second aspect, the invention discloses an electronic device for accurate time service based on a GPS, which comprises a GPS receiving module, a serial port receiving interrupt, an external PPS input interrupt, a microprocessor unit, and a memory storing an execution instruction, wherein when the microprocessor unit executes the execution instruction stored in the memory, the microprocessor unit executes the accurate time service method based on the GPS of the first aspect.

Furthermore, the GPS receiving module is connected with the microprocessor unit through the serial port receiving interrupt and the external PPS input interrupt.

Furthermore, the GPS receiving module acquires C/A code information, captures signals of the satellites to be detected selected according to a certain altitude cut-off angle, tracks the operation of the satellites, and converts, amplifies and processes the received GPS signals.

The invention has the beneficial effects that:

the invention combines UTC time transmitted by GPS to carry out technical means, thereby controlling the error to be only ns-level time service time information and meeting the application occasion with higher time service precision requirement.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.

FIG. 1 is a schematic step diagram of a GPS-based accurate time service method;

FIG. 2 is a schematic circuit diagram of an electronic device for accurate GPS-based time service;

FIG. 3 is a diagram of the implementation result of a GPS-based accurate time service method.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Example 1

The embodiment discloses an accurate time service method based on a GPS (global positioning system) as shown in FIG. 1, which comprises the following steps:

s1, receiving and interrupting UTC clock signals sent by the GPS module according to the second unit by using a serial port;

s2, combining PPS signal to carry out error compensation operation, and configuring PPS signal input channel in the analysis processor;

s3, performing system triggering by adopting rising edge interruption, and clearing millisecond data at the first time in PPS triggering interruption;

s4, adding one second to the second clock analyzed from the message information sent by the last acquired GPS;

s5 outputs accurate synchronous time scale PPS receiver and NMEA-0813 protocol message through decoding satellite signal.

In this embodiment, the received GPS signal is converted, amplified, and processed to interpret a navigation message sent by a GPS satellite, and the three-dimensional position, the three-dimensional velocity, and the time information of the survey station are calculated in real time.

In this embodiment, the NMEA-0813 protocol packet includes a UTC time signal and a location signal. The NMEA-0813 protocol message generates a high-level PPS signal and outputs time service information after keeping fixed time duration.

In this embodiment, in an application scenario where the requirement for time service accuracy is high, PPS signals or other auxiliary means are combined to realize accurate time service, and real-time monitoring and error compensation of a GPS clock are performed.

Example 2

The module mainly captures signals of satellites to be detected selected according to a certain altitude cut-off angle, tracks the operation of the satellites, and converts, amplifies and processes the received GPS signals so as to measure the propagation time of the GPS signals from the satellites to the receiving module antenna, interpret navigation messages sent by the GPS satellites and calculate the three-dimensional position, three-dimensional speed and time information of the station in real time.

The GPS receiving module outputs an accurate synchronous time scale PPS receiver and an NMEA-0813 protocol message by decoding satellite signals, the message contains UTC time, position and other signals, along with the higher integration level and the lower price of the GPS receiving module, the GPS receiving module only analyzes the output NMA-0813 protocol message to obtain UTC time by adopting an application occasion with low precision requirement, and the time error of the scheme is hundreds of milliseconds.

The acquired PPS signal precision can reach nanosecond level by combining NMEA-0813 protocol message information, the NMEA-0813 protocol message is time service information which is output after a high-level PPS signal is generated and the time duration is kept for 100ms, and in an application occasion with high time service precision requirement, the PPS signal or other auxiliary means can be combined to realize precise time service and real-time monitoring and error compensation of a GPS clock.

In practical application, a serial port interruption mode is adopted to receive UTC clock signals sent by a GPS module according to a second unit, time errors analyzed by received clock information are hundreds of milliseconds, error compensation operation needs to be additionally combined with PPS signals in the system, an analysis processor needs to be additionally provided with a path of PPS signal input channel on the basis of serial port interruption, system triggering is carried out by adopting a rising edge interruption mode, millisecond data is cleared at the first time in PPS triggering interruption, meanwhile, a second clock analyzed by the last acquired message information sent by the GPS is added by one, the consistency of the comparison height of the clock inside the MCU and the GPS clock can be ensured, and as shown in figure 3, the errors are within a nanosecond level.

Example 3

The embodiment discloses an electronic device based on a precise time service of a GPS as shown in fig. 2, which includes a GPS receiving module, a serial port receiving interrupt, an external PPS input interrupt, a microprocessor unit, and a memory storing an execution instruction, wherein when the microprocessor unit executes the execution instruction stored in the memory, the microprocessor unit executes a precise time service method based on the GPS.

The GPS receiving module of this embodiment is connected to the microprocessor unit through the serial port receiving interrupt and the external PPS input interrupt. The GPS receiving module acquires C/A code information, captures signals of satellites to be detected selected according to a certain height cut-off angle, tracks the operation of the satellites, and converts, amplifies and processes the received GPS signals.

In conclusion, the invention adopts a method for improving time service to reach ns level based on GPS time service and combines UTC time sent by GPS to carry out technical means, thereby controlling the error to only have ns level time service time information and meeting the application occasion with higher time service precision requirement.

The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:结合超快速星历短时间内预报卫星钟差的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类