US 8189716 B2 Abstract A method for obtaining a precise sampling frequency of a global positioning system (GPS) is applied in a GPS receiver. First, a radio frequency (RF) module of the GPS receiver is used to receive a satellite signal from at least one satellite. Then, a plurality of code delays of the satellite signal is calculated at a fixed time interval, and time differences between all adjacent two code delays among all the obtained code delays are calculated to obtain a plurality of time differences. Next, a mean value of all the obtained time differences is calculated. At last, a ratio between 1000 times of the mean value and the fixed time interval is calculated to obtain an error value, and the error is added to a standard sampling frequency of the RF module to obtain a new sampling frequency.
Claims(5) 1. A method for obtaining a precise sampling frequency of a global positioning system (GPS), applied in a GPS receiver having a radio frequency (RF) circuit, the method comprising:
receiving at least one satellite signal from at least one satellite by using the RF circuit;
calculating a plurality of code delays of the satellite signal at a fixed time interval;
calculating time differences between all adjacent two code delays among the plurality of code delays to obtain a plurality of time differences;
calculating a mean value of all the obtained time differences;
calculating a ratio between 1000 times of the mean value and the fixed time interval to obtain an error value; and
adding the error value to a standard sampling frequency of the RF circuit to obtain a new sampling frequency.
2. The method for obtaining a precise sampling frequency of a GPS according to
3. The method for obtaining a precise sampling frequency of a GPS according to
storing the obtained new sampling frequency.
4. The method for obtaining a precise sampling frequency of a GPS according to
5. The method for obtaining a precise sampling frequency of a GPS according to
Description This non-provisional application claims priority under 35 U.S.C. §119(a) on Patent Application No(s). 097150971 filed in Taiwan, R.O.C. on Dec. 26, 2008 the entire contents of which are hereby incorporated by reference. 1. Field of Invention The present invention relates to a global positioning system (GPS), and more particularly, to a method for obtaining a precise sampling frequency of a GPS. 2. Related Art A global satellite navigation system is also called a global positioning system (GPS). In the past, the GPS is only limited to military purpose and industrial purpose. With the continuous development of the technology, the GPS begins to be applied to various civil purposes. Generally, the GPS products mainly refer to GPS receivers applied to various purposes, for example, receivers for aviation and voyage purposes, automobile navigation devices, hand-held receivers for mountaineering and entertainment, and other types of communication products. The common GPS product mainly includes an internal antenna, a chipset, external keys, a display panel, and other related parts. The GPS receiver utilizes satellites orbiting the earth for positioning. Generally, the GPS receiver needs to obtain signals from at least three satellites to calculate the longitude and latitude coordinates of a current position. When the GPS receiver needs to obtain the current position, the GPS receiver compares the time transferred from each satellite. These time differences may inform the GPS receiver of its distance away from each satellite, and therefore the current position is acquired. The GPS receiver uses an oscillator, such as a temperature compensated crystal oscillator (TCXO), to serve as a reference frequency source required during operation. In other words, the GPS receiver uses the oscillator to generate the reference frequency. However, as the oscillator is subjected to different manufacturing qualities, as well as the loss of the oscillator after being used for many times, a practically generated sampling frequency is not consistent with the designated sampling frequency given in a specification of the oscillator. In the prior art, when the satellite is tracked, errors of the sampling frequencies are compensated one by one at each data by using a delay locked loop (DLL). However, the GPS receiver consumes much time in the satellite tracking. Moreover, the application of the GPS receiver is limited. In view of the problems above, the present invention is directed to a method for obtaining a precise sampling frequency of a GPS, thereby solving one or more problems generated by compensating errors of sampling frequencies one by one at each data in the prior art. The present invention provides a method for obtaining a precise sampling frequency of a GPS, which is applied in a GPS (GPS) receiver. The GPS receiver has a radio frequency (RF) module. First, the RF module of the GPS receiver is used to receive a satellite signal from at least one satellite. A plurality of code delays of the satellite signal is calculated at a fixed time interval, and time differences between all adjacent two code delays among all the obtained code delays are calculated to obtain a plurality of time differences. Next, a mean value of all the obtained time differences is calculated. Finally, a ratio between 1000 times of the mean value and the fixed time interval is calculated to obtain an error value, and the error is added to a standard sampling frequency of the RF module to obtain a new sampling frequency. The GPS receiver may further have a storage unit to store the obtained new sampling frequency. Here, the standard sampling frequency of the RF module is a designated sampling frequency given in a specification of the RF module. The fixed time interval may be set to 1 ms (millisecond). Moreover, a different satellite may be chosen at a different time to repeat the calculation of the code delays of the different satellite and the calculation of time differences of all the adjacent two code delays, so as to obtain a large amount of data (i.e., time differences) to calculate a mean value. In conclusion, when the method for obtaining a precise sampling frequency of a GPS according to the present invention is applied in the GPS receiver, a more precise sampling frequency in comparison with the designated sampling frequency given in the specification may be provided for the GPS receiver, such that the GPS receiver may directly sample the satellite signal with the correct sampling frequency. In other words, the GPS receiver in which an embodiment of the present invention is applied may search samplings for the satellite signal with a more precise sampling frequency. In such a manner, a satellite tracking time of the GPS receiver may be effectively shortened and more precise time information may be obtained. Moreover, the GPS receiver may directly utilize the precise sampling frequency to perform more diversified satellite tracking modes, for example, hopping satellite tracking, rapidly searching code delay range at a warm start or a hot start of the GPS receiver, and so on. The present invention will become more fully understood from the detailed description given herein below for illustration only, and thus are not limitative of the present invention, and wherein: Referring to The GPS receiver The GPS receiver First, a satellite signal is received from a satellite Next, a plurality of code delays of the satellite signal from this satellite Also, time differences between all adjacent two code delays among all the code delays obtained in the previous step are calculated to obtain a plurality of time differences (step Next, a mean value of all the obtained time differences is calculated (step A ratio between 1000 times of the mean value and the fixed time interval is calculated to obtain an error value, and the error is added to a standard sampling frequency of the RF module to obtain a new sampling frequency, as shown in the following Formula 1 (step F′ indicates the new sampling frequency, F indicates the standard sampling frequency, ds indicates a time difference between adjacent two code delays, mean (ds) adjacent a mean value of all the time differences between all adjacent two code delays, and dt indicates the fixed time interval. Here, the standard sampling frequency of the RF module Hence, the GPS receiver In such a manner, when the GPS receiver Hence, a different satellite may also be chosen at a different time to repeat step Referring to Herein, whether all the time differences are calculated or not is determined by setting the number of satellites to be calculated (that is, the number of the satellite signals), or setting the number of data to be obtained (that is, the number of time differences). For setting the number of the satellites to be calculated, after all the time differences of code delays of a satellite signal from a satellite are calculated, first, it may be decided whether the number of satellites has reached the number of satellites to be calculated. If so, continue to perform step Furthermore, a plurality of code delays of a satellite signal from the satellite For setting the number of data to be obtained, after all time differences of code delays of a satellite signal from a satellite are calculated, it may be decided first whether the number of the calculated time differences has reached a predetermined number (i.e., greater than or equal to the predetermined number). If so, continue to perform step Furthermore, the plurality of code delays of the satellite signal from the satellite Furthermore, for step Here, the method for obtaining a precise sampling frequency of a GPS according to the present invention may be implemented by embedding a software program or a firmware program in the storage unit When the method for obtaining a precise sampling frequency of a GPS according to the present invention is embedded in the GPS receiver In addition, referring to In conclusion, when the method for obtaining a precise sampling frequency of a GPS according to the present invention is applied in the GPS receiver, the more precise sampling frequency relative to the designated sampling frequency given in the specification may be provided for the GPS receiver, such that the GPS receiver may perform sampling of the satellite signal with a correct sampling frequency directly. In other words, the GPS receiver in which an embodiment of the present invention is applied may search samplings of the satellite signal with a more precise sampling frequency. In such a manner, satellite tracking time of the GPS receiver may be effectively shortened and more precise time information may be obtained. Moreover, the GPS receiver may use precise sampling frequency directly to perform more diversified satellite tracking modes, for example, hopping satellite tracking, rapidly searching a code delay range during a warm start or hot start of the GPS receiver. The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims. Patent Citations
Classifications
Legal Events
Rotate |