A method for collecting GPS almanac

By acquiring and comparing the toa data of GPS satellites and determining and integrating the data channels, the problem of low GPS almanac collection speed and accuracy is solved, and the positioning accuracy and first positioning time of the receiver are improved.

CN115201868BActive Publication Date: 2024-11-08HUNAN IND POLYTECHNIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210676976.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-15
Publication Date
2024-11-08
Estimated Expiration
2042-06-15

AI Technical Summary

Technical Problem

The existing GPS almanac collection methods have problems such as long positioning time for the first time, slow data collection speed, low accuracy, and unstable data collection caused by single satellite data collection, which affects the positioning accuracy of the receiver.

Method used

By acquiring satellite data, determine whether it is the fourth or fifth subframe data, extracting toa data for comparison and update, determining the satellite data channel, integrating the marking channel for data collection, and ensuring that the latest almanac data is obtained.

Benefits of technology

It improves the speed and accuracy of the almanac data acquisition, reduces the first positioning time, and improves the positioning accuracy of the receiver.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115201868B_ABST
    Figure CN115201868B_ABST
Patent Text Reader

Abstract

The method for collecting GPS almanac disclosed in the present application includes the following steps: determining whether the acquired data is the fourth or fifth subframe data, and controlling the operation of the collection program according to the result; determining the validity of the word data in the acquired subframe data and whether it contains the toa data of the almanac; if the currently acquired word data is valid and contains toa data, extracting the toa data sent by each satellite and comparing it to determine whether the almanac data needs to be updated; according to the stored toa data, finding the satellite data channel that sends the same toa data and marking it; integrating the marked satellite data channels, receiving the data of the marked satellite data channels, until the entire subframe data is obtained; and then repeating the above steps to collect the data of all satellites and obtain the complete almanac data. This scheme can improve the rate and data accuracy of almanac data collection, ensure that the receiver obtains the latest almanac data, and improve the receiver's first positioning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of GPS almanac collection, and more specifically, to a method for collecting GPS almanac. Background Art

[0002] Nowadays, satellite positioning has been widely used in various fields, and the satellite positioning system has developed rapidly. Beidou Satellite Navigation System, referred to as BDS, is a global satellite navigation system independently developed by my country. It is also the third mature satellite navigation system after GPS and GLONASS. Beidou Satellite Navigation System, GPS of the United States, GLONASS of Russia, and GALILEO of the European Union are suppliers recognized by the United Nations Satellite Navigation Committee.

[0003] Attached Figure 2 The data structure of a frame of data is shown. Since GPS has 24 satellites, the almanac information contained in the GPS satellite is on the fourth and fifth subframes. One frame contains five subframes, and one subframe contains 10 words. The first two words are HOW and TLM information, so they are not collected. A total of 25 frames of data must be collected to collect the almanac data of all satellites. Therefore, the time required to collect all satellite almanac data = 0.6*10*5*25 = 750s = 12.5min. However, some problems are encountered during the data collection process, such as the first positioning time after booting is too long, that is, the TTFF is too large. In the development of technology, some problems have been partially solved, such as agps services can reduce the first positioning time. However, without the help of external resources, to reduce the first positioning time, we can only rely on the ephemeris and almanac data sent by the satellite. The validity period of the ephemeris data is too short, while the validity period of the almanac can be very long, generally up to seven days, so the collection of the receiver's almanac data will greatly affect the time of the first positioning. Therefore, it is crucial to increase the speed of almanac collection and ensure the accuracy of the data. The traditional almanac collection method generally only collects the almanac data of a single satellite and stores it in the receiver. Once the data of this satellite cannot be received, it will affect the collection of the satellite almanac data and greatly increase the time for collecting the almanac. At the same time, if only the almanac data of one satellite is collected, once the receiver decodes a bit incorrectly, it will affect the final calculation result and increase the probability of error in the almanac data, resulting in affecting the time and accuracy of the receiver's first positioning. In addition, the data collected using a single satellite may not be the latest almanac data.

