CN109154796A - Method for updating time, device and moveable platform - Google Patents

Method for updating time, device and moveable platform Download PDF

Info

Publication number
CN109154796A
CN109154796A CN201780026754.6A CN201780026754A CN109154796A CN 109154796 A CN109154796 A CN 109154796A CN 201780026754 A CN201780026754 A CN 201780026754A CN 109154796 A CN109154796 A CN 109154796A
Authority
CN
China
Prior art keywords
time
utc
counter
preset
variable quantity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201780026754.6A
Other languages
Chinese (zh)
Other versions
CN109154796B (en
Inventor
张岩松
彭夏鹏
房玲江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Dajiang Innovations Technology Co Ltd
Original Assignee
Shenzhen Dajiang Innovations Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dajiang Innovations Technology Co Ltd filed Critical Shenzhen Dajiang Innovations Technology Co Ltd
Publication of CN109154796A publication Critical patent/CN109154796A/en
Application granted granted Critical
Publication of CN109154796B publication Critical patent/CN109154796B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS
    • G04R20/04Tuning or receiving; Circuits therefor
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS
    • G04R20/06Decoding time data; Circuits therefor
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R40/00Correcting the clock frequency
    • G04R40/06Correcting the clock frequency by computing the time value implied by the radio signal

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Electric Clocks (AREA)

Abstract

The embodiment of the present invention provides a kind of method for updating time, device and moveable platform, this method comprises: obtaining at least two variable quantity in the first preset time of counter;Averaging processing is carried out at least two variable quantity;Based on the result and first preset time for being averaging processing, the crystal oscillator frequency of the counter is determined;Based on the crystal oscillator frequency, local zone time is updated.The embodiment of the present invention is not needed by dedicated hardware circuit, can be reduced the complexity of time update while ensuring that the time updates accuracy, be reduced cost.

Description

Method for updating time, device and moveable platform
Technical field
This application involves time calibration technical field more particularly to a kind of method for updating time, device and moveable platforms.
Background technique
Global Satellite Navigation System (Global Navigation Satellite System, guide number SS) is in the whole world It is used widely.When GNSS time service is to other equipment, other equipment usually require proprietary hardware circuit and come to local Time is calibrated and is updated, volume, weight, complexity and the higher cost of the hardware circuit.
Summary of the invention
The embodiment of the present invention provides a kind of method for updating time, device and moveable platform, to ensure that the time updates While accuracy, the complexity of time update is reduced, cost is reduced.
The first aspect of the embodiment of the present invention is to provide a kind of method for updating time, comprising:
Obtain at least two variable quantity in the first preset time of counter;
Averaging processing is carried out at least two variable quantity;
Based on the result and first preset time for being averaging processing, the crystal oscillator frequency of the counter is determined;
Based on the crystal oscillator frequency, local zone time is updated.
The second aspect of the embodiment of the present invention is to provide a kind of method for updating time, comprising:
Obtain more than two unit time variable quantities of counter;
Averaging processing is carried out to more than two unit time variable quantities of the counter, obtains the counter Crystal oscillator frequency;
Based on the crystal oscillator frequency, local zone time is updated.
The third aspect of the embodiment of the present invention is to provide a kind of time updating device, comprising:
One or more processors;One or more of processors work alone or synergistically;
The processor is used for: obtaining at least two variable quantity in the first preset time of counter;To it is described extremely Few two variable quantities carry out averaging processing;Based on the result and first preset time for being averaging processing, institute is determined State the crystal oscillator frequency of counter;Based on the crystal oscillator frequency, local zone time is updated.
The fourth aspect of the embodiment of the present invention is to provide a kind of time updating device, comprising:
One or more processors;One or more of processors work alone or synergistically;
The processor is used for: obtaining more than two unit time variable quantities of counter;To the two of the counter A above unit time variable quantity carries out averaging processing, obtains the crystal oscillator frequency of the counter;Based on the crystal oscillator frequency Rate updates local zone time.
5th aspect of the embodiment of the present invention is to provide a kind of moveable platform, comprising: such as the above-mentioned third aspect or the 4th Time updating device described in aspect.
The 6th aspect of the embodiment of the present invention is to provide a kind of computer readable storage medium, including instruction, works as described instruction When operation, method for updating time described in above-mentioned first aspect or second aspect is executed.
Method for updating time, processor and moveable platform provided in an embodiment of the present invention, by obtaining counter extremely Few two variable quantities in the first preset time, and averaging processing is carried out at least two variable quantities got, it is based on The result of averaging and the first preset time determine the crystal oscillator frequency of counter, thus according to the crystal oscillator frequency obtained update is determined Local zone time.Due to be in the embodiment of the present invention by carrying out averaging processing at least two two variable quantities got, And the crystal oscillator frequency of counter is determined according to the result and the first preset time that are averaging processing, therefore crystal oscillator can be isolated Influence of the difference and temperature of body to crystal oscillator frequency, ensure that the accuracy and real-time of timer crystal oscillator frequency, thus root Accurate local zone time can be obtained when updating local zone time according to the crystal oscillator frequency, and is not needed by dedicated hardware electricity Road has been saved space required for installation hardware circuit, has been reduced costs.
Detailed description of the invention
Fig. 1 is a kind of schematic diagram of a scenario provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of method for updating time provided in an embodiment of the present invention;
Fig. 3 is the execution method flow diagram of step 204 provided in an embodiment of the present invention;
Fig. 4 is the flow chart of the update method of accumulated time error provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of time updating device provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of moveable platform provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is clearly retouched It states, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on the present invention In embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be noted that it can be directly on another component when component is referred to as " being fixed on " another component Or there may also be components placed in the middle.When a component is considered as " connection " another component, it, which can be, is directly connected to To another component or it may be simultaneously present component placed in the middle.In the absence of conflict, in following embodiment and embodiment Feature can be combined with each other.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool The purpose of the embodiment of body, it is not intended that in the limitation present invention.Term " and or " used herein includes one or more phases Any and all combinations of the listed item of pass.
With reference to the accompanying drawing, it elaborates to some embodiments of the present invention.In the absence of conflict, following Feature in embodiment and embodiment can be combined with each other.
Fig. 1 is a kind of schematic diagram of a scenario provided in an embodiment of the present invention, includes satellite 10,11 and of satellite receiver in Fig. 1 Receive the device 12 of time service, wherein the present embodiment Satellite receiver 11 is mounted on the device 12 for receiving time service, but is not limited to In being mounted on device 12, in fact, satellite receiver 11 and device 12 can be arranged respectively to two independent entities.This reality Unmanned plane, automobile or other moveable platforms can be specially by applying device 12 in example.When 10 time service of satellite, satellite 10 is outside Generate a pulse per second (PPS) (Pulse Per Second, abbreviation PPS) signal, at the same by communication link (such as serial ports or bus, But it is not limited to serial ports or bus) rising edge of PPS signal or the corresponding universal time of failing edge (UTC) are sent out It goes.After satellite receiver 11 receives the PPS signal and corresponding UTC of satellite 10, by the PPS signal introducing device 12 Exterior terminal in, and introducing in the second preset time after PPS signal, it is by communication link that the PPS signal is corresponding UTC be sent to device 12, device 12 can export this event of PPS signal with the form response satellite receiver 11 interrupted.Into One step, after receiving UTC, device 12 carries out initialization process to local zone time, local zone time is updated to UTC, and lead to The variable quantity for obtaining at least two counters in the first preset time is crossed, based on asking at least two variable quantities got Average result and the first preset time determine the crystal oscillator frequency of counter, are based on the crystal oscillator frequency, update local zone time, thus Accurate local zone time can be obtained, and is not needed by dedicated hardware circuit, therefore, the sky of device 12 can be saved Between, the weight of device 12 is reduced, cost is reduced.
Specifically, Fig. 2 is a kind of flow chart of method for updating time provided in an embodiment of the present invention, this method can be by one Kind of time updating device executes, which can be specially the processor with operation and processing capacity, or such as without It is man-machine, the moveable platforms such as automobile.As shown in Fig. 2, this method comprises the following steps:
Step 201, at least two variable quantity in the first preset time for obtaining counter.
In one possible implementation, three or more count values for obtaining counter can be first passed through, so that should It include the time interval between at least two groups count value in three or more count values equal to the first preset time, then based on acquisition To three or more count values at least two groups count value, calculate obtain at least two first preset times in variation Amount.For example, the count value got is a, b, c, wherein when the time interval between a and b and b and c is default equal to first Between, the variable quantity for calculating timer is | a-b | and | c-b |.Certainly it is only for illustrating, rather than to of the invention unique It limits.
In alternatively possible implementation, counter can be first obtained respectively in more than two first preset times In starting counter value and terminate count value, then the initial count based on counter in more than two first preset times Value and termination count value, calculate the variable quantity obtained at least two first preset times.Such as, it is assumed that counter was at the 1st second Count value be a, the 2nd second count value be b, the 3rd second count value be c, the 4th second count value be d, then at least may be used Obtain counter following variable quantity in the first preset time: | a-b |, | c-b |, | c-d |.Certainly it is only for illustrating, Rather than to unique restriction of the invention.
Optionally, in order to ensure the accuracy of the variable quantity got, the present embodiment can also be by obtaining counter Periodicity is overturn, and combines the counting for the counter that any one implementation is got in above two possible implementation Value obtains variable quantity of the counter in the first preset time to calculate.
By taking the first preset time is equal to 1 second as an example, it is assumed that count value of the counter at the 1st second is counter (n-1), Count value at the 2nd second is counter (n), and the overturning periodicity of counter is T_counter, then can be according to such as following table The variable quantity delta (n) for obtaining counter in 1 second is calculated up to formula:
Delta (n)=[counter (n)-counter (n-1)+T_counter] %T_counter
Certainly it is only for illustrating, rather than to unique restriction of the invention.
Optionally, in the present embodiment, the first preset time can refer to a unified time value, such as 1 second, but not limit to In 1 second.It can also refer to multiple and different time values, for example, can wait within 3 seconds according to setting by 1 second, 2 seconds and all be referred to as first in advance If the time.Certainly certainly it is only for illustrating, rather than to unique restriction of the invention.
The present embodiment is also to directly acquire more than two unit time variable quantities of counter, for example, obtaining counter In the 1st second variable quantity, the 2nd second variable quantity, the 3rd second variable quantity etc., certainly it is only for illustrating rather than to this Unique restriction of invention.
Step 202 carries out averaging processing at least two variable quantity.
In the first possible average treatment mode, directly all changes amount got can be carried out at averaging Reason.
In the second possible implementation, can be greater than in the quantity of the variable quantity of the first preset time got At two, first remove maximum value and/or minimum value therein from all changes amount got, then to removal maximum value and/ Or the remaining variable quantity of minimum value carries out averaging processing.
Example in undertaking, it is assumed that the number of variable quantity of the counter got in the first preset time (being 1 second in upper example) Amount is greater than preset number of samples filter_num, then can be averaged by following filtering algorithm to the variable quantity got Filtering processing, acquires average result
Delta_min=Min { delta (n-filter_num+1) ... delta (n) }
Delta_max=Max { delta (n-filter_num+1) ... delta (n) }
Wherein, filter_num can take the arbitrary value in 6~8 ranges, but be not limited to 6~8, actually filter_ The value of num, which can according to need, to be set, in the present embodiment without limitation.In the present embodiment, by taking for filter_num Value range, which is set as 6~8, can lead to not eliminate interference to avoid the filter_num mistake being arranged, or the excessive of setting is led It causes slow in reacting, quick response can not be made to temperature change.What needs to be explained here is that when the first preset time is 1 second, i.e., When the unit time, above-mentioned acquisitionThe crystal oscillator frequency of the counter as acquired, if the first preset time is not unit Between when, then need further basisThe crystal oscillator frequency of counter is determined with the first preset time.
Certainly, above-mentioned example is illustrated to above-mentioned second possible implementation, rather than to the present invention Unique restriction.
In the third possible implementation, first can to extract numerical value from least two variable quantities got big The small object variations amount in the first preset range, to remove exceptional value from all variable quantities got.Further, then Averaging processing is carried out to all object variations amounts obtained are extracted.
Step 203, result and first preset time based on the averaging processing, determine the crystalline substance of the counter Vibration frequency.
When the first preset time refer to be a preset unified time value when, can use averaging and handle to obtain Mean change amount divided by the first preset time, obtain the crystal oscillator frequency of counter.
When the first preset time refer to be preset multiple time spans when, then can pass through all changes to getting First preset time corresponding to change amount carries out averaging processing, obtains average length of time, and aforementioned calculating is recycled to obtain Mean change amount obtains the crystal oscillator frequency of counter divided by average length of time.
Step 204 is based on the crystal oscillator frequency, updates local zone time.
Optionally, the present embodiment can be according to predetermined period, periodically update local zone time, wherein predetermined period can To be arbitrary value, for example, preset threshold can be set smaller than to the overturning periodicity and counter of counter in actual scene Crystal oscillator frequency ratio arbitrary value, lead to the loss of time to avoid counter overflow.
Optionally, Fig. 3 is the execution method flow diagram of step 204 provided in an embodiment of the present invention, as shown in figure 3, the party Method includes:
Step 301 obtains the counter in local zone time initial runtime to the variable quantity in the time at current time.
In one possible implementation, can the count value directly by counter at current time subtract counter In the count value of local zone time initial runtime, counter is obtained in local zone time initial runtime to time at current time Variable quantity.
In alternatively possible implementation, can overturning periodicity and counter based on counter in local The count value of time initial runtime and the count value at current time calculate acquisition counter and arrive in local zone time initial runtime Variable quantity in time at current time.Its specific execution method may refer to solve variable quantity in counter 1 second in step 201 Example, repeat no more herein.
The crystal oscillator frequency of step 302, variable quantity and the counter based on the counter within the time, The determination deviation time.
It is exemplary, it can be calculated by following expression and obtain deviation time delta_s:
Delta_s=delta_counter/freq
Wherein, delta_counter is counter in local zone time initial runtime to the variation in the time at current time Amount, freq are the crystal oscillator frequency of counter.Above-mentioned example can also be not limited to by calculating deviation time in certain actual scene Method also can according to need using other customized methods.
Step 303 is based on the deviation time, is modified to local zone time, obtains the time at current time.
Optionally, in one possible implementation, directly local zone time can be repaired using following expression Just, the time at current time is obtained:
Local_now=local_time+delta_s
Wherein, local_now is the time at the current time obtained after correcting, when local_time is the local before amendment Between.Certainly it is only for illustrating rather than to unique restriction of the invention.
In alternatively possible implementation, it can be based on deviation time and predetermined accumulated time error, it is right Local zone time is modified, and obtains the correct time at current time, exemplary, in this fashion, solves the time at current time Expression formula can be expressed as form:
Local_now=local_time+delta_s+T_error_filter
Wherein, T_error_filter is predetermined accumulated time error.
Optionally, in the present embodiment, after the time, updating device received UTC, it is also based on the UTC received And local zone time when receiving UTC, update the accumulated time error that the above method is related to.It can receive among these primary UTC just updates an accumulated time error, can also often receive the UTC of preset quantity according to preset strategy, updates Primary local accumulated time error.
Often to receive the UTC of preset quantity, for updating an accumulated time error, Fig. 4 is that the embodiment of the present invention mentions The flow chart of the update method of the accumulated time error of confession, as shown in figure 4, the update method of accumulated time error includes:
Step 401 often receives a UTC, calculates primary local accumulated time error.
It is exemplary, local accumulated time error can be calculated according to following expression:
T_error=UTC-local_time
Wherein, local_time is local zone time when receiving UTC, and T_error is the time local when receiving UTC Accumulated error.
Optionally, if when receiving UTC, the accumulated time for calculating acquisition misses absolute value of the difference less than the first default threshold Value, it is determined that this when receiving UTC corresponding local accumulated time error be preset value (for example, " 0 " but being not limited to It 0) is, and by local accumulated time error update preset value.
If the accumulated time for calculating acquisition misses absolute value of the difference and is greater than or equal to the first preset threshold when receiving UTC, The accumulated time for then determining that corresponding local accumulated time error is equal to before receiving the UTC when this receives UTC misses Difference.
If the accumulated time for calculating acquisition misses absolute value of the difference and is greater than the second preset threshold when receiving UTC, then it is based on Incidence relation between preset accumulated time error and the second preset threshold determines current local accumulated time error, and It is to determine the accumulated time error obtained by local accumulated time error update.Wherein, above-mentioned accumulated time error and second Incidence relation between preset threshold may be expressed as:
T_error_now=sign (T_error) * limit
Wherein, T_error_now is current local accumulated time error, when T_error is local before receiving UTC Between accumulated error, limit is the second preset threshold (such as 1 second, but do not limit to and 1 second), and sign () is to take symbol, and positive number is 1, negative is -1.
If the accumulated time for calculating acquisition misses absolute value of the difference and is less than or equal to the second preset threshold when receiving UTC, The accumulated time for then determining that corresponding local accumulated time error is equal to before receiving the UTC when this receives UTC misses Difference.
Step 402, after receiving the UTC of preset quantity, to calculate obtain preset quantity accumulated time error into Row median filter process obtains the intermediate value of the accumulated time error of the preset quantity.
It is exemplary, it is assumed that local accumulated time error is updated after receiving 3 UTC, wherein to receive first When UTC, the accumulated time error of calculating is T_error1, when receiving second UTC, the accumulated time error of calculating is T_ error2, when receiving third UTC, the accumulated time error of calculating is T_error3, then obtained after carrying out median filter process The intermediate value of the accumulated time error arrived are as follows: T_error_filter=Mid { T_error1T_error2T_error3}。
Certainly, although the method for the median filtering that the present embodiment uses, obtains and update local accumulated time error, The method for being not limited to median filtering in practice, in fact, can also obtain preset quantity accumulated time error after, Local accumulated time error is determined according to the method for averaging.
Local accumulated time error update is the intermediate value by step 403.
Method for updating time provided in this embodiment, even if time updating device can not receive PPS signal and UTC for some reason, The time of degree of precision can be provided in longer period of time, the reliability of time update is improved, in addition, the present embodiment passes through Local accumulated time error is determined and updated after receiving UTC, and one updated using accumulated time error as the time examines Worry factor can eliminate error caused by adding up at any time, improve the accuracy of time update.
Optionally, the present embodiment is also to directly acquire more than two unit time variable quantities of counter, to counter More than two unit time variable quantities carry out averaging processing, obtain the crystal oscillator frequency of counter;Based on the crystal oscillator frequency, Update local zone time.Its specific implementation procedure is similar with above method embodiment, repeats no more herein.
Method for updating time, processor and moveable platform provided in this embodiment, by obtaining at least two counters Variable quantity in the first preset time, and averaging processing is carried out at least two variable quantities got, based on averaging Result and the first preset time determine the crystal oscillator frequency of counter, thus when according to determining that the crystal oscillator frequency obtained updates local Between.By be in this present embodiment by carrying out averaging processing at least two two variable quantities got, and it is flat according to asking The result and the first preset time that handle determines the crystal oscillator frequency of counter, therefore the difference of crystal oscillator individual can be isolated, And influence of the temperature to crystal oscillator frequency, it ensure that the accuracy and real-time of timer crystal oscillator frequency, thus according to the crystal oscillator Frequency can obtain accurate local zone time when updating local zone time, and not need to save by dedicated hardware circuit Space required for hardware circuit is installed, is reduced costs.
Fig. 5 is a kind of structural schematic diagram of time updating device provided in an embodiment of the present invention, which can To be mounted in any equipment with time timing and time more new function, it is particularly possible to it is removable flat to be mounted on unmanned plane etc. On platform.As shown in figure 5, the time updating device 50 includes: one or more processors 51;One or more of processor lists Solely or cooperate;The processor is used for: obtaining at least two variable quantity in the first preset time of counter;To institute It states at least two variable quantities and carries out averaging processing;Based on the result and first preset time for being averaging processing, really The crystal oscillator frequency of the fixed counter;Based on the crystal oscillator frequency, local zone time is updated.
Optionally, the processor 51 is used for: obtaining three of counter or more count values, described three or more meters In numerical value include at least two groups count value between time interval be the first preset time, based on described three or more count values In at least two groups count value, calculate obtain at least two first preset times in variable quantity.
Optionally, processor is used for: obtaining initial count of the counter in more than two first preset times respectively Value and termination count value;Based on starting counter value of the counter in described two the first above preset times and termination Count value calculates the variable quantity obtained at least two first preset times.
Optionally, the processor 51 is used for: the overturning periodicity of the counter is obtained, based on the counter in institute It states the starting counter value in more than two first preset times and terminates the overturning period of count value and the counter Number calculates the variable quantity obtained at least two first preset times.
Optionally, the processor 51 is used for: when the quantity of the variable quantity of first preset time got is greater than At two, the maximum value and/or minimum value in the variable quantity of all first preset times got are removed, to removal maximum value And/or the variable quantity of remaining first preset time carries out averaging processing after minimum value.
Optionally, the processor 51 is used for: to the object variations amount at least two variable quantity got into Row averaging processing, wherein the object variations amount is variable quantity of the numerical values recited in the first preset range.
Optionally, the processor 51 is used for: carrying out initialization process to local zone time.
Optionally, the processor 51 is used for: being received receiving in the second preset time after pulse per second (PPS) PPS signal The universal time UTC that sending device is sent, at the time of the UTC corresponds to the PPS signal rising edge or failing edge, by institute It states local zone time and is updated to the UTC.
Optionally, the processor 51 is used for: obtaining the counter in local zone time initial runtime to current time Variable quantity in time, the crystal oscillator frequency of variable quantity and the counter based on the counter within the time, The determination deviation time is based on the deviation time, is modified to local zone time, obtains the time at current time.
Optionally, the processor 51 is used for: overturning periodicity and the counter based on the counter are at this The count value and the count value at current time of ground time initial runtime calculate and obtain the counter in local zone time initialization Variable quantity in time at moment to current time.
Optionally, the processor 51 is used for: the deviation time and predetermined accumulated time error is based on, to this The ground time is modified, and obtains the time at current time.
Optionally, the processor 51 is used for: after receiving the UTC, based on the UTC and receiving the UTC When local zone time, update local accumulated time error.
Optionally, the processor 51 is used for: often being received the UTC of preset quantity, is updated primary local accumulated time Error.
Optionally, the processor 51 is used for: a UTC is often received, primary local accumulated time error is calculated, After the UTC for receiving preset quantity, median filter process is carried out to the accumulated time error for calculating the preset quantity obtained, is obtained Local accumulated time error update is the intermediate value by the intermediate value of the accumulated time error of the preset quantity.
Optionally, the processor 51 is used for: when receiving UTC, if the UTC and sheet when receiving the UTC The absolute difference of ground time is less than the first preset threshold, it is determined that the corresponding accumulated time error of the UTC is equal to preset value; If the absolute difference of the UTC and local zone time when receiving the UTC is greater than or equal to the first preset threshold, described The corresponding accumulated time error of UTC is equal to the accumulated time error received before the UTC.
Optionally, the processor 51 is used for: when receiving UTC, if the UTC and sheet when receiving the UTC The absolute difference of ground time is greater than the second preset threshold, then based on preset accumulated time error and second preset threshold Between incidence relation, determine the corresponding accumulated time error of the UTC;If the UTC and local when receiving the UTC The absolute difference of time is less than or equal to second preset threshold, then the corresponding accumulated time error of the UTC is equal to and connects Receive the accumulated time error before the UTC.
Optionally, the processor 51 is used for: updating local zone time based on predetermined period, the predetermined period is less than described The ratio of the crystal oscillator frequency of the overturning periodicity and counter of counter.
Time updating device provided in this embodiment can be used in executing the technical solution of above method embodiment, execute Mode is similar with beneficial effect, repeats no more herein.
The present invention also provides a kind of time updating devices, which includes one or more processors;It is described One or more processors work alone or synergistically;
The processor is used for: obtaining more than two unit time variable quantities of counter;To the two of the counter A above unit time variable quantity carries out averaging processing, obtains the crystal oscillator frequency of the counter;Based on the crystal oscillator frequency Rate updates local zone time.
Time updating device provided in this embodiment can be used in executing the technical solution of above method embodiment, execute Mode is similar with beneficial effect, repeats no more herein.
Fig. 6 is a kind of structural schematic diagram of moveable platform provided in an embodiment of the present invention, as shown in fig. 6, removable flat Platform 60 includes the time updating device 50 as described in above-described embodiment.
The embodiment of the present invention also provides a kind of computer readable storage medium, including instruction, when described instruction operation, holds The method for updating time of row above-described embodiment.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (38)

1. a kind of method for updating time characterized by comprising
Obtain at least two variable quantity in the first preset time of counter;
Averaging processing is carried out at least two variable quantity;
Based on the result and first preset time for being averaging processing, the crystal oscillator frequency of the counter is determined;
Based on the crystal oscillator frequency, local zone time is updated.
2. the method according to claim 1, wherein it is described obtain counter at least two when first is default Interior variable quantity, comprising:
Three or more count values of counter are obtained, include between at least two groups count value in described three or more count values Time interval be the first preset time;
Based on at least two groups count value in described three or more count values, when calculating acquisition at least two first is default Interior variable quantity.
3. the method according to claim 1, wherein it is described obtain counter at least two when first is default Interior variable quantity, comprising:
Starting counter value and termination count value of the counter in more than two first preset times are obtained respectively;
Starting counter value and termination count value based on the counter in described two the first above preset times, calculate Obtain the variable quantity at least two first preset times.
4. according to the method described in claim 3, it is characterized in that, the method also includes:
Obtain the overturning periodicity of the counter;
The starting counter value based on the counter in described two the first above preset times and termination count value, Calculate the variable quantity obtained at least two first preset times, comprising:
Starting counter value and termination count value based on the counter in described two the first above preset times, and The overturning periodicity of the counter calculates the variable quantity obtained at least two first preset times.
5. method according to any of claims 1-4, which is characterized in that described default to described two above first The variable quantity of time carries out averaging processing, comprising:
When the quantity of the variable quantity of first preset time got is greater than two, it is pre- to remove all first got If maximum value and/or minimum value in the variable quantity of time;
Averaging processing is carried out to the variable quantity of remaining first preset time after removal maximum value and/or minimum value.
6. method according to any of claims 1-4, which is characterized in that it is described at least two variable quantity into Row averaging processing, comprising:
Averaging processing is carried out to the object variations amount at least two variable quantity got, wherein the target becomes Change amount is variable quantity of the numerical values recited in the first preset range.
7. the method according to claim 1, wherein it is described obtain counter at least two when first is default Before interior variable quantity, the method also includes:
Initialization process is carried out to local zone time.
8. the method according to the description of claim 7 is characterized in that described carry out initialization process to local zone time, comprising:
The inscribed universal time for transmitting and receiving equipment transmission of the second preset time after receiving pulse per second (PPS) PPS signal At the time of UTC, the UTC correspond to the PPS signal rising edge or failing edge;
The local zone time is updated to the UTC.
9. according to the method described in claim 8, it is characterized in that, described be based on the crystal oscillator frequency, update local zone time, packet It includes:
The counter is obtained in local zone time initial runtime to the variable quantity in the time at current time;
The crystal oscillator frequency of variable quantity and the counter based on the counter within the time, when determination deviation Between;
Based on the deviation time, local zone time is modified, obtains the time at current time.
10. according to the method described in claim 9, it is characterized in that, described obtain the counter in local zone time initialization Variable quantity in time at moment to current time, comprising:
Overturning periodicity and the counter based on the counter local zone time initial runtime count value and work as The count value at preceding moment calculates and obtains the counter in local zone time initial runtime to the variation in the time at current time Amount.
11. method according to claim 9 or 10, which is characterized in that it is described to be based on the deviation time, to local zone time It is modified, obtains the time at current time, comprising:
Based on the deviation time and predetermined accumulated time error, local zone time is modified, obtains current time Time.
12. according to the method described in claim 8, it is characterized in that, the method also includes:
After receiving the UTC, based on the UTC and local zone time when receiving the UTC, it is tired to update the local time Product error.
13. according to the method for claim 12, which is characterized in that it is described after receiving the UTC, it is based on the UTC Local zone time with when receiving the UTC, updates local accumulated time error, comprising:
The UTC of preset quantity is often received, primary local accumulated time error is updated.
14. according to the method for claim 13, which is characterized in that the UTC for often receiving preset quantity updates primary Local accumulated time error, comprising:
A UTC is often received, primary local accumulated time error is calculated;
After receiving the UTC of preset quantity, the accumulated time error for calculating the preset quantity obtained is carried out at median filtering Reason, obtains the intermediate value of the accumulated time error of the preset quantity;
It is the intermediate value by local accumulated time error update.
15. according to the method for claim 14, which is characterized in that it is described often to receive a UTC, calculate primary local Accumulated time error, comprising:
When receiving UTC, if the absolute difference of the UTC and local zone time when receiving the UTC are pre- less than first If threshold value, it is determined that the corresponding accumulated time error of the UTC is equal to preset value;
If the absolute difference of the UTC and local zone time when receiving the UTC are greater than or equal to the first preset threshold, The corresponding accumulated time error of the UTC is equal to the accumulated time error received before the UTC.
16. according to the method for claim 14, which is characterized in that it is described often to receive a UTC, calculate primary local Accumulated time error, including
When receiving UTC, if the absolute difference of the UTC and local zone time when receiving the UTC is greater than second in advance If threshold value, then based on the incidence relation between preset accumulated time error and second preset threshold, described UTC pairs is determined The accumulated time error answered;
If the absolute difference of the UTC and local zone time when receiving the UTC are less than or equal to the described second default threshold Value, then the corresponding accumulated time error of the UTC is equal to the accumulated time error received before the UTC.
17. method described in any one of -16 according to claim 1, which is characterized in that it is described to be based on the crystal oscillator frequency, more New local zone time, comprising:
Local zone time, overturning periodicity of the predetermined period less than the counter and the counting are updated based on predetermined period The ratio of the crystal oscillator frequency of device.
18. a kind of method for updating time characterized by comprising
Obtain more than two unit time variable quantities of counter;
Averaging processing is carried out to more than two unit time variable quantities of the counter, obtains the crystal oscillator of the counter Frequency;
Based on the crystal oscillator frequency, local zone time is updated.
19. a kind of time updating device, which is characterized in that when described device includes processor, the processor is configured for: Obtain at least two variable quantity in the first preset time of counter;At least two variable quantity is carried out at averaging Reason;Based on the result and first preset time for being averaging processing, the crystal oscillator frequency of the counter is determined;Based on institute Crystal oscillator frequency is stated, local zone time is updated.
20. time updating device according to claim 19, which is characterized in that the processor is used for: obtaining counter Three or more count values, include time interval between at least two groups count value in described three or more count values be the One preset time is calculated and is obtained at least two the based on at least two groups count value in described three or more count values Variable quantity in one preset time.
21. time updating device according to claim 19, which is characterized in that the processor by: respectively obtain based on Starting counter value and termination count value of the number device in more than two first preset times;Based on the counter described two Starting counter value and termination count value in a the first above preset time, calculate and obtain at least two first preset times Variable quantity.
22. time updating device according to claim 21, which is characterized in that the processor by: obtain it is described based on The overturning periodicity of number devices, based on starting counter value of the counter in described two the first above preset times and end The only overturning periodicity of count value and the counter calculates the variable quantity obtained at least two first preset times.
23. time updating device described in any one of 9-22 according to claim 1, which is characterized in that the processor is used for: When the quantity of the variable quantity of first preset time got be greater than two when, remove all first got it is default when Between variable quantity in maximum value and/or minimum value, to remaining first preset time after removal maximum value and/or minimum value Variable quantity carries out averaging processing.
24. time updating device described in any one of 9-22 according to claim 1, which is characterized in that the processor is used for: Averaging processing is carried out to the object variations amount at least two variable quantity got, wherein the object variations amount For variable quantity of the numerical values recited in the first preset range.
25. time updating device according to claim 19, which is characterized in that the processor is used for: to local zone time Carry out initialization process.
26. time updating device according to claim 25, which is characterized in that the processor is used for: receiving the second The inscribed universal time UTC, the UTC for transmitting and receiving equipment transmission of the second preset time after pulse PPS signal is corresponding At the time of the PPS signal rising edge or failing edge, the local zone time is updated to the UTC.
27. time updating device according to claim 26, which is characterized in that the processor by: obtain it is described based on Number device is in local zone time initial runtime to the variable quantity in the time at current time, based on the counter within the time The crystal oscillator frequency of variable quantity and the counter, determination deviation time are based on the deviation time, carry out to local zone time Amendment, obtains the time at current time.
28. time updating device according to claim 27, which is characterized in that the processor by: based on described The overturning periodicity and the counter of number device are in the count value of local zone time initial runtime and the counting at current time Value calculates and obtains the counter in local zone time initial runtime to the variable quantity in the time at current time.
29. the time updating device according to claim 27 or 28, which is characterized in that the processor is used for: being based on institute Deviation time and predetermined accumulated time error are stated, local zone time is modified, obtains the time at current time.
30. time updating device according to claim 26, which is characterized in that the processor is used for: receiving After stating UTC, based on the UTC and local zone time when receiving the UTC, local accumulated time error is updated.
31. time updating device according to claim 30, which is characterized in that the processor is used for: often receiving pre- If the UTC of quantity, primary local accumulated time error is updated.
32. time updating device according to claim 31, which is characterized in that the processor is used for: often receiving one A UTC calculates primary local accumulated time error, after receiving the UTC of preset quantity, to the preset quantity for calculating acquisition Accumulated time error carry out median filter process, obtain the intermediate value of the accumulated time error of the preset quantity, will be local Accumulated time error update is the intermediate value.
33. time updating device according to claim 32, which is characterized in that the processor is used for: receiving UTC When, if the absolute difference of the UTC and local zone time when receiving the UTC is less than the first preset threshold, it is determined that institute The corresponding accumulated time error of UTC is stated equal to preset value;If the difference of the UTC and local zone time when receiving the UTC Absolute value is greater than or equal to the first preset threshold, then the corresponding accumulated time error of the UTC is equal to before receiving the UTC Accumulated time error.
34. time updating device according to claim 32, which is characterized in that the processor is used for: receiving UTC When, if the absolute difference of the UTC and local zone time when receiving the UTC are greater than the second preset threshold, based on pre- If accumulated time error and second preset threshold between incidence relation, determine that the corresponding accumulated time of the UTC misses Difference;If the absolute difference of the UTC and local zone time when receiving the UTC are less than or equal to the described second default threshold Value, then the corresponding accumulated time error of the UTC is equal to the accumulated time error received before the UTC.
35. time updating device described in any one of 9-34 according to claim 1, which is characterized in that the processor is used for: Local zone time is updated based on predetermined period, the predetermined period is less than the overturning periodicity and the counter of the counter The ratio of crystal oscillator frequency.
36. a kind of time updating device characterized by comprising one or more processors;One or more of processors It works alone or synergistically;
The processor is used for: obtaining more than two unit time variable quantities of counter;To two of the counter with On unit time variable quantity carry out averaging processing, obtain the crystal oscillator frequency of the counter;Based on the crystal oscillator frequency, more New local zone time.
37. a kind of moveable platform characterized by comprising time more new clothes described in any one of claim 19-36 It sets.
38. a kind of computer readable storage medium, including instruction are executed when described instruction operation as in claim 1-18 Described in any item method for updating time.
CN201780026754.6A 2017-12-18 2017-12-18 Time updating method, device and movable platform Expired - Fee Related CN109154796B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/117010 WO2019119228A1 (en) 2017-12-18 2017-12-18 Method and apparatus for updating time, and movable platform

Publications (2)

Publication Number Publication Date
CN109154796A true CN109154796A (en) 2019-01-04
CN109154796B CN109154796B (en) 2021-04-06

Family

ID=64803839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780026754.6A Expired - Fee Related CN109154796B (en) 2017-12-18 2017-12-18 Time updating method, device and movable platform

Country Status (2)

Country Link
CN (1) CN109154796B (en)
WO (1) WO2019119228A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114545761A (en) * 2020-11-27 2022-05-27 辰芯科技有限公司 Local timing updating method, device, equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070054649A1 (en) * 2005-08-24 2007-03-08 Epson Toyocom Corporation Frequency stability measuring apparatus
CN101079687A (en) * 2006-05-25 2007-11-28 上海欣泰通信技术有限公司 A clock adjustment algorithm based on minimum two multiplexing model
CN101430372A (en) * 2007-11-07 2009-05-13 中国科学院微电子研究所 Low-cost time service and synchronization method and equipment for global positioning system receiver
CN101534003A (en) * 2009-04-14 2009-09-16 国电南瑞科技股份有限公司 Data synchronization method for digitized fiber differential protection device
CN101546169A (en) * 2009-04-15 2009-09-30 北京航空航天大学 Method and device for calibrating time
CN101895383A (en) * 2010-07-07 2010-11-24 中国人民解放军国防科学技术大学 External clock synchronization system and control flow thereof
CN102510320A (en) * 2011-10-28 2012-06-20 桂林电子科技大学 Clock source device based on GPS (global positioning system) and constant-temperature crystal oscillator and synchronous control method
WO2012098399A2 (en) * 2011-01-20 2012-07-26 Xnordic Semiconductor Asa Low-power oscillator
CN103427793A (en) * 2013-07-29 2013-12-04 国电南瑞科技股份有限公司 Time hacking and punctuality system and method based on temperature compensation
CN104330966A (en) * 2014-10-22 2015-02-04 中国人民解放军信息工程大学 Multi-mode high-precision time and frequency standard equipment
CN105158771A (en) * 2015-08-25 2015-12-16 中国科学院国家授时中心 Traceability model parameter generation method for satellite navigation system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6759910B2 (en) * 2002-05-29 2004-07-06 Xytrans, Inc. Phase locked loop (PLL) frequency synthesizer and method
US7579919B1 (en) * 2007-10-13 2009-08-25 Weixun Cao Method and apparatus for compensating temperature changes in an oscillator-based frequency synthesizer
US9084192B2 (en) * 2011-03-25 2015-07-14 Nec Corporation Synchronization device and synchronization method
CN102932084B (en) * 2012-10-17 2015-11-11 航天科工深圳(集团)有限公司 The method and system that sampling clock is synchronous

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070054649A1 (en) * 2005-08-24 2007-03-08 Epson Toyocom Corporation Frequency stability measuring apparatus
CN101079687A (en) * 2006-05-25 2007-11-28 上海欣泰通信技术有限公司 A clock adjustment algorithm based on minimum two multiplexing model
CN101430372A (en) * 2007-11-07 2009-05-13 中国科学院微电子研究所 Low-cost time service and synchronization method and equipment for global positioning system receiver
CN101534003A (en) * 2009-04-14 2009-09-16 国电南瑞科技股份有限公司 Data synchronization method for digitized fiber differential protection device
CN101546169A (en) * 2009-04-15 2009-09-30 北京航空航天大学 Method and device for calibrating time
CN101895383A (en) * 2010-07-07 2010-11-24 中国人民解放军国防科学技术大学 External clock synchronization system and control flow thereof
WO2012098399A2 (en) * 2011-01-20 2012-07-26 Xnordic Semiconductor Asa Low-power oscillator
CN102510320A (en) * 2011-10-28 2012-06-20 桂林电子科技大学 Clock source device based on GPS (global positioning system) and constant-temperature crystal oscillator and synchronous control method
CN103427793A (en) * 2013-07-29 2013-12-04 国电南瑞科技股份有限公司 Time hacking and punctuality system and method based on temperature compensation
CN104330966A (en) * 2014-10-22 2015-02-04 中国人民解放军信息工程大学 Multi-mode high-precision time and frequency standard equipment
CN105158771A (en) * 2015-08-25 2015-12-16 中国科学院国家授时中心 Traceability model parameter generation method for satellite navigation system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周文军 等: "《单片机仿真及制作项目教程——基于Proteus ISIS》", 30 April 2015 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114545761A (en) * 2020-11-27 2022-05-27 辰芯科技有限公司 Local timing updating method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2019119228A1 (en) 2019-06-27
CN109154796B (en) 2021-04-06

Similar Documents

Publication Publication Date Title
CN105610534B (en) A kind of multistation method for synchronizing time and equipment
CN103546583B (en) Group intellectual perception system and group intellectual perception method
CN101729461B (en) System and method for eliminating single-frequency interference and multi-frequency interference
CN109726198A (en) Method for processing abnormal data and device
CN103227623A (en) Step value-variable LMS (Least Mean Square) self-adaptation filtering algorithm and filter
CN108683482B (en) Method and device for estimating timing position
CN105677755B (en) A kind of method and device handling diagram data
CN107766291A (en) A kind of method of remaining time delay in acquisition very long baseline interferometry(VLBI
CN109765578A (en) Bus GPS equipment clock calibration method and device
CN107017959B (en) A kind of method and device improving punctual precision using clock synchronization
CN110414778A (en) Case work dispatching method and device
CN109154796A (en) Method for updating time, device and moveable platform
CN109495086A (en) A kind of inertia combination filtering method, device and equipment
CN109186571A (en) A kind of gyroscope filtering and noise reduction method
CN113588132A (en) Temperature processing method and device
CN109270836A (en) A kind of integrated signal extracting method, device and equipment
CN109739225A (en) Location data processing method, device, equipment, storage medium and vehicle
CN102739571B (en) Calibration steps, the Apparatus and system of receiving terminal IQ circuit-switched data
CN106469173B (en) A kind of other Weight Determination of problem priority, device, system and server
RU150924U1 (en) HIGH-PRECISION DEVICE FOR SYNCHRONIZATION OF PULSE-CODE SIGNALS WITH DETERMINED STRUCTURE
CN102377661A (en) Blade server and method for building shortest blade transmission path in blade server
CN101888364B (en) Carrier synchronization processing method and device
KR101831198B1 (en) Reduced complexity TWO-STEP TDOA/FDOA estimation method for communication signals
CN109510682A (en) A kind of pond server system BMC clock synchronizing method, device, terminal and storage medium
CN104252569B (en) A kind of method and device of graphical data comparison

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210406