A method for data parsing and system timing for multi-mode satellite
By classifying the formats of multi-mode satellite data and designing redundancy measures, the problem of discontinuous multi-mode satellite data parsing and timing was solved, achieving efficient and low-cost multi-mode satellite data parsing and system timing.
Patent Information
- Application Number
- CN202210910252.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-07-29
AI Technical Summary
Existing satellite data parsing methods can only parse a single data format and cannot effectively handle multiple data formats from multi-mode satellites. Furthermore, when using civilian satellite boards, the unstable second pulse leads to discontinuous time synchronization, resulting in high hardware costs and ambiguous data storage classification, making it impossible to effectively distinguish data types.
By classifying and parsing multi-mode satellite data, redundancy measures are designed to ensure the continuity of time synchronization. Civil satellite boards are used for system time synchronization, including binary and ASCII format classification algorithms for data formats, and redundancy measures are constructed using periodic timers and single-shot timers.
It achieves clear classification and parsing of multi-mode satellite data, ensuring the continuity of system time synchronization, reducing hardware costs, and improving the classification clarity and parsing accuracy of data storage.
Smart Images

Figure CN117540261B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of satellite communication technology, and in particular to a method for data parsing and system timing for multi-mode satellites. Background Technology
[0002] In multi-device collaborative operations in satellite communication, on the one hand, regarding time accuracy, a time synchronization system can be used to calibrate the system time of each device, improving the quality of collaborative work. Generally, using UTC (Coordinated Universal Time) to provide a unified time reference and second pulses (a time reference signal, one per second, used to indicate the exact second, with nanosecond-level accuracy and no accumulated error) to provide the exact second time, accurate Universal Time can be obtained. On the other hand, regarding content, there is also the challenge of receiving multi-mode satellite data from satellite receivers, i.e., data from multiple satellites received by the satellite receiver, including but not limited to GPS (Global Positioning System) satellites, BDS (BeiDou Navigation Satellite System) satellites, GLONASS (Global Navigation Satellite System) satellites, and Galileo (Galileo Satellite Navigation System). Satellites (systems) have multiple data formats (a standard format defined by satellite data protocols, consisting of a message header, data body, and checksum; common satellite data formats include NMEA0183, Unicore, etc.).
[0003] In the actual implementation of engineering projects, the following two situations may occur simultaneously:
[0004] a) In large-scale collaborative operations, UTC time alone is far from sufficient. Other satellite data, such as latitude and longitude, GPS ephemeris parameters, and BDS ephemeris parameters, are often required. In this case, a multi-mode satellite board must be configured in the receiver to meet the requirements.
[0005] b) Satellite boards are divided into military boards and civilian boards. Since the stability of civilian boards is not as good as that of military boards, there may be instability of the second pulse. When the signal is poor, some civilian boards will frequently switch between satellite lock and satellite loss. From the moment of loss to relock, the second pulse is re-initialized, resulting in the second pulse frame loss.
[0006] For the second pulse, it is generally obtained through a serial port, and the rising edge of the second pulse signal is used to indicate the whole second of the UTC time. Since the second pulse signal is triggered by the timing board and the UTC time is transmitted by the antenna, the second pulse signal is several milliseconds earlier than the UTC time.
[0007] In existing technologies, there are generally two methods for system time synchronization:
[0008] (i) When a second pulse is received, timestamp A is recorded; when UTC time is received, timestamp B is recorded; and time synchronization is performed using the year, month, day, hour, minute, and second in UTC time plus (BA) milliseconds, such as... Figure 1 As shown;
[0009] (ii) Upon receiving UTC time, save the time data; upon receiving the second pulse, retrieve the saved UTC time, add 1 second, and perform time synchronization. Figure 2 As shown.
[0010] Besides considering the stability of the second pulse, receiving satellite data often presents the challenge of parsing data from multiple satellites. Existing technologies are only suitable for parsing data from satellite boards with a single data format and high stability (military satellite boards). However, when receiving data from multiple satellites with various formats, the data storage classification becomes ambiguous, making it difficult to effectively distinguish data types. At the same time, to reduce costs, sometimes less stable satellite boards (civilian satellite boards) are chosen. In the event of second pulse frame loss, existing technologies cannot guarantee the continuity of system time synchronization.
[0011] In summary, current methods for parsing satellite data have limitations, including the ability to parse only a single data format, the need to use military-grade satellite boards to ensure timing stability, high hardware (satellite board) costs, limited data format parsing capabilities, low accuracy in parsing multi-mode / multi-format satellite data when receiving data from multi-mode satellites, and unclear data storage classification, making it difficult to effectively distinguish data types. Summary of the Invention
[0012] Based on the above analysis, the present invention aims to provide a data parsing and system timing method for multi-mode satellites, in order to solve the problems existing in the current satellite data parsing methods, such as the limited range of data formats that can be parsed, the low accuracy of data content parsing for multi-mode / multi-format satellite data, unclear data storage classification, low efficiency in distinguishing data types, and high hardware (satellite board) costs.
[0013] The objective of this invention is mainly achieved through the following technical solutions:
[0014] This invention provides a method for data parsing and system timing for multi-mode satellites, comprising the following steps:
[0015] Obtain multi-mode satellite data containing $GPZDA data;
[0016] The multi-mode satellite data containing $GPZDA data is classified and parsed to obtain parsed satellite data containing $GPZDA data; based on the parsed satellite data containing $GPZDA data, the UTC time is obtained.
[0017] The system acquires the second pulse and performs system time synchronization based on the second pulse and UTC time, thereby completing the calibration of the system time of each device.
[0018] Based on further improvements to the above method, multi-mode satellite data containing $GPZDA data is obtained, including:
[0019] The antenna receives multi-mode satellite data containing $GPZDA data and transmits the multi-mode satellite data containing $GPZDA data to the satellite receiver.
[0020] Acquire the second pulse, including:
[0021] The system receives the second pulse via serial port and then sends the second pulse to the satellite receiver.
[0022] Based on further improvements to the above method, the multi-mode satellite data containing $GPZDA data undergoes data classification and parsing processing, including:
[0023] Classify the received multi-mode satellite data containing $GPZDA data;
[0024] After data classification, if the data is in binary format, it will be processed according to the binary format.
[0025] After data classification, if the data is in ASCII format, it will be processed according to the ASCII format.
[0026] After data classification, if the data is in other formats, it will be deleted as illegal data.
[0027] Based on further improvements to the above method, the received satellite data containing $GPZDA data is classified, including:
[0028] The current message is classified and processed, including: initially distinguishing the data type based on the characteristics of the first byte of the current message, and calculating the checksum; if the checksum is correct, the message is retained and one of the following data types is obtained: ASCII format data, binary format data, and other format data; if the checksum is incorrect, it indicates that the message is incorrect and the entire message is deleted.
[0029] After obtaining a complete message, the next message is classified and processed.
[0030] All messages in the received satellite data containing $GPZDA data are classified sequentially to obtain the classified satellite data containing $GPZDA data.
[0031] Further improvements to the above method include classifying received satellite data by: initially distinguishing data types based on the characteristics of the first byte of the current message, and calculating checksums, including:
[0032] First, determine whether the current message is in binary format; then, determine whether the current message is in ASCII format.
[0033] If the first byte of the current message conforms to the binary format, that is, the first byte of the current message is a synchronization byte, then it can be determined that the data is in binary format. Then, based on the message length information in the message header, the byte offset of the check code is determined, and the check code is calculated.
[0034] If the first byte of the current message conforms to the ASCII format, that is, the first byte of the current message is a preamble, then the entire data is subjected to a comprehensive ASCII format feature judgment, including first finding the position of "*", determining that there is no NMEA preamble between the first byte and "*", and that the length between "*" and the statement terminator "\r\n" is consistent with the length of the checksum, and then calculating the checksum.
[0035] Based on further improvements to the above method, after data classification, if the data is in binary format, it will be processed according to binary format data, including:
[0036] Obtain binary format data after initial data type differentiation;
[0037] The binary data is further classified based on the synchronization bytes; wherein the synchronization bytes include “0xAA 0x440xB5” and “0xAA 0x44 0x12”.
[0038] The binary data after secondary classification is parsed to obtain parsed binary format satellite data.
[0039] Based on further improvements to the above method, after data classification, if the data is in ASCII format, it will be processed according to ASCII format data, including:
[0040] Obtain ASCII format data after initial data type differentiation;
[0041] ASCII data is further classified based on its leading characters; the leading characters include "$" and "#".
[0042] The ASCII data after secondary classification is parsed to obtain the parsed ASCII format satellite data; among them, the UTC time is obtained by parsing the $GPZDA message in the ASCII data with the leading symbol "$".
[0043] Based on a further improvement to the above method, system time synchronization is performed based on the second pulse and UTC time, including:
[0044] Determine whether a second pulse signal has been received and take redundancy measures accordingly;
[0045] If a second pulse signal is received, the UTC time is incremented by seconds;
[0046] If the second pulse signal is not received, the redundancy measures will take effect to compensate for the lost second pulse frames.
[0047] Based on a further improvement of the above method, the redundancy measures include:
[0048] Construct periodic timer A, single-shot timer B, and single-shot timer C;
[0049] The periodic timer A is started as soon as the satellite receiver is powered on, and the periodic timer A triggers a timer A event every 1000 milliseconds;
[0050] Upon receiving a second pulse, the periodic timer A is immediately turned off, while the single-shot timer B and single-shot timer C are simultaneously started; wherein,
[0051] The single-time timer B starts timing when it receives the second pulse, and triggers the timer B event after n milliseconds; the value of n ranges from 50 to 150.
[0052] The single-time timer C starts timing as soon as it receives the second pulse, and triggers the timer C event after (1000+n) milliseconds.
[0053] Based on a further improvement of the above method, the timer A event is to synchronize the time of each device when no second pulse signal is received; the timer B event is to synchronize the system time of each device; and the timer C event is to synchronize the system time of each device and start the periodic timer A.
[0054] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0055] 1. This invention designs a data classification algorithm for ASCII and binary formats to clearly and effectively classify satellite data. It can classify and parse multi-mode satellite data and has strong versatility.
[0056] 2. This invention, by designing a system timing method for multi-mode satellites, can still ensure the continuity of system timing even when second pulse frame loss occurs when using civilian satellite boards, thus saving hardware costs.
[0057] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0058] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0059] Figure 1 A flowchart of the time synchronization process for the first system time synchronization method in the existing technology;
[0060] Figure 2 The flowchart shows the timing process of Method 2 in the existing system timing technology.
[0061] Figure 3 This is a flowchart illustrating the data parsing and system timing method for multi-mode satellites in this invention.
[0062] Figure 4 This is a flowchart illustrating the processing of multi-mode satellite data in this invention.
[0063] Figure 5 This is a flowchart of the data classification algorithm for ASCII and binary formats in this invention;
[0064] Figure 6 This is a flowchart of binary data processing in this invention;
[0065] Figure 7 This is a flowchart of the binary data parsing process in this invention;
[0066] Figure 8 This is a flowchart illustrating the processing of ASCII data in this invention.
[0067] Figure 9 This is a flowchart of the data parsing process for "$" in this invention;
[0068] Figure 10 This is a flowchart of the data parsing process for "#" in this invention;
[0069] Figure 11 This is a flowchart illustrating the time synchronization method of the system in this invention.
[0070] Figure 12 This is a flowchart of the UTC time maintenance process in this invention;
[0071] Figure 13 This is a flowchart of the redundancy measures in this invention;
[0072] Figure 14 This is a flowchart of the second pulse event in this invention. Detailed Implementation
[0073] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0074] Example 1
[0075] A specific embodiment of the present invention discloses a method for parsing multi-mode satellite data, the main process of which is as follows: Figure 3 As shown, it includes the following steps:
[0076] S1. Obtain multi-mode satellite data containing $GPZDA data.
[0077] S2. Perform data classification and parsing processing on the multi-mode satellite data containing $GPZDA data to obtain parsed satellite data containing $GPZDA data; obtain UTC time based on the parsed satellite data containing $GPZDA data.
[0078] S3. Obtain the second pulse, and based on the second pulse and UTC time, perform system time synchronization to complete the calibration of the system time of each device.
[0079] Example 2
[0080] Based on Example 1, step S1 can be further refined into the following steps:
[0081] S11. Receive multi-mode satellite data containing $GPZDA data via antenna.
[0082] S12. The multi-mode satellite data containing $GPZDA data is transmitted from the antenna to the satellite receiver.
[0083] Preferably, the main process of step S2 is as follows: Figure 4 As shown, step S2 can be further refined into the following steps:
[0084] S21. Classify the received multi-mode satellite data containing $GPZDA data.
[0085] For multi-mode satellite data parsing, the satellite data received by the receiver usually needs to be parsed and saved to the data buffer in a timely manner, ready for retrieval at any time. Although there are various satellite data formats, they are essentially distinguished into two types: ASCII format and binary format. See Table 1 for specific formats.
[0086] Table 1 Satellite Data Format
[0087]
[0088]
[0089] The ASCII format begins with a preamble and ends with "\r\n", using an asterisk ("*") to separate the data area from the checksum. The area before the asterisk is the data area, and the area after the asterisk is the checksum. See Table 2 for the ASCII codes of the characters mentioned above.
[0090] Table 2 ASCII Code Reference Table
[0091]
[0092] Analysis reveals that current technologies often classify data directly based on the first character of the satellite data. Table 2 shows that each character in the ASCII format corresponds to a character in the binary format. Therefore, when binary data contains characters like "0x24" and "0x23," which correspond to the ASCII prefixes "$" and "#," a small probability of misclassification and frame loss may occur.
[0093] It is worth noting that due to baud rate limitations, the data transmitted by the satellite receiver is not complete each time; a single message may require several transmissions, and the data formats may be mixed. Therefore, the received data may consist of concatenated headers and footers of two separate messages. After removing data from formats other than ASCII and binary, four scenarios emerge:
[0094] 1) ASCII message tail, ASCII message header
[0095] 2) ASCII message tail, binary message header
[0096] 3) Binary message tail, ASCII message header
[0097] 4) Binary message tail, binary message header
[0098] To address the above situation, a model is constructed for the classification of ASCII and binary data formats. The main algorithm flow is as follows: Figure 5 As shown.
[0099] The workflow is as follows:
[0100] Step 1: After parsing a message, check the next byte;
[0101] Step 2: Based on the characteristics of the first byte, initially distinguish the data types;
[0102] Step 3: After initially distinguishing the data types, further characteristic judgments are made on the corresponding data types;
[0103] Step 4: After feature identification, calculate the check code;
[0104] Step 5: If the verification code is correct, the corresponding message is parsed; if the verification code is incorrect, the message is incorrect and the entire message is deleted.
[0105] The received satellite data is classified, including:
[0106] The current message is classified and processed, including: initially distinguishing the data type based on the characteristics of the first byte of the current message, and calculating the checksum; if the checksum is correct, the message is retained and one of the following data types is obtained: ASCII format data, binary format data, and other format data; if the checksum is incorrect, it indicates that the message is incorrect and the entire message is deleted.
[0107] After obtaining a complete message, the next message is classified and processed.
[0108] All messages in the received satellite data are classified sequentially to obtain the classified satellite data containing ASCII format data.
[0109] Specifically, during the data classification process, after parsing a complete message, the process ends if there are no more bytes; otherwise, it checks the next byte. First, it checks if the current message is in binary format, then it checks if it is in ASCII format. Checking for ASCII format first might lead to false positives. This is because starting with "$" or "#" does not definitively indicate ASCII format, while starting with "0xAA" guarantees that the data is not in ASCII format.
[0110] If the first byte of the current message conforms to binary format, meaning it is a synchronization byte, then the data can be determined to be in binary format. Based on the message length information in the header, the byte offset of the checksum is determined, and the checksum is then calculated. A successful checksum verification proves the message is correct and can be effectively parsed; a failed checksum verification proves the message is erroneous, and the entire message is deleted.
[0111] If the first byte of the current message conforms to ASCII format (i.e., the first byte is a preamble), then the entire data is subjected to a comprehensive ASCII format feature check. This includes first locating the position of the asterisk (*), confirming that there is no NMEA preamble between the first byte and the asterisk, and ensuring that the length between the asterisk and the statement terminator "\r\n" matches the checksum length. Only then is the checksum calculated, confirming that the data is in ASCII format, and proceeding with verification. A successful check proves the message is correct and can be effectively parsed; a failed check proves the message is erroneous, and the entire message is deleted.
[0112] S22. After data classification, if the data is in binary format, then process it according to the binary format.
[0113] The main process for processing binary format data is as follows: Figure 6 As shown.
[0114] Binary format classification
[0115] The workflow is as follows:
[0116] Step 1: Receive binary format data;
[0117] Step 2: Perform secondary classification of binary data based on synchronization bytes;
[0118] Step 3: Perform classification and parsing on the binary data after secondary classification.
[0119] Specifically, after receiving binary format data, the satellite data is reclassified according to the synchronization bytes. The synchronization bytes are divided into "0xAA 0x44 0xB5" and "0xAA 0x44 0x12". If neither of the two synchronization bytes is compatible, the entire data is deleted as illegal data.
[0120] Based on the synchronization bytes, the data enters the corresponding data parsing stage. Both types of data are distinguished by "information ID" for satellite data parsing. After parsing, the data is placed in the corresponding buffer. The binary data parsing process is as follows: Figure 7 As shown.
[0121] S23. After data classification, if the data is in ASCII format, it is processed according to the ASCII format; among them, the UTC time is obtained by parsing the $GPZDA message.
[0122] The main process for processing ASCII format data is as follows: Figure 8 As shown.
[0123] The workflow is as follows:
[0124] Step 1: Receive ASCII format data;
[0125] Step 2: Perform secondary classification of ASCII data based on the leading character;
[0126] Step 3: Perform classification and parsing on the ASCII data after secondary classification.
[0127] Specifically, after receiving ASCII format data, the satellite data is reclassified according to the preamble. The preamble is either "$" or "#". If neither preamble is compatible, the entire data is deleted as invalid data.
[0128] If the leading character is "$", then the process enters the "$" data parsing stage. The data is categorized and parsed according to the message header, and after parsing, it is placed into the corresponding buffer. The "$" data parsing process is as follows: Figure 9 As shown; where the UTC time is obtained by parsing the $GPZDA message in the "$" data.
[0129] If the leading character is "#", then the "#" data parsing stage begins. The data is categorized and parsed according to the message header, and then placed into the appropriate buffer. The "#" data parsing process is as follows: Figure 10 As shown.
[0130] S24. After data classification, if the data is in another format, that is, it does not match either of the two formats, then the data is deleted as illegal data.
[0131] Preferably, step S3 can be further refined into the following steps:
[0132] S31. Receive the second pulse via serial port and send it to the satellite receiver. The second pulse is generated by the time synchronization board and is a time reference signal sent once per second. It is used to indicate the exact second in the system time synchronization, with an accuracy at the nanosecond level and no accumulated error.
[0133] S32. Perform system time synchronization based on the second pulse and UTC time.
[0134] To ensure the continuity of the time synchronization system even when the satellite board is a civilian-grade board, the existing technology is improved in the following ways: The UTC time is initially obtained by parsing $GPZDA, and then this UTC time is used as the basis for calculating the UTC time required for subsequent system time synchronization; a second pulse frame loss redundancy measure is created to ensure continuous time synchronization even after second pulse frame loss; the system time synchronization process is as follows: Figure 11 As shown; where,
[0135] By parsing $GPZDA, the UTC time is obtained for the first time. Then, based on this UTC time, the UTC time required for subsequent system time synchronization is calculated. There is a time difference between the time synchronization timing and the second pulse signal. The specific functions are as follows:
[0136] a) Since UTC time is continuous, once a valid UTC time is obtained, the real valid UTC time can be calculated even without using the $GPZDA message in the satellite data. Therefore, it is not necessary to parse the $GPZDA (UTC time) message again in subsequent system time synchronization.
[0137] b) The time difference can be used as a compensation time for lost frames of the second pulse.
[0138] Based on the system time synchronization process, UTC time is maintained.
[0139] In step S23, UTC time information is obtained by decoding the $GPZDA message. If the UTC time information remains continuous for 3 seconds, the UTC time is stored in the buffer and accumulated second by second using a second pulse or redundancy measures. The UTC time maintenance process is detailed below. Figure 12 .
[0140] The workflow is as follows:
[0141] Step 1: Determine if a second pulse signal has been received and take redundancy measures accordingly;
[0142] Step 2: If a second pulse signal is received, add seconds to the UTC time;
[0143] Step 3: If the second pulse signal is not received, the redundancy measures will be activated to compensate for the second pulse frame loss.
[0144] S33. If no second pulse signal is received (considering the instability of civilian boards, there may be second pulse frame drops), the redundancy measures will be activated, and the time difference will be used as a compensation time for second pulse frame drops to complete the calibration of the system time of each device, that is, to provide time synchronization for each device.
[0145] This method uses the time difference between the second pulse signal and the timing operation as the remedial time for the second pulse frame loss redundancy measure. The redundancy measure achieves redundancy protection by constructing a periodic timer A, a single-shot timer B, and a single-shot timer C, which operate alternately. The redundancy measure process is as follows: Figure 13 As shown.
[0146] The workflow is as follows:
[0147] Step 1: Start the cycle timer A;
[0148] Step 2: Receive the second pulse;
[0149] Step 3: Process the events in sequence.
[0150] Specifically, from the moment the satellite receiver is powered on, the periodic timer A is started. The periodic timer A triggers a timer A event every 1000 milliseconds, and provides time synchronization for each device when no second pulse signal is received.
[0151] Upon receiving a second pulse, the second pulse event is initiated immediately. The second pulse event flow is as follows: Figure 14 As shown.
[0152] The workflow is as follows:
[0153] Step 1: When the second pulse is received, immediately turn off the periodic timer A, and simultaneously start the single-shot timer B and the single-shot timer C.
[0154] Step 2: Handle Timer B event;
[0155] Step 3: Handle the timer C event.
[0156] Specifically, a single-shot timer B is started. Timer B begins timing upon receiving the second pulse and triggers the timer B event after n milliseconds. The value of n can be customized as needed, ranging from 50 to 150, but is generally set to 50. The timer B event is primarily used for system time synchronization between various devices.
[0157] Start a single-shot timer C. Timer C begins timing upon receiving the second pulse and triggers a timer event after (1000+n) milliseconds. The main operations of the timer C event are as follows:
[0158] a) Provide system time synchronization for each device;
[0159] b) Start the cycle timer A.
[0160] Depend on Figure 14 It is known that timer C will be restarted each time a second pulse event is triggered, meaning timer C will start counting again. Since the second pulse event triggers once every 1000 milliseconds when the second pulse is received normally, which is less than the triggering time of timer C, timer C will not trigger when the second pulse is received normally.
[0161] If the second pulse is lost, and no second pulse signal is received within (1000+n) milliseconds of the trigger time of the second pulse event, the second pulse will not be restarted. In this case, once the trigger time of the second pulse event is reached, the system will still provide time synchronization for each device and start the periodic timer A, which is consistent with the effect of the second pulse event of the second pulse event.
[0162] Compared with existing technologies, the parsing method for multi-mode satellite data provided in this solution, by designing a data classification algorithm for ASCII and binary formats, can clearly and effectively classify satellite data, and has strong versatility for classifying and parsing multi-mode satellite data. By parsing the satellite data to obtain UTC time, and combining it with the second pulse signal to provide time synchronization for the system, the continuity of system time synchronization is guaranteed without increasing hardware costs (using only civilian satellite boards), and various types of satellite data can be used clearly and effectively while improving system stability.
[0163] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for data parsing and system timing for multi-mode satellites, characterized in that, Includes the following steps: Obtain multi-mode satellite data containing $GPZDA data; The multi-mode satellite data containing $GPZDA data is classified and parsed to obtain parsed satellite data containing $GPZDA data; based on the parsed satellite data containing $GPZDA data, the UTC time is obtained. The system acquires second pulses and performs system time synchronization based on the second pulses and UTC time to complete the calibration of the system time of each device. This includes: determining whether a second pulse signal has been received and taking redundancy measures; if a second pulse signal has been received, the UTC time is incremented by seconds; if no second pulse signal has been received, the redundancy measures are activated to compensate for lost second pulse frames. The redundancy measures include: constructing a periodic timer A, a single-time timer B, and a single-time timer C; starting the periodic timer A immediately upon powering on the satellite receiver, with the periodic timer A triggering a timer A event every 1000 milliseconds; immediately shutting down the periodic timer A upon receiving a second pulse, and simultaneously starting the single-time timer B and the single-time timer C; wherein, the single-time timer B starts timing upon receiving the second pulse and triggers a timer B event after n milliseconds; the value of n ranges from 50 to 150; the single-time timer C starts timing upon receiving the second pulse and triggers a timer C event after 1000+n milliseconds.
2. The data parsing and system timing method for multi-mode satellites according to claim 1, characterized in that, Obtain multi-mode satellite data containing $GPZDA data, including: The antenna receives multi-mode satellite data containing $GPZDA data and transmits the multi-mode satellite data containing $GPZDA data to the satellite receiver. Acquire the second pulse, including: The system receives the second pulse via serial port and then sends the second pulse to the satellite receiver.
3. The method for data parsing and system timing of multi-mode satellites according to claim 2, characterized in that, The multi-mode satellite data containing $GPZDA data undergoes data classification and parsing processing, including: Classify the received multi-mode satellite data containing $GPZDA data; After data classification, if the data is in binary format, it will be processed according to the binary format. After data classification, if the data is in ASCII format, it will be processed according to the ASCII format. After data classification, if the data is in other formats, it will be deleted as illegal data.
4. The data parsing and system timing method for multi-mode satellites according to claim 3, characterized in that, The received multi-mode satellite data containing $GPZDA data is classified, including: The current message is classified and processed, including: initially distinguishing the data type based on the characteristics of the first byte of the current message, and calculating the checksum; if the checksum is correct, the message is retained and one of the following data types is obtained: ASCII format data, binary format data, and other format data; if the checksum is incorrect, it indicates that the message is incorrect and the entire message is deleted. After obtaining a complete message, the next message is classified and processed. All messages in the received multi-mode satellite data containing $GPZDA data are classified sequentially to obtain the classified multi-mode satellite data containing $GPZDA data.
5. The data parsing and system timing method for multi-mode satellites according to claim 4, characterized in that, Based on the characteristics of the first byte of the current message, the data type is initially distinguished, and the checksum is calculated, including: First, determine whether the current message is in binary format; then, determine whether the current message is in ASCII format. If the first byte of the current message conforms to the binary format, that is, the first byte of the current message is a synchronization byte, then it can be determined that the data is in binary format. Then, based on the message length information in the message header, the byte offset of the check code is determined, and the check code is calculated. If the first byte of the current message conforms to the ASCII format, that is, the first byte of the current message is a preamble, then the entire data is subjected to a comprehensive ASCII format feature judgment, including first finding " The position of "" determines the first byte and " There is no NMEA leading character between them, and " The length between " and the statement terminator "\r\n" is the same as the checksum length, and then the checksum is calculated.
6. The method for data parsing and system timing for multi-mode satellites according to claim 3, characterized in that, After data classification, if the data is in binary format, it will be processed according to binary format, including: Obtain binary format data after initial data type differentiation; The binary data is further classified based on the synchronization bytes; wherein the synchronization bytes include "0xAA 0x440xB5" and "0xAA 0x44 0x12"; The binary data after secondary classification is parsed to obtain parsed binary format satellite data.
7. The method for data parsing and system timing of multi-mode satellites according to claim 3, characterized in that, After data classification, if the data is in ASCII format, it will be processed according to ASCII format data, including: Obtain ASCII format data after initial data type differentiation; ASCII data is further classified based on its leading characters; the leading characters include "$" and "#". The ASCII data after secondary classification is parsed to obtain the parsed ASCII format satellite data; among them, the UTC time is obtained by parsing the $GPZDA message in the ASCII data with the leading symbol "$".
8. The method for data parsing and system timing of multi-mode satellites according to claim 1, characterized in that, The timer A event is to synchronize the time of each device when no second pulse signal is received; the timer B event is to synchronize the system time of each device; the timer C event is to synchronize the system time of each device and start the periodic timer A.
Citation Information
Patent Citations
Satellite time synchronization system
CN102882586A