[0004] Therefore, how to provide a GPS almanac collection method that can increase the rate of almanac data collection, ensure that the receiver obtains the latest almanac data, and improve the receiver positioning accuracy has become a technical problem that needs to be urgently solved by those skilled in the art. Summary of the invention

[0005] To solve the above technical problems, the present application provides a method for collecting GPS almanacs, which can improve the rate and accuracy of almanac data collection, ensure that the receiver obtains the latest almanac data, and improve the receiver's first positioning time and positioning accuracy.

[0006] The technical solutions provided by this application are as follows:

[0007] The present application provides a method for collecting a GPS almanac, comprising the following steps: S1, data acquisition: acquiring satellite data, then determining whether the acquired satellite data is the fourth subframe data or the fifth subframe data, and controlling the operation of the collection program according to the determination result; S2, data validity determination: determining the validity of the word data in the acquired subframe data and whether the word data contains the toa data of the almanac; S3, data extraction: if the currently acquired word data is valid and contains the toa data, extracting the toa data sent by all satellites, and comparing it with the currently stored toa data, and updating the toa data according to the comparison result: if the currently acquired word data is invalid or does not contain the toa data, then ending this step and returning to step S1 to acquire data; S4, determining the satellite data channel: according to the stored toa data, finding the satellite data channel that sends the same toa data, and marking the satellite data channel;

[0008] S5. Integrate data channels: Integrate the marked satellite data channels and receive data from the marked satellite data channels; then compare the data obtained from the channels and store the data according to the comparison results until the entire subframe data is obtained; S6. Obtain complete almanac data: then repeat the above steps to collect data from all satellites, update the frame count, and collect all 25 frames of data based on the frame count to obtain the complete almanac data.

[0009] Furthermore, in a preferred embodiment of the present invention, in step S1, controlling the operation of the collection program according to the judgment result includes:

[0010] If the satellite data is the fourth subframe or the fifth subframe data, it is proved that the collected data is almanac data, and the data collection procedure continues to enter the subsequent steps;

[0011] If the satellite data is not the fourth subframe or the fifth subframe data, the collection is terminated, and then the data acquisition is performed again.

[0012] Furthermore, in a preferred embodiment of the present invention, in step S2, the data validity determination further includes:

[0013] Determine whether the value of the currently acquired word data is the same as the word value collected last time: if the two are the same, the data is repeated and the duplicate data is removed; if the two are different, the data is retained.

[0014] Furthermore, in a preferred embodiment of the present invention, in step S4, the step of determining the satellite data channel specifically includes:

[0015] S401, check the data validity according to the acquired word data, and determine whether toa information is included according to the frame type, subframe number and the number of words currently received;

[0016] S402, extracting toa data and comparing it with the previously extracted toa data to ensure the correctness of the latest toa data, and then collecting and updating the toa data of all satellite data channels;

[0017] S403, counting each toa data collected from the satellite data channel and calculating the number of occurrences thereof;

[0018] S404: Determine the marked satellite data channel according to the statistical toa data size and the number of occurrences.

[0019] Further, in a preferred embodiment of the present invention, in step S404, the step of determining the marked satellite data channel according to the statistical toa data size and the number of occurrences is specifically:

[0020] Find the maximum value of the collected toa data and count its occurrence times. If the number of occurrences is greater than 2, it indicates that there are more than two satellite data channels that can be used to collect almanac data.

[0021] If the toa data with the largest data and a number of occurrences greater than 2 is not found, then find the second largest toa data with a number of occurrences greater than 2 from the collected toa data;

[0022] Then, the satellite data channel corresponding to the toa data found through the above steps is obtained, and it is determined to be the marked satellite data channel for information collection.

[0023] Furthermore, in a preferred embodiment of the present invention, in step S5, the step of integrating data channels specifically includes:

[0024] S501, after determining the validity of the collected word data, searching whether there is a data channel that sends the same toa, and determining the marked satellite data channel according to the search result;

[0025] S502, finding the same word data according to the marked satellite data channel;

[0026] S503, storing the acquired word data in the order of words, and updating the subframe data after collecting a subframe;

[0027] S504: Then check whether the data is collected for the first time, and store it in the receiver memory according to the check result.

[0028] Furthermore, in a preferred embodiment of the present invention, the step of determining the marked satellite data channel according to the search result specifically includes:

[0029] If there is a data channel that sends the same toa data, the data channel corresponding to the same toa data is marked as the marked satellite data channel;

[0030] If the data channel currently collects data of the fourth or fifth frame and the frame does not contain toa, then according to whether the second word in each subframe data collected is the same, find the corresponding identical data channel and determine the data channel as the marked satellite data channel.

[0031] Further, in a preferred embodiment of the present invention, in step S504, the step of storing the data in the receiver memory according to the inspection result includes:

[0032] If the inspection result is the first collection, the data is directly stored in the receiver memory;

[0033] If the check result is not the first collection, the toa data of the two are compared to determine that the currently collected almanac data is the latest, and then the data is updated to the receiver memory.

[0034] Furthermore, in a preferred embodiment of the present invention, in step S504, the step of storing the data in the receiver memory according to the inspection result further includes:

[0035] Before updating the almanac data, check whether the current almanac is in use: if the current almanac is in use, pause data updating and wait for the next update.

[0036] Furthermore, in a preferred embodiment of the present invention, in step S5, the data storage according to the comparison result is specifically:

[0037] Compare whether the data obtained from the marked satellite data channel are equal. If the word data sent by two satellites are the same, the data is deemed valid and stored until 8 word data in the entire subframe are collected and updated to the receiver memory.

[0038] Compared with the prior art, the present invention provides a GPS almanac collection method, which comprises the following steps: S1, data acquisition: acquiring satellite data, then judging whether the acquired satellite data is the fourth subframe or the fifth subframe data, and controlling the operation of the collection program according to the judgment result; S2, data validity judgment: judging the validity of the word data in the acquired subframe data and whether it contains the toa data of the almanac; S3, data extraction: if the currently acquired word data is valid and contains the toa data, then extracting the toa data sent by all satellites, and comparing it with the currently stored toa data, and updating the toa data according to the comparison result: if the currently acquired word data is valid, then extracting the toa data sent by all satellites, and comparing it with the currently stored toa data, and updating the toa data according to the comparison result; if the currently acquired word data is valid, then extracting the toa data sent by all satellites, and comparing it with the currently stored toa data, and updating the toa data according to the comparison result; if the currently acquired word data is valid, then extracting the toa data sent by all satellites, and comparing it with the currently stored toa data, and updating the toa data according to the comparison result; if the currently acquired word data is valid, then extracting the toa data sent by all satellites, and then comparing it with the currently stored toa data, and updating the toa data according to the comparison result; if the currently acquired word data is valid, then extracting the toa data sent by all satellites, and then controlling the operation of the collection program according to the judgment ... If the data is invalid or does not contain the toa data, then end this step and return to step S1 to acquire data; S4, determine the satellite data channel: according to the stored toa data, find the satellite data channel that sends the same toa data, and mark the satellite data channel; S5, integrate the data channel: integrate the marked satellite data channel, and receive the data of the marked satellite data channel; then compare the data obtained from the channel, store the data according to the comparison result, until the entire subframe data is obtained; S6, obtain complete almanac data: then repeat the above steps to collect data from all satellites, update the frame count, and collect all 25 frames of data based on the frame count to obtain the complete almanac data. In the GPS almanac collection method provided by the present application, almanac data is collected from multiple satellites; then, after verifying the validity of the collected data, the data sent in the data channel is judged to be the same based on whether the toa is the same, so as to determine the same satellite data channel and mark it, and the same data channel is jointly collected for almanac data to improve the data collection rate; and in the process of data collection, the almanac toa data of all data channels are compared to determine the latest almanac data, and then updated in the receiver memory to ensure the novelty of the almanac data. Compared with the prior art, the technical solution involved in the present invention can improve the rate and data accuracy of almanac data collection, ensure that the receiver obtains the latest almanac data, and improve the first positioning time and positioning accuracy of the receiver.

[0039] Beneficial effects:

[0040] 1. The GPS almanac collection method provided by this application can determine whether the data sent in the satellite data channel is the same based on whether the toa is the same, laying the foundation for channel combination;

[0041] 2. The GPS almanac collection method provided by this application can combine the same satellite data channels to collect almanac data, thereby improving the speed and accuracy of data collection;

[0042] 3. The GPS almanac collection method provided by the present application can determine whether the data sent in the data channel is the same according to whether the second word data in the subframe is the same, thereby determining the same data channel;

[0043] 4. The GPS almanac collection method provided by the present application can compare the almanac toa data of all channels, determine the latest almanac data, and then update it to the receiver. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 A flowchart of the steps of the method for collecting GPS almanacs provided by an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of a data structure of a frame of data provided by an embodiment of the present invention;

[0047] Figure 3 A framework flow chart of a method for collecting GPS almanacs provided in an embodiment of the present invention;

[0048] Figure 4 A flowchart of the steps of determining a satellite data channel provided by an embodiment of the present invention;

[0049] Figure 5 A framework flow chart of determining a satellite data channel provided by an embodiment of the present invention;

[0050] Figure 6 A flowchart of the steps of integrating data channels provided in an embodiment of the present invention;

[0051] Figure 7 A framework flow chart of the integrated data channel provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of this application.

[0053] It should be noted that when an element is referred to as being "fixed on" or "set on" another element, it can be directly on the other element or indirectly set on the other element; when an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.

[0054] It should be understood that the terms "length", "width", "up", "down", "front", "back", "first", "second", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0055] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.

[0056] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the effects and purposes that can be achieved by this application.

[0057] Please Figures 1 to 7As shown, the GPS almanac collection method provided by the embodiment of the present application includes the following steps: S1, data acquisition: acquiring satellite data, then judging whether the acquired satellite data is the fourth subframe or the fifth subframe data, and controlling the operation of the collection program according to the judgment result; S2, data validity judgment: judging the validity of the word data in the acquired subframe data and whether it contains the toa data of the almanac; S3, data extraction: if the currently acquired word data is valid and contains the toa data, then extracting the toa data sent by all satellites, and comparing it with the currently stored toa data, and updating the toa data according to the comparison result: if the currently acquired word data is invalid, then extracting the toa data sent by all satellites, and comparing it with the currently stored toa data, and updating the toa data according to the comparison result; if the currently acquired word data is invalid, then extracting the toa data sent by all satellites, and comparing it with the currently stored toa data, and updating the toa data according to the comparison result; if the currently acquired word data is invalid, then extracting the toa data sent by all satellites, and then ... If the toa data is invalid or does not contain the toa data, then end this step and return to step S1 to obtain data; S4, determine the satellite data channel: according to the stored toa data, find the satellite data channel that sends the same toa data, and mark the satellite data channel; S5, integrate the data channel: integrate the marked satellite data channel, and receive the data of the marked satellite data channel; then compare the data obtained from the channel, and store the data according to the comparison result until the entire subframe data is obtained; S6, obtain complete almanac data: then repeat the above steps to collect data from all satellites, update the frame count, and collect all 25 frames of data based on the frame count to obtain the complete almanac data. In the GPS almanac collection method provided by the present application, almanac data is collected from multiple satellites; then, after verifying the validity of the collected data, the data sent in the data channel is judged to be the same based on whether the toa is the same, so as to determine the same satellite data channel and mark it, and the same data channel is jointly collected for almanac data to improve the data collection rate; and in the process of data collection, the almanac toa data of all data channels are compared to determine the latest almanac data, and then updated in the receiver memory to ensure the novelty of the almanac data. Compared with the prior art, the technical solution involved in the present invention can improve the rate and data accuracy of almanac data collection, ensure that the receiver obtains the latest almanac data, and improve the first positioning time and positioning accuracy of the receiver.

[0058] The present invention provides a method for collecting GPS almanacs, which specifically comprises the following steps:

[0059] S1. Data acquisition: acquiring satellite data, and then determining whether the acquired satellite data is fourth subframe data or fifth subframe data, and controlling the operation of the collection program according to the determination result;

[0060] Specifically, in the embodiment of the present invention, in the step S1, controlling the operation of the collection program according to the judgment result includes: if the satellite data is the fourth subframe or the fifth subframe data, it is proved that the collected data is almanac data, then the data collection program continues and enters the subsequent steps;

[0061] If the satellite data is not the fourth subframe or the fifth subframe data, the collection is terminated, and then the data acquisition is performed again.

[0062] Among them, as attached Figure 2 As shown in the data structure diagram, one frame of data is divided into 5 subframes, and one subframe includes 10 words. In the process of collecting almanac data, the almanac information contained in the GPS satellite is loaded on the fourth and fifth subframes. Therefore, when collecting data, the data frame type and frame number should be judged first to determine whether the collected data is almanac data.

[0063] S2. Data validity judgment: judging the validity of the word data in the acquired subframe data and whether it contains the toa data of the almanac.

[0064] Specifically, in an embodiment of the present invention, in step S2, the data validity judgment also includes: judging whether the value of the currently acquired word data is the same as the word value collected last time: if the two are the same, the data is repeated and the repeated data is eliminated; if the two are not the same, the data is retained.

[0065] Among them, step S2 is mainly used to determine the validity of the collected data and whether it contains toa data; and after verifying its validity, it is necessary to perform data duplication elimination operation to ensure the correctness of the collected almanac data.

[0066] S3, data extraction: if the currently acquired word data is valid and contains the toa data, extract the toa data sent by all satellites, and compare it with the currently stored toa data, and update the toa data according to the comparison result: if the currently acquired word data is invalid or does not contain the toa data, end this step and return to step S1 to acquire data.

[0067] Among them, in step S3, in order to compare the toa data, in the embodiment of the present invention, the operation includes: setting a time variable, using the time variable to compare with the toa data of the currently received almanac: if the toa data is later than the time point represented by the time variable, it is proved that the data can be updated; thereby determining the novelty of the currently acquired almanac data. When it is determined that the currently acquired almanac data is the latest, the almanac data should be updated, and the toa data should be updated accordingly.

[0068] S4. Determine the satellite data channel: according to the stored toa data, find the satellite data channel that sends the same toa data, and mark the satellite data channel.

[0069] Specifically, in the embodiment of the present invention, in the step S4, the step of determining the satellite data channel specifically includes: S401, checking the data validity according to the acquired word data, and judging whether the toa information is included according to the frame type and subframe number and the number of the currently received word;

[0070] S402, extracting toa data and comparing it with the previously extracted toa data to ensure the correctness of the latest toa data, and then collecting and updating the toa data of all satellite data channels;

[0071] S403, counting each toa data collected from the satellite data channel and calculating the number of occurrences thereof;

[0072] S404: Determine the marked satellite data channel according to the statistical toa data size and the number of occurrences.

[0073] Specifically, in the embodiment of the present invention, in the step S404, the step of determining the marked satellite data channel according to the statistical toa data size and the number of occurrences is specifically: finding the maximum value of the collected toa data, and counting the number of occurrences thereof, if the number of occurrences is greater than 2, it indicates that there are more than two satellite data channels that can be used to collect almanac data;

[0074] If the toa data with the largest data and a number of occurrences greater than 2 is not found, then find the second largest toa data with a number of occurrences greater than 2 from the collected toa data;

[0075] Then, the satellite data channel corresponding to the toa data found through the above steps is obtained, and it is determined to be the marked satellite data channel for information collection.

[0076] Among them, in the embodiment of the present invention, after verifying the validity of the data, determining the marked satellite data channel through toa includes two ways: first, by counting the size and number of occurrences of each toa data, finding the maximum value of each toa data, and the toa data with a number of occurrences greater than 2, if the toa data exists, then the corresponding satellite data channels are the marked satellite data channels;

[0077] Since the extracted toa data is insufficient or the toa data does not exist originally, the second largest toa data with a number of occurrences greater than 2 is found, and the corresponding data channel is the marked satellite data channel.

[0078] S5. Integrate data channels: Integrate the marked satellite data channels and receive data from the marked satellite data channels; then compare the data obtained from the channels and store the data according to the comparison results until the entire subframe data is obtained.

[0079] Specifically, in the embodiment of the present invention, in step S5, the step of integrating data channels specifically includes: S501, after determining the validity of the collected word data, searching whether there is a data channel that sends the same toa, and determining the marked satellite data channel according to the search result;

[0080] S502, finding the same word data according to the marked satellite data channel;

[0081] S503, storing the acquired word data in the order of words, and updating the subframe data after collecting a subframe;

[0082] S504: Then check whether the data is collected for the first time, and store it in the receiver memory according to the check result.

[0083] Specifically, in an embodiment of the present invention, in step S501, the step of determining the marked satellite data channel according to the search result specifically includes:

[0084] If there is a data channel that sends the same toa data, the data channel corresponding to the same toa data is marked as the marked satellite data channel;

[0085] If the data channel currently collects data of the fourth or fifth frame and the frame does not contain toa, then according to whether the second word in each subframe data collected is the same, find the corresponding identical data channel and determine the data channel as the marked satellite data channel.

[0086] Among them, in the embodiment of the present invention, for the determination of the marked satellite data channel, whether the word data is the same can also be used to determine whether the data sent by the data channel is the same, so as to determine the same satellite data channel and mark it as the marked satellite data channel, so as to collect almanac data by subsequent channel combination.

[0087] Specifically, in the embodiment of the present invention, in step S504, the step of storing the data in the receiver memory according to the inspection result includes: if the inspection result is collected for the first time, directly storing the data in the receiver memory;

[0088] If the check result is not the first collection, the toa data of the two are compared to determine that the currently collected almanac data is the latest, and then the data is updated to the receiver memory.

[0089] Specifically, in an embodiment of the present invention, in step S504, the step of storing data in the receiver memory according to the inspection result also includes: before updating the calendar data, checking whether the current calendar is in use: if the current calendar is in use, pausing data updating and waiting for the next update.

[0090] Specifically, in the embodiment of the present invention, in the step S5, the data storage according to the comparison result is specifically: comparing whether the data obtained from the marked satellite data channel are equal. If the word data sent by two satellites are the same, the data is deemed to be valid and stored until 8 word data in the entire subframe are collected and updated to the receiver memory.

[0091] S6. Obtain complete almanac data: Then, the above steps are repeated continuously to collect data from all satellites, update the frame count, and collect all 25 frames of data based on the frame count to obtain the complete almanac data.

[0092] As described above, the GPS almanac collection method involved in the embodiment of the present invention, in the GPS almanac collection method provided in the present application, collects almanac data from multiple satellites; then after verifying the validity of the collected data, it is determined whether the data sent in the data channel is the same based on whether the toa is the same, so as to determine the same satellite data channel and mark it, and collect almanac data for the same data channel jointly to improve the data collection rate; and in the process of data collection, the almanac toa data of all data channels are compared to determine the latest almanac data, and then the receiver memory is updated to ensure the novelty of the almanac data. Compared with the prior art, the technical solution involved in the present invention can improve the rate of almanac data collection and data accuracy, ensure that the receiver obtains the latest almanac data, and improve the receiver's first positioning time and positioning accuracy.

[0093] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for collecting GPS almanacs, characterized in that: The following steps are involved: S1. Data acquisition: acquiring satellite data, and then determining whether the acquired satellite data is fourth subframe data or fifth subframe data, and controlling the operation of the collection program according to the determination result; S2, data validity judgment: judging the validity of the word data in the acquired subframe data and whether it contains the toa data of the almanac; S3, data extraction: If the currently acquired word data is valid and contains the toa data, the toa data sent by all satellites are extracted and compared with the currently stored toa data, and the toa data is updated according to the comparison result: If the currently acquired word data is invalid or does not contain the toa data, then this step ends and returns to step S1 to acquire data; S4. Determine the satellite data channel: according to the stored toa data, find the satellite data channel that sends the same toa data, and mark the satellite data channel; The step of determining the satellite data channel specifically includes: S401, check the data validity according to the acquired word data, and determine whether toa information is included according to the frame type, subframe number and the number of words currently received; S402, extracting toa data and comparing it with the previously extracted toa data to ensure the correctness of the latest toa data, and then collecting and updating the toa data of all satellite data channels; S403, counting each toa data collected from the satellite data channel and calculating the number of occurrences thereof; S404, determining the marked satellite data channel according to the statistical toa data size and the number of occurrences; S5, integrating data channels: integrating the marked satellite data channels and receiving data of the marked satellite data channels; then comparing the data obtained from the channels and storing the data according to the comparison results until the entire subframe data is obtained; S6. Obtain complete almanac data: Then, the above steps are repeated continuously to collect data from all satellites, update the frame count, and collect all 25 frames of data based on the frame count to obtain the complete almanac data.

2. The method for collecting GPS almanac according to claim 1, characterized in that: In step S1, controlling the running of the collection program according to the judgment result includes: If the satellite data is the fourth subframe or the fifth subframe data, it is proved that the collected data is almanac data, and the data collection procedure continues to enter the subsequent steps; If the satellite data is not the fourth subframe or the fifth subframe data, the collection is terminated, and then the data acquisition is performed again.

3. The method for collecting GPS almanac according to claim 2, characterized in that: In step S2, the data validity determination further includes: Determine whether the value of the currently acquired word data is the same as the word value collected last time: if the two are the same, the data is repeated and the duplicate data is removed; if the two are different, the data is retained.

4. The method for collecting GPS almanac according to claim 1, characterized in that: In step S404, the step of determining the marked satellite data channel according to the statistical toa data size and the number of occurrences is specifically as follows: Find the maximum value of the collected toa data and count its occurrence times. If the number of occurrences is greater than 2, it indicates that there are more than two satellite data channels that can be used to collect almanac data. If the toa data with the largest data and the number of occurrences greater than 2 is not found, then find the second largest toa data with the number of occurrences greater than 2 from the collected toa data; Then, the satellite data channel corresponding to the toa data found through the above steps is obtained, and it is determined to be the marked satellite data channel for information collection.

5. The method for collecting GPS almanac according to claim 4, characterized in that: In step S5, the step of integrating data channels specifically includes: S501, after determining the validity of the collected word data, searching whether there is a data channel that sends the same toa, and determining the marked satellite data channel according to the search result; S502, finding the same word data according to the marked satellite data channel; S503, storing the acquired word data in the order of words, and updating the subframe data after collecting a subframe; S504: Then check whether the data is collected for the first time, and store it in the receiver memory according to the check result.

6. The method for collecting GPS almanac according to claim 5, characterized in that: The step of determining the marked satellite data channel according to the search result specifically includes: If there is a data channel that sends the same toa data, the data channel corresponding to the same toa data is marked as the marked satellite data channel; If the data channel currently collects data of the fourth or fifth frame and the frame does not contain toa, then according to whether the second word in each subframe data collected is the same, find the corresponding identical data channel and determine the data channel as the marked satellite data channel.

7. The method for collecting GPS almanac according to claim 5, characterized in that: In step S504, the step of storing the data in the receiver memory according to the inspection result includes: If the inspection result is the first collection, the data is directly stored in the receiver memory; If the check result is not the first collection, the toa data of the two are compared to determine that the currently collected almanac data is the latest, and then the data is updated to the receiver memory.

8. The method for collecting GPS almanac according to claim 7, characterized in that: In step S504, the step of storing the data in the receiver memory according to the inspection result also includes: Before updating the almanac data, check whether the current almanac is in use: if the current almanac is in use, pause data updating and wait for the next update.

9. The method for collecting GPS almanac according to claim 5, characterized in that: In step S5, the data storage according to the comparison result is specifically as follows: Compare whether the data obtained from the marked satellite data channel are equal. If the word data sent by two satellites are the same, the data is deemed valid and stored until 8 word data in the entire subframe are collected and updated to the receiver memory.