JP2019045506A - Electronic apparatus, program, and acquisition method of date information - Google Patents

Electronic apparatus, program, and acquisition method of date information Download PDF

Info

Publication number
JP2019045506A
JP2019045506A JP2018213404A JP2018213404A JP2019045506A JP 2019045506 A JP2019045506 A JP 2019045506A JP 2018213404 A JP2018213404 A JP 2018213404A JP 2018213404 A JP2018213404 A JP 2018213404A JP 2019045506 A JP2019045506 A JP 2019045506A
Authority
JP
Japan
Prior art keywords
date
time
unit
calculated
width
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
JP2018213404A
Other languages
Japanese (ja)
Other versions
JP6741058B2 (en
Inventor
佑樹 尾下
Yuki Oshita
佑樹 尾下
幸佑 長谷川
Kosuke Hasegawa
幸佑 長谷川
剛志 松江
Tsuyoshi Matsue
剛志 松江
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Publication of JP2019045506A publication Critical patent/JP2019045506A/en
Application granted granted Critical
Publication of JP6741058B2 publication Critical patent/JP6741058B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electric Clocks (AREA)

Abstract

To provide an electronic apparatus capable of acquiring from a positioning satellite information required for acquiring an exact date while suppressing increase in power consumption, a program and an acquisition method of date information.SOLUTION: An electronic apparatus includes: a time counting part; a reception part for receiving a transmission wave from a positioning satellite; a reception control part for controlling a period of reception by the reception part; and a date acquisition part for acquiring a date from the reception radio wave. The reception control part allows only first date information to be received between the first date information on a first time unit transmitted by the positioning satellite and second date information on a second time unit of which unit width is greater than that of the first time unit. The time acquisition part includes: a date calculation portion for calculating the date on the basis of internal date information on the second time unit calculated from a date of the time counting part and the received first date information; and a date correction portion for correcting the calculated date on the basis of difference between the calculated date of the date calculation portion and the counted date of the time counting part.SELECTED DRAWING: Figure 5

Description

この発明は、外部から日時情報を取得する電子機器、プログラム及び日時情報の取得方法に関する。   The present invention relates to an electronic device that acquires date and time information from the outside, a program, and a method of acquiring date and time information.

従来、計時回路を備え、日時情報を保持する電子機器において、外部から正確な日時情報を取得して適宜計時回路の時刻を修正することが可能なものがある。適切な間隔で日時情報を取得することで、電子機器では、安価な水晶発振器などに基づく計時回路などであっても大きな時刻のずれを生じさせずに正確な日時の表示や動作を行うことが出来る。   2. Description of the Related Art Conventionally, there are electronic devices provided with a clock circuit and holding date and time information, and it is possible to obtain accurate date and time information from the outside and correct the time of the clock circuit appropriately. By acquiring date and time information at appropriate intervals, the electronic device can perform accurate date and time display and operation without causing a large time lag even in a timekeeping circuit based on an inexpensive crystal oscillator or the like. It can.

日時情報が取得される外部の日時情報出力先の一つとして、GPS(Global Positioning System)を始めとする測位システムに係る測位衛星がある。測位衛星から電波送信される信号(航法メッセージ)には、衛星の軌道情報(位置情報)、日時情報及び衛星のステータスなどが含まれるが、このうち日時情報を選択的に受信して取得することで、実用上問題の生じない精度の日時情報を短時間で取得することが出来る。   As an external date and time information output destination from which date and time information is acquired, there is a positioning satellite related to a positioning system such as GPS (Global Positioning System). Signals transmitted by radio waves from positioning satellites (navigation messages) include satellite orbit information (position information), date and time information, satellite status, etc. Of these, to selectively receive and acquire date and time information Thus, accurate date and time information that causes no practical problems can be acquired in a short time.

また、外部から日時情報を取得する他の技術として、例えば、長波長帯で送信されている標準電波を受信して日時情報を取得する技術、インターネットにおいてNTP(Network Time Protocol)サーバから日時情報を取得する技術、及びBluetooth(登録商標)による通信を用いて外部機器から日時情報を取得する技術が広く用いられている。また、通信電波の届き難い環境下などで外部接続されずに使用される電子機器では、ユーザの手動操作で日時の設定を行うことも可能である。   Also, as another technique for acquiring date and time information from the outside, for example, a technique for acquiring date and time information by receiving a standard radio wave transmitted in a long wavelength band, and on the Internet from NTP (Network Time Protocol) server 2. Description of the Related Art There are widely used techniques for acquiring date and time information from an external device using communication by Bluetooth (registered trademark). Further, in an electronic device used without being externally connected in an environment where communication waves do not easily reach, it is possible to set the date and time manually by the user.

これら各種の日時情報の取得方法には、一長一短がある。そこで、従来、これら複数の日時情報の取得方法を併用して適切に高精度な日時情報を取得する技術がある(特許文献1、特許文献2)。   There are pros and cons to the method of acquiring these various date and time information. Therefore, conventionally, there is a technology for appropriately acquiring high-precision date and time information by using a plurality of acquisition methods of date and time information together (Patent Document 1, Patent Document 2).

特開2002−71854号公報Japanese Patent Application Laid-Open No. 2002-71854 特開2001−51077号公報JP 2001-51077 A

しかしながら、測位衛星からの送信電波を受信して日時情報を取得する技術は、他の日時情報の取得方法と比較して消費電力が非常に大きく、電子機器の負荷が増大するという課題がある。   However, the technique of acquiring the date and time information by receiving the transmission radio wave from the positioning satellite has a problem that power consumption is very large compared with other acquisition methods of date and time information and the load on the electronic device is increased.

この発明の目的は、消費電力の増大を抑えながら、正確な日時を取得するために必要な情報を測位衛星から取得することが可能な電子機器、プログラム及び日時情報の取得方法を提供することにある。   An object of the present invention is to provide an electronic device, a program, and a method of acquiring date and time information capable of acquiring from a positioning satellite information required to acquire an accurate date and time while suppressing an increase in power consumption. is there.

本発明は、上記目的を達成するため、
日時を計数する計時部と、
測位衛星からの送信電波を受信する受信部と、
前記受信された送信電波から日時を取得する日時取得部と、
を備え、
前記日時取得部は、
前記受信部により受信された第1時間単位の第1日時情報と、前記計時部の日時から算出され、前記第1時間単位より単位幅が大きい第2時間単位の内部日時情報と、に基づいて、前記内部日時情報に係る範囲内の日時を算出する日時算出部と、
前記日時算出部により算出された日時と、前記計時部により計数されている日時と、の差分に基づいて前記算出された日時を補正する日時補正部と、
を有し、
前記日時補正部は、
前記差分が所定幅以上であるか否かを判別する誤差判定部と、
前記所定幅以上であると判別された場合に、前記算出された日時が前記計時部の日時から異なっている方向とは反対方向に、当該算出された日時を前記第2時間単位の単位幅分ずらした日時に補正する誤差整合部と、
を有することを特徴とする電子機器である。
The present invention achieves the above object by
Timekeeping section which counts date and time,
A receiving unit that receives a radio wave transmitted from a positioning satellite;
A date and time acquisition unit for acquiring a date and time from the received transmission radio wave;
Equipped with
The date and time acquisition unit
Based on the first date and time information of the first time unit received by the receiving unit, and internal date and time information of the second time unit calculated from the date and time of the time counting unit and having a unit width larger than the first time unit. A date and time calculation unit that calculates a date and time within a range related to the internal date and time information;
A date and time correction unit that corrects the calculated date and time based on a difference between the date and time calculated by the date and time calculation unit and the date and time counted by the time counting unit;
Have
The date and time correction unit
An error determination unit that determines whether the difference is equal to or greater than a predetermined width;
When it is determined that the calculated width is equal to or more than the predetermined width, the calculated date is divided by the unit width of the second time unit in the direction opposite to the direction in which the calculated date is different from the date of the timekeeping unit. An error matching unit that corrects the shifted date and time;
An electronic device characterized by comprising:

本発明に従うと、消費電力の増大を抑えながら、正確な日時を取得するために必要な情報を測位衛星から取得することが出来るという効果がある。   According to the present invention, it is possible to obtain information necessary for obtaining an accurate date and time from a positioning satellite while suppressing an increase in power consumption.

本発明の第1実施形態の電子時計の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the electronic timepiece of 1st Embodiment of this invention. GPS衛星からの送信電波のフォーマットを説明する図である。It is a figure explaining the format of the transmission electric wave from a GPS Satellite. 第1実施形態のGPS受信処理部の制御部が実行する日時算出処理の制御手順を示すフローチャートである。It is a flowchart which shows the control procedure of the date calculation process which the control part of the GPS reception process part of 1st Embodiment performs. 入出力の日付に大きなずれが生じる場合のパターンを示す図表である。It is a chart showing a pattern when a big gap occurs in the date of input and output. 第1実施形態の日時取得処理の制御手順を示すフローチャートである。It is a flowchart which shows the control procedure of the date acquisition process of 1st Embodiment. GPS受信処理部に入力された計時回路の曜日とGPS受信処理部から出力された曜日とに対する日時取得処理での処理内容を示す図表である。It is a table which shows the processing content in the date acquisition process with respect to the day of the time-measurement circuit input into the GPS reception process part, and the day of the week output from the GPS reception process part. 第2実施形態の日時算出処理の制御手順を示すフローチャートである。It is a flowchart which shows the control procedure of the date calculation process of 2nd Embodiment. 第2実施形態の日時取得処理の制御手順を示すフローチャートである。It is a flowchart which shows the control procedure of the date acquisition process of 2nd Embodiment. 日時算出処理の変形例を示すフローチャートである。It is a flowchart which shows the modification of a date calculation process. 日時取得処理の変形例を示すフローチャートである。It is a flow chart which shows the modification of date acquisition processing.

以下、本発明の実施の形態を図面に基づいて説明する。
[第1実施形態]
先ず、第1実施形態の電子機器について説明する。
図1は、本発明の電子機器の第1実施形態である電子時計1の内部構成を示すブロック図である。
Hereinafter, embodiments of the present invention will be described based on the drawings.
First Embodiment
First, the electronic device of the first embodiment will be described.
FIG. 1 is a block diagram showing the internal configuration of an electronic timepiece 1 which is a first embodiment of the electronic device of the present invention.

この電子時計1は、CPU(Central Processing Unit)41(日付取得タイミング判別部、表示制御部)と、ROM(Read Only Memory)42と、RAM(Random Access Memory)43と、発振回路44と、分周回路45と、計時回路46(計時部)と、操作部47と、表示部48及び表示ドライバ49と、GPS受信処理部50及びそのアンテナ51と、温度センサ52と、電源部53などを備えている。   The electronic timepiece 1 includes a central processing unit (CPU) 41 (date acquisition timing determination unit, display control unit), a read only memory (ROM) 42, a random access memory (RAM) 43, an oscillation circuit 44, and A peripheral circuit 45, a clocking circuit 46 (clocking unit), an operation unit 47, a display unit 48 and a display driver 49, a GPS reception processing unit 50 and its antenna 51, a temperature sensor 52, a power supply unit 53, etc. ing.

CPU41は、各種演算処理を行い、電子時計1の全体動作を統括制御する。CPU41は、計時回路46の現在の日時データを読み出して表示部48に表示させると共に、プログラム42aの実行によりGPS受信処理部50を動作させて日時データを取得し、当該取得データに基づいて、計時回路46が計数する日時を修正する。   The CPU 41 performs various arithmetic processing to integrally control the overall operation of the electronic timepiece 1. The CPU 41 reads out the current date and time data of the timer circuit 46 and causes the display unit 48 to display the data, and operates the GPS reception processing unit 50 by executing the program 42a to acquire date and time data, and measures time based on the acquired data. The date and time counted by the circuit 46 is corrected.

ROM42は、制御用の各種プログラムや初期設定データなどを記憶して格納する。ROM42に格納されるプログラムには、計時回路46の計数する現在の日時を修正するための処理に係るプログラム42aが含まれる。
RAM43は、CPU41に作業用のメモリ空間を提供し、作業データや各種設定データを記憶する。RAM43には、修正履歴記憶部43a(履歴記憶部)が含まれ、直近の日時修正履歴に係る情報を記憶する。
The ROM 42 stores and stores various control programs and initial setting data. The program stored in the ROM 42 includes a program 42 a related to a process for correcting the current date and time counted by the timer circuit 46.
The RAM 43 provides a work memory space to the CPU 41, and stores work data and various setting data. The RAM 43 includes a correction history storage unit 43a (history storage unit), and stores information related to the latest date and time correction history.

発振回路44は、所定の周波数信号を生成して出力する。発振回路44は、例えば、水晶発振器を備えている。
分周回路45は、発振回路44から入力された所定の周波数信号をCPU41や計時回路46が利用する各周波数の信号に分周して各々出力する。
The oscillator circuit 44 generates and outputs a predetermined frequency signal. The oscillator circuit 44 includes, for example, a crystal oscillator.
The frequency dividing circuit 45 divides a predetermined frequency signal input from the oscillating circuit 44 into signals of respective frequencies used by the CPU 41 and the timer circuit 46, and outputs the signals.

計時回路46は、現在の日付及び時刻(日時)を計数する。計時回路46は、分周回路45から入力されたクロック信号を計数し、日時の初期値に加算していくことで現在の日時データを保持するカウンタである。計時回路が計数する値は、独自の基準タイミングからの経過時間に応じた値であっても良いし、UTC(協定世界時)などによる日時の形(年月日時分秒)のものであっても良い。計時回路46の初期値は、電源投入時には、図示略のRTC(Real Time Clock)が参照されて設定されるとともに、日時修正に係るプログラム42aの実行に応じてCPU41により上書き修正される。
この計時回路46により計数される日時には、発振回路44の水晶発振器が生成する周波数信号の周波数誤差に応じた計時誤差(歩度)が含まれる。通常の電子時計1で用いられる発振回路44の水晶発振器による計時回路46の計時誤差としては、例えば、月当たり約15秒である。
The clock circuit 46 counts the current date and time. The clock circuit 46 is a counter that counts the clock signal input from the frequency divider circuit 45 and adds it to the initial value of date and time to hold current date and time data. The value counted by the timing circuit may be a value corresponding to the elapsed time from its own reference timing, or in the form of date and time (year-month-day-hour-second) by UTC (Coordinated Universal Time) etc. Also good. When the power is turned on, the initial value of the clock circuit 46 is set with reference to an RTC (Real Time Clock) (not shown), and is overwritten and corrected by the CPU 41 according to the execution of the program 42a related to date and time correction.
The date and time counted by the clock circuit 46 includes a clock error (rate) according to the frequency error of the frequency signal generated by the crystal oscillator of the oscillator circuit 44. The timing error of the timing circuit 46 by the crystal oscillator of the oscillation circuit 44 used in the normal electronic timepiece 1 is, for example, about 15 seconds per month.

操作部47は、ユーザの入力操作を受け付けて、入力信号として電気信号をCPU41に出力する。操作部47は、押しボタンスイッチ、りゅうずやタッチセンサなどのうち一又は複数を備え、これらの押下、回転、接触などの予め定められた各種操作が検出されて操作内容に対応する電気信号が生成される。   The operation unit 47 receives an input operation of the user and outputs an electric signal to the CPU 41 as an input signal. The operation unit 47 includes one or more of a push button switch, a crown, a touch sensor, and the like, and various predetermined operations such as pressing, rotation, and contact are detected, and an electric signal corresponding to the operation content is detected. It is generated.

表示部48は、特には限られないが、デジタル式の表示画面を備え、現在の日時に加えて電子時計1で実行可能な種々の機能に係る表示を選択的に又は並行して行う。表示画面としては、例えば、液晶ディスプレイ(LCD)が用いられ、また、表示ドライバ49には、当該LCDを駆動する液晶ドライバが用いられる。表示ドライバ49は、CPU41から入力された制御信号に基づいてLCDの駆動信号をLCDに出力する。或いは、表示部48は、デジタル表示画面に加えて又は代えて、一又は複数の指針を備え、駆動回路により駆動されるステッピングモータの回転により当該指針が回転動作されて日時やステータスの一部又は全部をアナログ表示することが可能な構成であっても良い。
これらの表示部48及び表示ドライバ49により報知手段が構成される。
The display unit 48 includes, but is not limited to, a digital display screen, and selectively or in parallel displays displays relating to various functions executable by the electronic timepiece 1 in addition to the current date and time. As the display screen, for example, a liquid crystal display (LCD) is used, and as the display driver 49, a liquid crystal driver for driving the LCD is used. The display driver 49 outputs a drive signal of the LCD to the LCD based on the control signal input from the CPU 41. Alternatively, the display unit 48 includes one or more hands in addition to or instead of the digital display screen, and the hands are rotated by the rotation of the stepping motor driven by the drive circuit, or a part of date and time or status The configuration may be such that all can be displayed in analog.
The display unit 48 and the display driver 49 constitute notification means.

GPS受信処理部50は、アンテナ51を用いて一又は複数の測位衛星、ここでは、GPSに係る測位衛星(以下、GPS衛星と記す)から電波を受信し、日時情報を取得する。ここで、日時情報とは、GPS衛星の内部時計(GPS時計)が計数する日時(GPS日時)に対応した値及びこれに付随する情報であり、GPS受信処理部50は、当該値に対して後述する伝播時間による遅延などに基づく処理を行った後にUTC日時に変換して出力する。
GPS受信処理部50は、L1帯(GPS衛星では、1.57542GHz)の電波の受信回路(フロントエンド)と、受信、復調された信号を解読して日付や位置の情報を取得するためのベースバンド部とを備える。ベースバンド部には、動作制御を行うためのCPU、RAM及び不揮発性メモリを有するマイコン(受信制御部)が含まれ、このマイコンがCPU41からの制御命令を受けてGPS受信処理部50の動作を制御する。ベースバンド部は、複数のGPS衛星の中から受信可能なものを探索して当該GPS衛星の受信周波数に同調し、また、復号するためのC/Aコード(擬似ランダムコード)を同定する。また、GPS受信処理部50は、受信されたGPS衛星からの送信電波を復調、復号して日時データを取得し、設定されたフォーマットでCPU41に出力する。
これらのGPS受信処理部50及びアンテナ51により受信部が構成される。
The GPS reception processing unit 50 receives radio waves from one or more positioning satellites, here, positioning satellites related to GPS (hereinafter referred to as GPS satellites) using the antenna 51, and acquires date and time information. Here, the date and time information is a value corresponding to the date and time (GPS date and time) counted by the internal clock (GPS clock) of the GPS satellite and information attached thereto, and the GPS reception processing unit 50 After processing based on a delay due to propagation time, which will be described later, it is converted to UTC date and output.
The GPS reception processing unit 50 is a reception circuit (front end) of radio waves in the L1 band (1.57542 GHz for GPS satellites) and a base for decoding the received and demodulated signals and acquiring date and position information And a band unit. The baseband unit includes a CPU for performing operation control, a microcomputer (reception control unit) having a RAM and a non-volatile memory, and the microcomputer receives the control command from the CPU 41 to operate the GPS reception processing unit 50. Control. The baseband unit searches a plurality of GPS satellites that can be received, tunes to the reception frequency of the GPS satellite, and identifies a C / A code (pseudo-random code) to be decoded. Also, the GPS reception processing unit 50 demodulates and decodes the transmission radio wave from the received GPS satellite to acquire date and time data, and outputs the data to the CPU 41 in the set format.
The GPS reception processing unit 50 and the antenna 51 constitute a receiving unit.

GPS受信処理部50は、予め設定入力された日時情報を用いて、受信された航法メッセージデータの一部から得られる日時を補完して現在の日時を算出することが出来る。詳しい算出方法については、後に詳述する。
CPU41と、GPS受信処理部50とにより日時取得部が構成される。
The GPS reception processing unit 50 can calculate the current date and time by complementing the date and time obtained from a part of the received navigation message data using date and time information set and input in advance. The details of the calculation method will be described later.
The CPU 41 and the GPS reception processing unit 50 constitute a date and time acquisition unit.

温度センサ52は、周辺温度を計測する。この温度センサ52には、通常用いられるICチップセンサを用いることが出来、CPU41、ROM42やRAM43と共に同一のチップ上に形成されても良い。   The temperature sensor 52 measures the ambient temperature. A commonly used IC chip sensor can be used as the temperature sensor 52, and the temperature sensor 52 may be formed on the same chip together with the CPU 41, the ROM 42 and the RAM 43.

電源部53は、電子時計1の各部に電力を供給する。電源部53は、例えば、ボタン型或いは円盤状の一次電池といったバッテリを有し、この一次電池は、必要に応じて着脱交換可能となっている。   The power supply unit 53 supplies power to each unit of the electronic timepiece 1. The power supply unit 53 has, for example, a battery such as a button type or disk-shaped primary battery, and this primary battery can be attached and detached as needed.

次に、本実施形態の電子時計1における日時修正の動作について説明する。
図2は、GPS衛星からの送信電波のフォーマットを説明する図である。
Next, the operation of date and time correction in the electronic timepiece 1 of the present embodiment will be described.
FIG. 2 is a diagram for explaining the format of a transmission radio wave from a GPS satellite.

GPS衛星は、符号データが所定長に亘り配列された航法メッセージデータを衛星ごとに固有のC/Aコードで位相変調して50bpsで送信している。航法メッセージデータは、300ビット長(6秒)のサブフレームを5つ含むフレームデータ(1500ビット)を単位として送信される。航法メッセージの全データは、25フレーム(ページ)で構成され、これらを全て受信するのには、12.5分を要する。   The GPS satellites transmit, at 50 bps, phase modulation of navigation message data in which code data is arranged over a predetermined length for each satellite with a unique C / A code. The navigation message data is transmitted in units of frame data (1500 bits) including five subframes 300 bits long (6 seconds). The entire data of the navigation message consists of 25 frames (pages) and it takes 12.5 minutes to receive them all.

各フレームにおいて、サブフレーム1〜3には、当該サブフレームごとの日付及び時刻を示す日時情報、GPS衛星の健康状態や電離層の状態などを示すステータス情報、及びGPS衛星の軌道情報(エフェメリスデータ)が含まれる。また、サブフレーム4、5では、全てのGPS衛星に関する予測軌道情報(アルマナックデータ)が25フレームに分割されて送信される。   In each frame, subframes 1 to 3 include date and time information indicating date and time for each subframe, status information indicating GPS satellite health status and ionospheric status, etc., and GPS satellite orbit information (ephemeris data) Is included. In subframes 4 and 5, predicted orbit information (almanac data) on all GPS satellites is divided into 25 frames and transmitted.

各サブフレームは、30ビット長(0.6秒)のワード(WORD)10個で構成される。このうち、先頭のWORD1には、22ビットのTLM(テレメトリワード)が含まれ、このTLMは、固定された8ビットの符号配列であるPreamble(プリアンブル)で開始される。また、WORD2には、22ビットのHOW(Hand Over Word、第1日時情報)が含まれる。このHOWには、日曜日の0時(下限)を始点として土曜日の24時(上限)を終点とする週内の経過時間(第1時間単位)を示すTOW−Countが17ビット含まれている。このTOW−Countの値(Zカウントとも呼ばれる)は、当該TOW−Countを含むサブフレームの最後端のタイミング、即ち、次のサブフレームの先頭の送信タイミングでの週内経過時間を示す。そして、サブフレーム1におけるWORD3の先頭では、1980年1月6日を基準とした週番号(第2時間単位)を示すWN(第2日時情報)が10ビットで送信される。また、各ワードの末尾には、6ビットのパリティ情報が含まれ、当該パリティ情報をチェックすることにより当該ワードの復号が正確に行われたか否かの判定を行うことが出来る。   Each subframe is made up of 10 words (WORD) 30 bits long (0.6 seconds). Among them, the first WORD 1 includes a 22-bit TLM (telemetry word), and this TLM starts with a preamble (preamble) which is a fixed 8-bit code array. Also, WORD 2 includes 22-bit HOW (Hand Over Word, first date and time information). The HOW includes 17 bits of TOW-Count indicating an elapsed time (first time unit) in a week starting at 0 o'clock (lower limit) on Sunday and ending at 24:00 (upper limit) on Saturday. The value of this TOW-Count (also referred to as Z count) indicates the timing of the end of the subframe including the TOW-Count, that is, the intra-week elapsed time at the transmission timing of the beginning of the next subframe. Then, at the head of WORD 3 in subframe 1, WN (second date and time information) indicating a week number (second time unit) based on January 6, 1980 is transmitted with 10 bits. In addition, 6 bits of parity information are included at the end of each word, and it is possible to determine whether the word has been correctly decoded by checking the parity information.

GPS衛星から送信される日時(GPS日時)、即ち、TOW−Count及びWNの値では、うるう秒が考慮されていない。1980年1月6日以降に実施されたうるう秒により生じているGPS日時のUTC日時からの累積のずれの値(オフセット値)は、ページ18のサブフレーム4で別途送信されている。従って、UTC日時は、取得されたGPS日時からこのオフセット値が差し引かれる(減算される)ことで得られる。このうるう秒に係るオフセット値は、2014年10月9日現在では、16回のうるう秒の挿入により+16秒となっている。   In the date and time (GPS date and time) transmitted from the GPS satellites, that is, the values of TOW-Count and WN, the leap second is not considered. The cumulative deviation value (offset value) from the UTC date and time caused by the leap second implemented on or after January 6, 1980 is separately transmitted in subframe 4 of the page 18. Therefore, the UTC date and time is obtained by subtracting (subtracting) this offset value from the acquired GPS date and time. As of October 9, 2014, the offset value for this leap second is +16 seconds by 16 insertions of leap seconds.

ここで、計時回路46が保持している日時データに一週間以上のずれがないと想定される場合には、計時回路46の日時を参照することで、WNを取得する必要が無い。上述のように、計時回路46で生じる日時の誤差は、月当たり15秒程度、即ち、一日当たり0.5秒程度であるので、長期間(例えば、数年)程度日時の修正がなされずに放置されていても1日以上のずれは生じない。従って、ユーザが手動で異なる日時に変更した場合、バッテリが消耗して計時回路46の計数値データがクリアされた場合や、予め設定された期間以上日時の修正がなされない状況などで確認的にWNを取得する場合を除き、計時回路46の計数する日付とTOW−Countを組み合わせることで、通常では、HOWの受信、解読だけで正確な日時を同定することが出来る。   Here, when it is assumed that the date and time data held by the timer circuit 46 do not deviate by more than one week, it is not necessary to obtain WN by referring to the date and time of the timer circuit 46. As described above, since the error of the date and time generated in the timing circuit 46 is about 15 seconds per month, that is, about 0.5 seconds per day, the date and time is not corrected for a long period (for example, several years). Even if it is left, there will be no more than one day of deviation. Therefore, when the user manually changes to a different date and time, the battery is exhausted and the count value data of the clock circuit 46 is cleared, or the situation where the date and time is not corrected for a predetermined period or more is confirmed. By combining the date counted by the clock circuit 46 and TOW-Count, except when WN is acquired, it is usually possible to identify an accurate date only by receiving and deciphering the HOW.

この場合、電子時計1では、何れかのサブフレームにおけるPreambleが検出されることで、当該サブフレームにおけるデータの位置が同定され、これに引き続いてHOWのデータが取得されることで、当該週内の日付及び時刻が特定される。即ち、PreambleとHOWを受信するのに必要な時間は、2〜3ワード分の1〜2秒程度となる。従って、計時回路46の保持している日時データのずれ量を見積もることが可能な場合には、適切なタイミングでGPS衛星からの送信電波の受信を開始して上述の時間程度に亘り動作させる(受信期間)ことで、効率良くHOWデータが取得される。   In this case, the electronic timepiece 1 detects the preamble in any subframe to identify the position of the data in the subframe, and subsequently acquires the data of the HOW, whereby the within the week. Date and time are identified. That is, the time required to receive the preamble and the HOW is about 1 to 2 seconds corresponding to 2 to 3 words. Therefore, when it is possible to estimate the shift amount of the date and time data held by the clock circuit 46, the reception of the transmission radio wave from the GPS satellite is started at an appropriate timing to operate for about the above-mentioned time ( The HOW data is efficiently acquired by the reception period).

なお、1つのGPS衛星からの送信電波のみを用いて日時データを取得する場合には、当該GPS衛星と受信地点との間の正確な距離を求めることが出来ないので、60msec〜85msec程度の伝播時間による遅延を正確に見積もることが出来ない。そこで、取得された日時から一律に、例えば、70msec程度進めることで、約15msec以内のずれで現在の日時データを取得することとしても良い。これにより、受信時間を延長せず、即ち、電力消費を増大させずに時計の実用上問題のない程度の小さな誤差範囲内で略正確な日時情報を取得することが出来る。   In the case of acquiring date and time data using only a transmission radio wave from one GPS satellite, it is not possible to obtain an accurate distance between the GPS satellite and the receiving point, so propagation of about 60 msec to 85 msec is possible. The delay due to time can not be estimated accurately. Therefore, the current date and time data may be acquired with a deviation of about 15 msec or less by, for example, approximately 70 msec uniformly from the acquired date and time. As a result, it is possible to obtain substantially accurate date and time information within a small error range that does not cause any problem in practical use of the watch without extending the reception time, that is, without increasing the power consumption.

上述のうるう秒に係るオフセット値の情報、WNの周期番号のデータや、必要に応じて用いられる夏時間の実施情報、タイムゾーンに係る情報などの特殊な情報は、予め別途保持されている必要がある。これらの情報は、ここでは、GPS受信処理部50の記憶部(マイコンの不揮発性メモリ)に予め記憶されている。また、これらの情報は、ユーザの操作により手動で設定更新されても良く、うるう秒に係るオフセット値の情報は、定期的に(例えば、年に2回)GPS衛星からの送信電波(ページ18のサブフレーム4)が受信、解読されることで取得されても良い。   Special information such as offset value information related to the leap second, data of the cycle number of WN, daylight saving time implementation information used as needed, and information related to the time zone need to be separately stored in advance. is there. Here, these pieces of information are stored in advance in the storage unit (nonvolatile memory of the microcomputer) of the GPS reception processing unit 50. In addition, these pieces of information may be manually set and updated by the operation of the user, and the information of the offset value related to the leap second may be periodically (for example, twice a year) transmitted radio waves from the GPS satellites (page 18) Subframe 4) may be acquired by being received and deciphered.

図3は、本実施形態の電子時計1のGPS受信処理部50の制御部(マイコンのCPU)が実行する日時算出処理の制御手順を示すフローチャートである。
この日時算出処理は、CPU41から日時情報の取得命令が入力された場合に開始される。
FIG. 3 is a flowchart showing a control procedure of date and time calculation processing executed by the control unit (CPU of the microcomputer) of the GPS reception processing unit 50 of the electronic timepiece 1 of the present embodiment.
The date and time calculation process is started when an acquisition command of date and time information is input from the CPU 41.

制御部は、命令と共にCPU41から日付が入力されたか否かを判別する(ステップS201)。日付が入力されたと判別された場合には(ステップS201で“YES”)、制御部は、当該日付からWNに当たる週番号(第2時間単位)の値(内部日時情報)を逆算して計算する(ステップS202)。ここでは、特には限られないが、GPS日時における日付が直接入力されても良いし、UTC日時が入力され、記憶部に記憶されたうるう秒のオフセット値に係る情報が参照されてUTC日時をGPS日時に変換し、当該GPS日時における日付が取得されても良い。或いは、この日時算出処理では、UTC日時の日付がそのまま取得されても良い。制御部は、取得された日付からWNを算出する。それから、制御部は、適切なタイミングで電波受信を開始してGPS衛星からの電波に同調、信号を復調し、検出されたPreambleの位置を基準としてHOWを取得する(ステップS203)。それから、制御部の処理は、ステップS204に移行する。   The control unit determines whether a date has been input from the CPU 41 together with the command (step S201). If it is determined that the date has been input ("YES" in step S201), the control unit calculates the value (internal time and date information) of the week number (second time unit) corresponding to WN from the date and calculates it. (Step S202). Here, although not particularly limited, the date on the GPS date and time may be directly input, or the UTC date and time may be input, and information on the offset value of the leap second stored in the storage unit may be referred to It may be converted to GPS date and time, and the date on the GPS date and time may be acquired. Alternatively, in this date and time calculation process, the date of UTC date and time may be acquired as it is. The control unit calculates WN from the acquired date. Then, the control unit starts radio wave reception at an appropriate timing to tune to the radio wave from the GPS satellite, demodulates the signal, and acquires the HOW based on the detected position of the preamble (step S203). Then, the process of the control unit proceeds to step S204.

日付が入力されなかったと判別された場合には(ステップS201で“NO”)、制御部は、電波受信を開始して、GPS衛星からの電波に同調、復調し、検出されたPreambleの位置を基準としてHOW及びWNを取得する(ステップS213)。それから、制御部の処理は、ステップS204に移行する。   If it is determined that the date has not been input ("NO" in step S201), the control unit starts radio wave reception, tunes and demodulates to the radio wave from the GPS satellite, and detects the detected preamble position. The HOW and WN are acquired as the reference (step S213). Then, the process of the control unit proceeds to step S204.

ステップS203又はステップS213の処理からステップS204の処理に移行すると、制御部は、日時データの受信に成功したか否かを判別する(ステップS204)。成功したと判別された場合には(ステップS204で“YES”)、制御部は、取得されたWN及びHOWのデータから年月日及び時刻を算出する(ステップS205)。制御部は、取得されたWN及びHOWを単純に組み合わせ、WNの周期番号に応じてGPS日時を取得した後、GPS受信処理部50の記憶部に記憶されたうるう秒補正データを参照してUTC日時に変換を行う。なお、電子時計1の想定寿命がWNの周期(約19.6年)より短い場合には、周期番号を用いずにWNの値に対応する週を直接同定することが出来る構成であっても良い。   When the process proceeds from step S203 or step S213 to step S204, the control unit determines whether the reception of date and time data has succeeded (step S204). If it is determined that the process has succeeded ("YES" in step S204), the control unit calculates the date and time from the acquired WN and HOW data (step S205). The control unit simply combines the acquired WN and HOW, obtains the GPS date and time according to the cycle number of WN, and then refers to the leap second correction data stored in the storage unit of the GPS reception processing unit 50 with UTC. Convert to date and time. If the estimated life of the electronic timepiece 1 is shorter than the cycle of WN (about 19.6 years), the week corresponding to the value of WN can be directly identified without using the cycle number. good.

ステップS204の判別処理で、日時データの受信に成功しなかったと判別された場合には(ステップS204で“NO”)、制御部は、日付及び時刻としてNULL(データ無し)に設定する(ステップS215)。ここでは、年月日のうちの日(特に、週内における日の値、即ち、日単位の順番を示す曜日)が第3時間単位である。   If it is determined in the determination process of step S204 that the reception of date and time data is not successful ("NO" in step S204), the control unit sets NULL (no data) as the date and time (step S215). ). Here, the day of the year (in particular, the day of the week, that is, the day of the week indicating the order of the day) is the third time unit.

ステップS205又はステップS215の処理に続いて、制御部は、算出されたUTC日時を出力する(ステップS206)。そして、制御部は、日時算出処理を終了する。   Following the process of step S205 or step S215, the control unit outputs the calculated UTC date and time (step S206). Then, the control unit ends the date and time calculation process.

ここで、上述のように、計時回路46が計数する日時に小さなずれのみが含まれるのであれば、通常、計時回路46の計数する日付と受信された航法メッセージから取得される日付とが同一となり、日付の変わり目付近、即ち、0時頃に航法メッセージが受信された場合にのみ、日付のずれが生じる。このとき、TOW−Countは、日曜日の0時を始点とし土曜日の24時を終点とする週内の経過時間を示しているので、同一週内で日付のずれがあっても正しく曜日(週内における日単位の順番)と時刻が取得される一方、週の変わり目、即ち、土曜日と日曜日の変わり目を跨ぐと、小さな日時のずれであってもTOW−Countが異なる周期、即ち、前の週の値に変更になってしまう、又は翌週の値に変更になってしまう場合がある。その結果、計時回路46が計数する日時に応じたWNが、大きく値の変化したTOW−Countと組み合わされることで、求められる日時に正確な日時から7日近いずれが生じることになる。   Here, as described above, if only a small deviation is included in the date and time counted by the clock circuit 46, the date counted by the clock circuit 46 and the date acquired from the received navigation message are usually the same. The date shift occurs only when a navigation message is received near the turn of the date, ie, around 0 o'clock. At this time, since TOW-Count indicates the elapsed time in the week starting at 0 o'clock on Sunday and ending at 24 o'clock on Saturday, the day of the week is correct even if there is a date shift within the same week The order of the day) and the time are acquired while the time of change of the week, ie, the change of Saturday and Sunday is straddled, the TOW-Count is different even if it is a small time shift, ie, the cycle of the previous week It may change to the value or change to the next week's value. As a result, by combining WN according to the date and time counted by the timer circuit 46 with the TOW-Count having a large value change, nearly 7 days from the accurate date and time will occur in the required date and time.

また、計時回路46の計数する日時に係る日付が属するWNと、GPS衛星から取得されたWNとが異なる場合としては、上記の場合に加えて、WNを取得したタイミングと、GPS衛星からHOWを受信するタイミングや当該受信されたHOWに基づいて日時を出力するタイミングとの間に時間差がある場合がある。   In addition to the above case, the timing at which the WN is acquired, the timing at which the WN is acquired, and the HOW from the GPS satellite are different as the case where the WN to which the date related to the date and time counted by the time counting circuit 46 belongs is different from the WN There may be a time difference between the timing of receiving and the timing of outputting date and time based on the received HOW.

取得されたTOW−Countを用いて算出された年月日及び時刻の出力タイミングは、当該TOW−Countに係る次のサブフレームの先頭のタイミングとは異なり得る。例えば、あるサブフレームのWORD2が受信されてHOWが取得された後、2回目の各秒の先頭のタイミング(秒同期点、約1.8秒後)に同期して年月日及び時刻を出力する場合、WN及びHOWから得られた日時、即ち、次のサブフレームの先頭タイミングにおける日時より3秒早い年月日及び時刻が算出されて出力されることになる。反対に、WORD2でHOWが取得されて日時が算出された後、更に次のサブフレームのHOWが取得されて、当該取得されたHOWに係るTOW−Countと算出された日時との整合を確認してから1回目又は2回目の秒同期点に同期させて日時を出力する場合には、1度目のHOWに係るTOW−Countから得られる当該次のサブフレームの先頭タイミングにおける日時よりも2秒又は3秒遅い年月日及び時刻が算出されて出力されることになる。   The output timing of the date and time calculated using the acquired TOW-Count may be different from the timing of the beginning of the next subframe related to the TOW-Count. For example, after WORD 2 of a certain subframe is received and HOW is acquired, the date and time are output in synchronization with the leading timing (second synchronization point, about 1.8 seconds after) of the second each second In this case, the date and time obtained 3 seconds earlier than the date and time obtained from WN and HOW, that is, the date and time at the start timing of the next subframe, are calculated and output. Conversely, after the HOW is acquired in WORD2 and the date is calculated, the HOW of the next subframe is further acquired, and the matching between the TOW-Count related to the acquired HOW and the calculated date is confirmed. When the date and time are output in synchronization with the first or second second synchronization point, the time is 2 seconds or more than the date and time at the start timing of the next subframe obtained from TOW-Count related to the first HOW. The date and time three seconds later will be calculated and output.

更に、計時回路46の計数する日時をUTC日時で入力してGPS日時に変換する際と算出されたGPS日時をUTC日時に変換する際に、うるう秒に係るオフセット値分の日時変化で日付、特に、週が変化する場合がある。このとき、入力されたUTC日時と、算出されたGPS日時の出力タイミングとに応じて一方でのみ週が変化する場合、一週間異なる同一曜日のWNが得られてしまう場合がある。   Furthermore, when converting the GPS date and time calculated by inputting the date and time counted by the clock circuit 46 as UTC date and time and converting the GPS date and time calculated to UTC date and time, the date and time changes by the offset value for the leap second. In particular, the week may change. At this time, if the week changes only on the basis of the input UTC date and time and the output timing of the calculated GPS date and time, WN of the same day different on one week may be obtained.

図4は、入出力の日付に大きなずれが生じる場合のパターンを示す図表である。
以下では、うるう秒オフセットが+16秒であり、また、取得されたTOW−Countに応じた日時から3秒以内で先行するタイミングで日時が出力されるものとして説明する。また、図4において入力日WNと出力日WNは、入力日(計時UTC日時の日付)と出力日(出力UTC日時の日付)がそれぞれどの日曜日の0時から土曜日の24時前までの周期に属するかを示す番号であるが、計時GPS日時から実際に算出される算出WNと、出力GPS日時、即ち、GPS受信処理部50がTOW−CountだけではなくWNを取得したとした場合に取得されるはずのWNに基づく週番号である正確なWNは、GPS衛星からの送信フォーマットに合わせて土曜日の23時59分54秒で1が加算される値である。また、ここでは、計時回路46の計数する日時と正確な日時との間に1日以上のずれはないものとする。
FIG. 4 is a chart showing a pattern when a large deviation occurs in the date of input and output.
In the following description, it is assumed that the leap second offset is +16 seconds, and the date and time is output at a timing that precedes the date and time according to the acquired TOW-Count within three seconds. Also, in FIG. 4, the input date WN and the output date WN have a cycle from 0 o'clock on Sunday to 24 o'clock on Saturday, which is the date of input (date of UTC counting time) and the date of output (date of UTC date of output). It is a number indicating whether it belongs, but it is acquired when the calculated WN actually calculated from the clocked GPS date and time, the output GPS date and time, that is, the GPS reception processing unit 50 acquires not only TOW-Count but WN. The correct WN, which is a week number based on the WN that is supposed to be, is a value to which 1 is added at 23:59:54 on Saturday according to the transmission format from the GPS satellites. Also, here, it is assumed that there is no difference of one day or more between the date and time counted by the timer circuit 46 and the accurate date and time.

図4(a)に示すように、計時回路46のUTC日時(ずれを含んでいて良い)が週番号WN=n(nは10ビットで表される任意の整数の何れか)における土曜日の日時であり、且つ、取得されたTOW−Countの値が次の週(WN=n+1)の日曜日の日時であった場合、WN=nと当該TOW−Countとが組み合わされて、正確な日時から一週間前の日時が得られる。この場合、入力されたUTC日時の日付と出力されたUTC日時の日付との差は、6日となる。   As shown in FIG. 4A, the UTC date and time (which may include a shift) of the clock circuit 46 is the Saturday date and time when the week number WN = n (n is any integer represented by 10 bits). And if the acquired TOW-Count value is a Sunday date and time of the next week (WN = n + 1), then WN = n and the TOW-Count concerned are combined to obtain one from the correct date and time. The date and time before the week is obtained. In this case, the difference between the input UTC date and time and the output UTC date and time is 6 days.

一方、図4(b)に示すように、計時回路46のUTC日時が週番号WN=nの週における日曜日の日時であり、且つ、取得されたTOW−Countの値が前の週(WN=n−1)の土曜日の日時であった場合、WN=nと当該TOW−Countとが組み合わされて、正確な日時から一週間後の日時が得られる。この場合、入力されたUTC日時の日付と出力されたUTC日時の日付との差は、6日となる。   On the other hand, as shown in FIG. 4B, the UTC date and time of the clock circuit 46 is the date and time of Sunday in the week of the week number WN = n, and the value of the acquired TOW-Count is the previous week (WN = N). In the case of the Saturday date and time n-1), WN = n and the TOW-Count are combined to obtain the date and time one week after the correct date and time. In this case, the difference between the input UTC date and time and the output UTC date and time is 6 days.

また、図4(c)に示すように、計時回路46から入力されたUTC日時が週番号WN=nの土曜日における23時59分38秒より前である場合、当該UTC日時に基づくGPS日時(23時59分54秒となるタイミング前)から算出されるWNは、この土曜日を含む週の値(WN=n)となる。このときにGPS受信処理部50で取得されたTOW−Countが0〜3である場合、当該WNとTOW−Countの組合せで得られるGPS日時は、本来得られるべき翌週の週番号(WN=n+1)より一週間前の週WN=nにおける日曜の値となり、出力タイミングでのGPS日時は、前の週(WN=n−1)の土曜日における23時59分57秒以降日曜日(WN=n)の0時0分21秒より前となる。更に、この出力タイミングでのGPS日時が日曜の0時0分16秒より前の場合には、出力されるUTC日時は、週番号WN=n−1の週の土曜日における23時59分41秒以降24時0分0秒前となって、この出力されたUTC日時の日付は、入力されたUTC日時の日付(WN=nの土曜日)に対して−7日ずれて一週間前の土曜日の日時が出力されることになる。   Also, as shown in FIG. 4C, when the UTC date and time input from the clock circuit 46 is earlier than 23:59:38 on Saturday of the week number WN = n, the GPS date and time based on the UTC date and time ( The WN calculated from the timing (23:59:54) before that becomes the value of the week including this Saturday (WN = n). At this time, when the TOW-Count acquired by the GPS reception processing unit 50 is 0 to 3, the GPS date and time obtained by the combination of the WN and TOW-Count is the week number of the next week to be originally acquired (WN = n + 1 The Sunday's value in the week WN = n one week earlier than the week), and the GPS date and time at the output timing is Sunday (WN = n) after 23:59:57 on the Saturday of the previous week (WN = n-1) It will be earlier than 0:01:21. Furthermore, when the GPS date and time at this output timing is before 00:00:16 on Sunday, the UTC date and time to be output is 23:59:41 on the Saturday of the week number WN = n-1 After this, the output UTC date and time becomes 24 days earlier than the date of the UTC date and time (WN = n Saturday), which is 24 days earlier than the date of the UTC date and time that was 24: 0: 00. The date and time will be output.

図4(d)に示すように、計時回路46から入力されたUTC日時が週番号WN=nの土曜日における23時59分38秒以降の同日中(即ち、土曜日の24時0分0秒より前)である場合、当該UTC日時(土曜日)に基づくGPS日時から算出されるWNは、翌日日曜日の週の値(WN=n+1)となる。このとき、GPS受信処理部50で取得されたTOW−Countが86403以上の場合、WNとTOW−Countとの組合せで得られるGPS日時は、本来より一週間後の週(WN=n+1)における日曜の値となり、出力タイミングでのGPS日時は、翌週(WN=n+1)の土曜日における0時0分15秒以降で23時59分54秒より前となる。更に、この出力されるGPS日時が土曜日の0時0分16秒以降の場合には、出力されるUTC日時は、週番号WN=n+1の土曜日における0時0分0秒以降23時59分38秒前となって、この出力されたUTC日時の日付は、入力されたUTC日時の日付(WN=nの週の土曜日)に対して+7日ずれて一週間後の土曜日の日時が出力されることになる。   As shown in FIG. 4 (d), the UTC date and time input from the clocking circuit 46 is the same day as 23:59:38 on Saturday of the week number WN = n (that is, from 24:00:00 on Saturday). In the case of the previous), the WN calculated from the GPS date and time based on the UTC date and time (Saturday) becomes the value of the Sunday of the next day (WN = n + 1). At this time, when the TOW-Count acquired by the GPS reception processing unit 50 is 86403 or more, the GPS date and time obtained by the combination of WN and TOW-Count is Sunday in the week (WN = n + 1) one week after the original The GPS date and time at the output timing is earlier than 23:59:54 on 00:00:15 on Saturday of the next week (WN = n + 1). Furthermore, when the GPS date and time to be output is after 00:00:16 on Saturday, the UTC date and time to be output is from 23:59:38 on Saturday of week number WN = n + 1. This output UTC date / time is shifted by +7 days from the input UTC date / time (WN = n week's Saturday), and the date / time after one week is output. It will be.

図5は、本実施形態の電子時計1でCPU41が実行する日時取得処理の制御手順を示すフローチャートである。   FIG. 5 is a flowchart showing a control procedure of date and time acquisition processing executed by the CPU 41 in the electronic timepiece 1 of the present embodiment.

この日時取得処理が開始されると、CPU41は、前回の日時取得処理における出力がエラーであったか否かを判別する(ステップS101)。エラー出力であったと判別された場合には(ステップS101で“YES”)、CPU41は、GPS受信処理部50に電波の受信を開始させて、HOWとWNに基づく日時を算出させる(ステップS143)。CPU41は、GPS受信処理部50に当該算出された日時を出力させて取得する(ステップS144)。それから、CPU41の処理は、ステップS127に移行する。   When this date and time acquisition process is started, the CPU 41 determines whether or not the output in the previous date and time acquisition process is an error (step S101). If it is determined that the output is an error ("YES" in step S101), the CPU 41 causes the GPS reception processing unit 50 to start receiving a radio wave, and calculates a date and time based on the HOW and WN (step S143) . The CPU 41 causes the GPS reception processing unit 50 to output and acquire the calculated date and time (step S144). Then, the processing of the CPU 41 shifts to step S127.

エラー出力ではなかったと判別された場合には(ステップS101で“NO”)、CPU41は、GPS受信処理部50に上述の日時算出処理を開始させて、計時回路46の計数、保持する日付又は日時のデータをUTC日時でGPS受信処理部50に出力する(ステップS102)。   If it is determined that the error is not output ("NO" in step S101), the CPU 41 causes the GPS reception processing unit 50 to start the above-described date and time calculation processing, and counts the clock circuit 46, the date or date to be held. Are output to the GPS reception processing unit 50 as UTC date and time (step S102).

次に、CPU41は、GPS受信処理部50に電波の受信を開始させて、ステップS102の処理で出力した計時回路46の日時データによりステップS202の処理で算出されるGPS時計におけるWNの値と、ステップS203の処理で受信、取得されるHOWと、に基づいて日時を算出させる(ステップS103)。即ち、GPS受信処理部50は、ステップS205の処理で、WNの値で確定された週内におけるHOWで特定された週内経過時間により日時を算出する。そして、CPU41は、算出されたUTC日時をGPS受信処理部50から出力させて取得する(ステップS104)。   Next, the CPU 41 causes the GPS reception processing unit 50 to start reception of radio waves, and the value of WN in the GPS clock calculated in the process of step S202 from the date and time data of the clock circuit 46 output in the process of step S102; The date and time is calculated based on the HOW received and acquired in the process of step S203 (step S103). That is, the GPS reception processing unit 50 calculates the date and time from the elapsed time in the week specified by the HOW within the week determined by the value of WN in the process of step S205. Then, the CPU 41 causes the GPS reception processing unit 50 to output and acquire the calculated UTC date and time (step S104).

更に、CPU41は、ステップS102の処理でGPS受信処理部50に入力した日時が土曜日であるか否かを判別する(ステップS105)。土曜日であると判別された場合には(ステップS105で“YES”)、CPU41は、出力された日付と入力した日付との差が6日(所定のずれ幅)であるか否かを判別する(ステップS106)。差が6日であると判別された場合には(ステップS106で“YES”)、CPU41は、入力した日付に1日を加算した日付(即ち、出力された日付からWNの単位幅(第2時間単位の単位幅)に相当する7日を減算した日付と等しい)に出力日時の日付を変更して取得し(ステップS107)、日時取得処理を終了する。差が6日ではないと判別された場合には(ステップS106で“NO”)、CPU41の処理は、ステップS118に移行する。   Furthermore, the CPU 41 determines whether the date and time input to the GPS reception processing unit 50 in the process of step S102 is a Saturday (step S105). When it is determined that it is a Saturday ("YES" in step S105), the CPU 41 determines whether or not the difference between the output date and the input date is 6 days (a predetermined deviation width). (Step S106). If it is determined that the difference is 6 days ("YES" in step S106), the CPU 41 adds a date to the input date by one day (that is, the unit width of WN from the output date (second The date of the output date is changed and acquired to be equal to the date obtained by subtracting 7 days corresponding to the unit width of the time unit) (step S107), and the date acquisition process is ended. If it is determined that the difference is not six days ("NO" in step S106), the processing of the CPU 41 shifts to step S118.

CPU41は、入出力の日付差が7日であるか否かを判別する(ステップS118)。日付差が7日ではないと判別された場合には(ステップS118で“NO”)、CPU41の処理は、ステップS126に移行する。日付差が7日であると判別された場合には(ステップS118で“YES”)、CPU41は、出力された日時の日付を入力した日時の日付に変更して(即ち、出力された日時の日付に対し、WNの単位幅に相当する7日を加減算する処理と等しい)日時を取得する(ステップS119)。そして、CPU41は、日時取得処理を終了する。   The CPU 41 determines whether the date difference between the input and output is seven days (step S118). If it is determined that the date difference is not 7 days ("NO" in step S118), the processing of the CPU 41 shifts to step S126. If it is determined that the date difference is 7 days ("YES" in step S118), the CPU 41 changes the date of the output date to the date of the input date (ie, the date of the output date) The date and time is acquired (the same as the process of adding and subtracting 7 days corresponding to the unit width of WN) to the date) (step S119). Then, the CPU 41 ends the date and time acquisition process.

入力日時の日付が土曜日ではないと判別された場合(ステップS105で“NO”)、CPU41は、次に、入力日時の日付が日曜日であるか否かを判別する(ステップS115)。日曜日であると判別された場合には(ステップS115で“YES”)、CPU41は、出力された日付と入力した日付との差が6日であるか否かを判別する(ステップS116)。差が6日であると判別された場合には(ステップS116で“YES”)、CPU41は、入力した日付から1日を減算した日付(即ち、出力された日付に7日を加算した日付と等しい)に出力日時の日付を変更して取得し(ステップS117)、日時取得処理を終了する。差が6日ではないと判別された場合には(ステップS116で“NO”)、CPU41の処理は、ステップS126に移行する。   If it is determined that the date of the input date is not a Saturday ("NO" in step S105), the CPU 41 then determines whether the date of the input date is a Sunday (step S115). If it is determined that it is a Sunday ("YES" in step S115), the CPU 41 determines whether the difference between the output date and the input date is 6 days (step S116). When it is determined that the difference is 6 days ("YES" in step S116), the CPU 41 determines that the date obtained by subtracting 1 day from the input date (ie, the date obtained by adding 7 days to the output date) The date of the output date is changed and acquired to be equal (step S117), and the date acquisition process ends. If it is determined that the difference is not six days ("NO" in step S116), the processing of the CPU 41 shifts to step S126.

入力した日付が日曜日ではないと判別された場合(ステップS115で“NO”)、ステップS118の判別処理で日付差が7日ではないと判別された場合、及びステップS116の処理で日付差が6日ではないと判別された場合の何れかに該当する場合には、CPU41は、入力した日付と出力された日付との差が2日以上である(1日(所定幅)より大きい)か否かを判別する(ステップS126)。2日以上ではないと判別された場合には(ステップS126で“NO”)、CPU41は、出力された日付をそのまま取得し(ステップS127)、日時取得処理を終了する。2日以上であると判別された場合には(ステップS126で“YES”)、CPU41は、日付の出力をエラーとして(ステップS137)、日時取得処理を終了する。
なお、極小のモータ(ステッピングモータ)で指針を動作させているアナログ式の電子時計においては、磁気を発生する機器の影響を受けるとモータの正常な回転が狂ってしまい、指針が指し示す位置の遅れや進みが生じ、場合によっては指針が止まってしまうこともある。そこで、2日以上であると判別された場合(ステップS126で“YES”)であっても、CPU41は、出力された日付をそのまま取得する(ステップS127に移行する)ようにしても良い。
If it is determined that the input date is not Sunday ("NO" in step S115), if it is determined in the determination process of step S118 that the date difference is not 7 days, or if the date difference is 6 in the process of step S116. If it is determined that the date is not a day, the CPU 41 determines whether the difference between the input date and the output date is 2 days or more (greater than 1 day (predetermined width)). It is determined (step S126). If it is determined that it is not two days or more ("NO" in step S126), the CPU 41 acquires the output date as it is (step S127), and ends the date acquisition process. If it is determined that it is two days or more ("YES" in step S126), the CPU 41 sets the date output as an error (step S137), and ends the date acquisition process.
In an analog electronic watch in which the pointer is operated by a very small motor (stepping motor), the normal rotation of the motor is deviated under the influence of the device generating magnetism, and the delay of the position indicated by the pointer In some cases, the pointer may stop. Therefore, even if it is determined that the date is two days or more ("YES" in step S126), the CPU 41 may obtain the output date as it is (shift to step S127).

ステップS107、S117、S119、S127の何れかの処理で日時が取得された場合には、CPU41は、当該取得された日時に基づいて計時回路46の日時を修正し、また、当該取得の履歴を取得日時と共に修正履歴記憶部43aに記憶させる。   When the date and time is acquired by the process in any one of steps S107, S117, S119, and S127, the CPU 41 corrects the date and time of the clock circuit 46 based on the acquired date and time, and the history of the acquisition It is stored in the correction history storage unit 43a together with the acquisition date and time.

図6は、GPS受信処理部50に入力された計時回路46の曜日とGPS受信処理部から出力された曜日とに対する日時取得処理での処理内容を示す図表である。   FIG. 6 is a chart showing processing contents in the date and time acquisition processing for the day of the week of the timing circuit 46 input to the GPS reception processing unit 50 and the day of the week output from the GPS reception processing unit.

図6(a)に示すように、GPS受信処理部50に日曜日の日時が入力されて、土曜日の日時が出力された場合、この日時取得処理では、出力された土曜日の日付から7日減算されて日時が取得される。例えば、UTC日時で2013年9月15日の0時01分がGPS受信処理部50に入力された場合で、正確なUTC日時が2013年9月14日23時58分であった場合、GPS受信処理部50から出力される日付は、9月15日の週の2013年9月21日23時58分となるので、この21日から7日を引いて、9月14日に変更される。   As shown in FIG. 6A, when the date of Sunday is input to the GPS reception processing unit 50 and the date of Saturday is output, in this date acquisition process, seven days are subtracted from the date of the output Saturday. Date is acquired. For example, if 0:01 on September 15, 2013 is input to the GPS reception processing unit 50 as UTC date and time, and if the correct UTC date and time is 23:58 on September 14, 2013, GPS Since the date output from the reception processing unit 50 is 23:58 on September 21, 2013, on the week of September 15, this date is changed from September 21 by subtracting 7 days from this 21st .

反対に、GPS受信処理部50に土曜日の日時が入力されて、日曜日の日時が出力された場合、この日時取得処理では、出力された日曜日の日付に7日加算されて日時が取得される。例えば、2013年9月14日23時58分がGPS受信処理部50に入力された場合で、正確な時刻が2013年9月15日0時01分であった場合、GPS受信処理部50から出力される日付は、9月14日の週の9月8日0時01分となるので、この日付に7日を加算して、9月15日0時01分に変更される。   Conversely, when the date and time of Saturday is input to the GPS reception processing unit 50 and the date and time of Sunday is output, in the date and time acquisition processing, the date and time are acquired by adding 7 days to the date of Sunday output. For example, if 23:58 on September 14, 2013 is input to the GPS reception processing unit 50, and if the accurate time is 0:01 on September 15, 2013, the GPS reception processing unit 50 Since the date to be output is 0:01 on September 8 of the week of September 14, 7 days are added to this date, and the date is changed to 0:01 on September 15.

また、土曜日の日時が入力されて土曜日の日時が出力された場合(図6(a)の記号「*」の位置に対応)、入力日と同日が出力される場合の他、上述のように、7日異なる土曜日の日時が出力される場合がある。この場合、本実施形態の日時取得処理では、当該7日が加減算された日付、即ち、元の入力日付に変更される。例えば、GPS受信処理部50に2013年9月14日23時59分00秒が入力されて、正確なUTC日時が2013年9月14日23時59分50秒であった場合、GPS受信処理部50から出力される日付は、9月7日23時59分50秒となるので、この出力日付の代わりに入力日付を用いて(或いは、出力日付に7日を加算して)、9月14日23時59分50秒に変更される。   In addition, when the date and time of Saturday is input and the date and time of Saturday are output (corresponding to the position of the symbol “*” in FIG. 6A), the same as the input date is output as described above , 7 days different Saturday date and time may be output. In this case, in the date and time acquisition process of the present embodiment, the date is changed to the date on which the seven days are added or subtracted, that is, the original input date. For example, when the GPS reception processing unit 50 is input with September 14, 2013 at 23:59:00 and the correct UTC date and time is at September 14, 2013, 23:59:50, GPS reception processing is performed. Since the date output from the section 50 is 23:59:50 on September 7, use the input date instead of this output date (or add 7 days to the output date), September It is changed to 23:59:50 on 14th.

GPS受信処理部50に月曜日から金曜日の日時が入力された場合で、同じ曜日又は前後の曜日が出力された場合には、当該曜日の日付が正しいものとしてそのまま取得される。また、日曜日の日時が入力されて日曜日又は月曜日の日時が出力された場合や、土曜日の日時が入力されて金曜日又は土曜日の日時が出力された場合についても、当該曜日の日付は正しいものとされる。   When the date of Monday to Friday is input to the GPS reception processing unit 50 and the same day or the days before and after are output, the date of the day is acquired as it is as the correct day. In addition, even when the date of Sunday is input and the date of Sunday or Monday is output, or when the date of Saturday is input and the date of Friday or Saturday is output, the date of the relevant day is regarded as correct. Ru.

本実施形態の電子時計1では、日付に2日以上6日未満のずれがある場合には、出力エラーとして出力された日時の取得を行わない。例えば、9月14日0時01分が入力されて、9月12日23時58分が出力された場合には、日付に2日のずれがあるので、当該出力された日時の取得を行わないこととする。   In the electronic timepiece 1 of the present embodiment, when there is a difference of 2 to 6 days in the date, the date and time output as an output error is not acquired. For example, when 0:01 on September 14 is input and 23:58 on September 12 is output, there is a difference of 2 days in the date, so acquisition of the output date is performed It shall not be.

以上のように、本実施形態の電子時計1は、日時を計数する計時回路46と、GPS衛星からの送信電波を受信するGPS受信処理部50、及びアンテナ51と、を備える。そして、GPS受信処理部50のマイコンは、GPS衛星からの電波受信期間を制御し、CPU41は、受信された送信電波から日時を取得する。
GPS受信処理部50のマイコンは、GPS衛星が送信する秒単位の週内経過時間情報(HOW)と、週単位の週番号情報(WN)とのうち、週内経過時間情報のみをGPS受信処理部50で受信し、計時回路46が計数する日時から算出される週番号情報と、GPS受信処理部50により受信された週内経過時間情報と、に基づいて、特定された週番号情報に係る範囲内の日時を算出する。そして、このGPS受信処理部50により算出された日時と、計時回路46により計数されている日時と、の差分に基づいて計時回路46の日時を補正する。
これにより、週番号情報を取得するための受信動作を省略することが出来るので、GPS衛星からの電波の受信時間が短縮されて消費電力の増大を抑えることが出来、一方で、週未満の時刻及びその同期タイミングを取得するので、効率良く正確な日時を取得するために必要な情報を受信することが出来る。
As described above, the electronic timepiece 1 of the present embodiment includes the time counting circuit 46 for counting the date and time, the GPS reception processing unit 50 for receiving the transmission radio wave from the GPS satellite, and the antenna 51. Then, the microcomputer of the GPS reception processing unit 50 controls the radio wave reception period from the GPS satellite, and the CPU 41 acquires the date and time from the received transmission radio wave.
The microcomputer of the GPS reception processing unit 50 performs GPS reception processing of only the elapsed time information in the week among the weekly elapsed time information (HOW) in seconds transmitted by the GPS satellite and the weekly number information (WN) in weekly units. Pertaining to the identified week number information based on the week number information received by the unit 50 and calculated from the date and time counted by the clock circuit 46, and the weekly elapsed time information received by the GPS reception processing unit 50. Calculate the date and time within the range. Then, based on the difference between the date and time calculated by the GPS reception processing unit 50 and the date and time counted by the clock circuit 46, the date and time of the clock circuit 46 is corrected.
As a result, since the receiving operation for acquiring the week number information can be omitted, the reception time of the radio wave from the GPS satellite can be shortened, and the increase of the power consumption can be suppressed. And since the synchronization timing is acquired, it is possible to receive information necessary for acquiring the accurate date and time efficiently.

また、GPS受信処理部50で算出された日時が計時回路46により計数されている日時に対して、1週間の中で計時回路46の計時誤差に基づいて定められる所定幅(ここでは、6日)以上異なるか否かを判別し、所定幅以上異なると判別された場合に、算出された日時を当該異なる方向と反対側に1週間ずらす。
従って、計時回路46の計時誤差により計時回路46が計数する日時と、GPS衛星から受信され、GPS受信処理部50から出力される日時との間で週末を跨ぐような場合に、計時誤差として想定されないような大きなずれを判別して出力日時を1週間移動させることで、容易な処理で正確な日時を取得することが出来る。
Also, with respect to the date and time when the date and time calculated by the GPS reception processing unit 50 is counted by the clock circuit 46, a predetermined width determined on the basis of the clock error of the clock circuit 46 within one week (here, 6 days ) If it is determined that they differ by a predetermined width or more, the calculated date and time are shifted for one week in the opposite direction to the different direction.
Therefore, in the case of crossing a weekend between the date and time counted by the clocking circuit 46 due to the clocking error of the clocking circuit 46 and the date and time received from the GPS satellite and output from the GPS reception processing unit 50, it is assumed as clocking error. It is possible to acquire an accurate date and time by an easy process by determining such a large deviation and moving the output date and time by one week.

また、特に、GPS衛星から送信されるHOWを受信することで、計時回路46の時刻がずれていても各サブフレームにおいて短い間隔で、即ち、短い受信時間で週内経過時間を取得することが出来る。   Also, in particular, by receiving the HOW transmitted from the GPS satellite, it is possible to acquire the elapsed time in a week at short intervals in each subframe, that is, in a short reception time, even if the time of the clock circuit 46 is shifted. It can.

また、特に、CPU41は、計時回路46が計数する日時とGPS衛星から受信されたHOWとに基づいて算出された日付が日曜日又は土曜日の場合に、当該算出された日付と、計時回路46により計数されている日付と、の差が6日以上であるか否かを判別することで、ずれ方向が更に容易に特定され、また、本当に計時回路46の計数する日時がずれている場合やHOWデータからの日時の誤解読を容易に識別することが出来るので、更に容易且つ確実な処理で正確な日付を取得することが出来る。   In particular, when the date calculated based on the date and time counted by the clock circuit 46 and the HOW received from the GPS satellite is Sunday or Saturday, the CPU 41 counts the calculated date and the clock circuit 46. By determining whether the difference between the current date and the date is 6 days or more, the shift direction can be specified more easily, and the date and time counted by the clock circuit 46 may actually be shifted or the HOW data Since it is possible to easily identify the misinterpretation of the date and time from the date, it is possible to obtain an accurate date with easy and reliable processing.

特に、日付の差で週番号の誤解読を識別するので、当該誤解読に係る判別処理を容易に行うことが出来る。
また、うるう秒を考慮しないGPS日時とUTC日時との差を複雑な処理なく適切に反映して週番号の誤解読を識別することが出来る。
In particular, since the misdecoding of the week number is identified by the date difference, it is possible to easily perform the discrimination process relating to the misdecoding.
In addition, it is possible to identify the misdecoding of the week number by appropriately reflecting the difference between the GPS date and time without taking into account the leap second and the UTC time without complicated processing.

また、算出された日付と計時回路46により計数されている日付との差が2日以上6日未満の範囲にある場合には、算出された日付を取得して現在の日時として利用しない。従って、通常想定される計時誤差より大きいずれがある場合、例えば、ユーザが手動で日付をずらした場合や、電子時計1の動作不良などで大きく日付がずれた場合には、意図的なずれを中途半端に戻そうとしたり、更には、不正確な日時に合わせたりするのではなく、現状を維持したり、GPS衛星からのWNの受信を行ったりさせるといったユーザの判断に委ねることが出来る。   If the difference between the calculated date and the date counted by the timing circuit 46 is in the range of 2 days to less than 6 days, the calculated date is acquired and not used as the current date. Therefore, when there is a deviation larger than the time error normally expected, for example, when the user manually shifts the date or when the date is largely deviated due to the malfunction of the electronic timepiece 1 or the like, the intentional deviation is It is possible to leave it to the user's judgment, such as maintaining the current state or causing the reception of WN from GPS satellites, instead of trying to return to halfway or not to adjust to an incorrect date and time.

また、このような場合に、GPS受信処理部50のマイコンは、再度GPS衛星からの電波の受信動作を行わせて、HOW及びWNの両方を受信することで正確な日時を取得することとすることで、素早く正確な日時表示に戻すことが出来る。   Also, in such a case, the microcomputer of the GPS reception processing unit 50 performs the reception operation of the radio wave from the GPS satellite again, and acquires both the HOW and the WN to acquire the correct date and time. You can quickly return to the correct date and time display.

また、表示部48を備え、CPU41により当該表示部48の動作を制御して日時を表示可能とした電子時計1に本発明を適用することで、電力消費を抑えながら長期間安定且つ継続的に正確な日時情報を表示部48に表示させて、ユーザに正確な日時を知得させることが出来る。   Further, by applying the present invention to the electronic timepiece 1 having the display unit 48 and capable of displaying the date and time by controlling the operation of the display unit 48 by the CPU 41, the power consumption can be suppressed stably for a long time while suppressing power consumption. The accurate date and time information can be displayed on the display unit 48 to allow the user to know the accurate date and time.

また、本発明に係るプログラムを、計時回路46、GPS受信処理部50及びアンテナ51を有する電子機器にインストールして時刻情報を取得する処理を行わせることで、当該電子機器において広く電力消費の低減と正確な日時情報の取得とを両立させることが出来る。   In addition, by installing the program according to the present invention in an electronic device having the clock circuit 46, the GPS reception processing unit 50, and the antenna 51 and performing processing for acquiring time information, power consumption is widely reduced in the electronic device. And accurate acquisition of date and time information.

[第2実施形態]
次に、本発明の電子機器の第2実施形態について説明する。
本発明の電子機器の第2実施形態である電子時計1の内部構成は、第1実施形態の電子時計1と同一であり、同一の符号を用いることとして説明を省略する。
Second Embodiment
Next, a second embodiment of the electronic device of the present invention will be described.
The internal configuration of the electronic timepiece 1 according to the second embodiment of the electronic device of the present invention is the same as that of the electronic timepiece 1 according to the first embodiment, and the explanation will be omitted by using the same reference numerals.

本実施形態の電子時計1における日時の取得動作について説明する。
上記第1実施形態の電子時計1では、GPS受信処理部50においてGPS日時で処理を行い、CPU41とGPS受信処理部50との間での入出力にはUTC日時が用いられて、CPU41により当該UTC日時を用いて日時の修正が行われることとしたが、この第2実施形態の電子時計1では、日時修正の処理がGPS受信処理部50でGPS日時に基づいて行われ、CPU41は、GPS受信処理部50から出力される日時をそのまま取得する。
従って、本実施形態の電子時計1における日時取得処理では、計時回路46の計数するUTC日時に応じたGPS日時の日付と、取得されたGPS日時の日付は、同一週内のものに限られ、入出力の日付差が7日にはならない。即ち、図6(b)に示すように、土曜日の日時が入力されて土曜日の日時が出力された場合には、必ず同日の日時が出力されることになる。
The acquisition operation of the date and time in the electronic timepiece 1 of the present embodiment will be described.
In the electronic timepiece 1 according to the first embodiment, the GPS reception processing unit 50 performs processing based on the GPS date and time, and the UTC date and time is used for input and output between the CPU 41 and the GPS reception processing unit 50. Although the correction of the date and time is performed using the UTC date and time, in the electronic timepiece 1 of the second embodiment, the process of the date and time correction is performed by the GPS reception processing unit 50 based on the GPS date and time. The date and time output from the reception processing unit 50 is acquired as it is.
Therefore, in the date and time acquisition process in the electronic timepiece 1 of the present embodiment, the date of the GPS date and time according to the UTC date and time counted by the clock circuit 46 and the acquired GPS date and time are limited to those within the same week, The date difference between input and output is not 7 days. That is, as shown in FIG. 6 (b), when the date of Saturday is input and the date of Saturday is output, the date of the same day is always output.

更に、入力された日時から算出するWN及びTOW−Countとして、当該入力日時が含まれるサブフレームの先頭のタイミングにおける値(即ち、上記第1実施形態のWN及びTOW−CountよりもTOW−Countで1カウント分遅れた値)を算出することで、TOW−CountのリセットとWNの増加が日曜日の0時0分0秒に行われることとすることが出来る。また、これに伴い、GPS衛星から取得されたWN及びTOW−CountをTOW−Countで1カウント分差し引いて用いる。GPS受信処理部50からの出力タイミングでのGPS日時は、これらのWN及びTOW−Countで得られる日時に対して当該サブフレームの先頭から出力タイミングまでの経過時間(例えば、3秒や8秒)を加算することで得られ、このGPS日時から更にうるう秒オフセット値(+16秒)を差し引くことで、当該出力タイミングでのUTC日時が得られる。   Furthermore, as the WN and TOW-Count calculated from the input date and time, the value at the timing of the beginning of the sub-frame in which the input date and time is included (in other words, TOW-Count rather than WN and TOW-Count in the first embodiment) By calculating the value delayed by one count), the reset of TOW-Count and the increase of WN can be performed at 0: 0: 0 on Sunday. Also, along with this, WN and TOW-Count obtained from GPS satellites are used by subtracting one count in TOW-Count. The GPS date and time at the output timing from the GPS reception processing unit 50 is the elapsed time from the beginning of the corresponding subframe to the output timing with respect to the date and time obtained by these WN and TOW-Count (for example, 3 seconds and 8 seconds) By subtracting the leap second offset value (+16 seconds) from the GPS date and time, the UTC date and time at the output timing can be obtained.

図7は、本実施形態の電子時計1において実行される日時算出処理のGPS受信処理部50の制御部による制御手順を示すフローチャートである。
この日時算出処理では、第1実施形態の電子時計1においてCPU41により実行された日時取得処理と、GPS受信処理部50の制御部により実行された日時算出処理のそれぞれ一部が組み合わされている。具体的には、本実施形態の電子時計1における日時算出処理では、第1実施形態の電子時計1における日時算出処理のうち、ステップS201、S202、S206の処理がそれぞれステップS201a、S202a、S206aの処理に置き換えられ、ステップS203〜S205、S213,S215の処理がそのまま用いられている。また、第1実施形態の電子時計1における日時取得処理のうち、ステップS105、S107、S115、S117の処理がそれぞれステップS105a、S107a、S115a、S117aの処理に置き換えられ、また、ステップS106、S116、S126、S127、S137の処理がそのまま用いられている。更に、ステップS221の処理が新たに追加されている。
第1実施形態の各処理と同一の処理については、同一の符号を付して詳しい説明を省略する。
FIG. 7 is a flowchart showing a control procedure by the control unit of the GPS reception processing unit 50 in the date and time calculation process executed in the electronic timepiece 1 of the present embodiment.
In this date and time calculation process, part of each of the date and time acquisition process performed by the CPU 41 in the electronic timepiece 1 of the first embodiment and the date and time calculation process performed by the control unit of the GPS reception processing unit 50 is combined. Specifically, in the date and time calculation process of the electronic timepiece 1 of the present embodiment, the processes of steps S201, S202, and S206 in the date and time calculation process of the electronic timepiece 1 of the first embodiment are steps of S201a, S202a, and S206a, respectively. The processing of steps S203 to S205, S213, and S215 is used as it is. Further, among the date and time acquisition processing in the electronic timepiece 1 of the first embodiment, the processing of steps S105, S107, S115, and S117 is replaced with the processing of steps S105a, S107a, S115a, and S117a, respectively, and steps S106, S116, The processes of S126, S127, and S137 are used as they are. Furthermore, the process of step S221 is newly added.
About the processing same as each processing of a 1st embodiment, the same numerals are attached and detailed explanation is omitted.

本実施形態の日時算出処理では、制御部は、日時がCPU41から入力されたか否かを判別する(ステップS201a)。日時が入力されたと判別されると(ステップS201a)、制御部は、当該日時(UTC日時)をGPS日時に変換の上、WNを算出する(ステップS202a)。制御部は、GPS衛星からの受信データからHOWを取得し、TOW−Countを同定する(ステップS203)。   In the date and time calculation process of the present embodiment, the control unit determines whether or not the date and time is input from the CPU 41 (step S201a). When it is determined that the date and time have been input (step S201a), the control unit converts the date and time (UTC date and time) into GPS date and time and calculates WN (step S202a). The control unit acquires the HOW from the reception data from the GPS satellites, and identifies TOW-Count (step S203).

日時が入力されていないと判別された場合には(ステップS202aで“NO”)、制御部は、GPS衛星からの受信データからWNとHOW(TOW−Count)とを取得する(ステップS213)。   If it is determined that the date and time has not been input ("NO" in step S202a), the control unit acquires WN and HOW (TOW-Count) from the reception data from the GPS satellites (step S213).

ステップS205の処理で日時が算出されると、制御部は、ステップS201aの判別処理でCPU41から日時の入力があったと判別されたか否かを判別する(ステップS221)。CPU41から日時の入力がなかったとの判別がなされたと判別された場合には(ステップS221で“NO”)、制御部の処理は、ステップS206aに移行する。日時の入力があったとの判別がなされたと判別された場合には、制御部の処理は、ステップS105aに移行する。   When the date and time are calculated in the process of step S205, the control unit determines whether or not it is determined that the date and time has been input from the CPU 41 in the determination process of step S201a (step S221). If it is determined that the CPU 41 determines that the date and time has not been input ("NO" in step S221), the process of the control unit proceeds to step S206a. If it is determined that it is determined that the date and time has been input, the process of the control unit proceeds to step S105a.

制御部は、出力された日時の日付が土曜日であるか否かを判別する(ステップS105a)。土曜日であると判別された場合には(ステップS105aで“YES”)、制御部の処理は、ステップS106に移行する。土曜日ではないと判別された場合には(ステップS105aで“NO”)、制御部は、出力された日時の日付が日曜日であるか否かを判別する(ステップS115a)。日曜日であると判別された場合には(ステップS115aで“YES”)、制御部の処理は、ステップS116に移行する。日曜日ではないと判別された場合には(ステップS115aで“NO”)、制御部の処理は、ステップS126に移行する。   The control unit determines whether or not the date of the output date is Saturday (step S105 a). When it is determined that it is a Saturday ("YES" in step S105a), the processing of the control unit shifts to step S106. If it is determined that it is not a Saturday ("NO" in step S105a), the control unit determines whether the date of the output date is Sunday (step S115a). When it is determined that it is a Sunday ("YES" in step S115a), the processing of the control unit shifts to step S116. When it is determined that it is not Sunday ("NO" in step S115a), the processing of the control unit shifts to step S126.

ステップS106の判別処理で、入出力の日付差が6日であると判別された場合には(ステップS106で“YES”)、制御部は、出力日時の日付から7日減算して日時を取得する(ステップS107a)。それから、制御部の処理は、ステップS206aに移行する。   If it is determined in the determination process of step S106 that the input / output date difference is 6 days ("YES" in step S106), the control unit subtracts 7 days from the output date and time to acquire the date and time (Step S107a). Then, the process of the control unit proceeds to step S206a.

ステップS106の判別処理で、入出力の日付差が6日ではないと判別された場合には(ステップS106で“NO”)、CPU41の処理は、ステップS126に移行する。   When it is determined in the determination process of step S106 that the date difference between input and output is not 6 days ("NO" in step S106), the process of the CPU 41 proceeds to step S126.

ステップS116の判別処理で、入出力の日付差が6日であると判別された場合には(ステップS116で“YES”)、CPU41は、出力日時の日付に7日加算して日時を取得する(ステップS117a)。それから、制御部の処理は、ステップS206aに移行する。   If it is determined in the determination process of step S116 that the date difference between input and output is 6 days ("YES" in step S116), the CPU 41 adds 7 days to the date of the output date and acquires the date (Step S117a). Then, the process of the control unit proceeds to step S206a.

ステップS127、S137、S215の処理が終了すると、制御部の処理は、ステップS206aに移行する。
ステップS107a、S117a、S127、S137、S215、S221の各処理からステップS206aの処理に移行すると、制御部は、取得日時をUTC日時に変換してCPU41に出力する(ステップS206a)。そして、制御部は、日時算出処理を終了する。
When the processes of steps S127, S137, and S215 end, the process of the control unit proceeds to step S206a.
When the process proceeds from step S107a, S117a, S127, S137, S215, and S221 to step S206a, the control unit converts the acquisition date and time to UTC date and outputs the converted date to the CPU 41 (step S206a). Then, the control unit ends the date and time calculation process.

図8は、本実施形態の電子時計1において実行される日時取得処理のCPU41による制御手順を示すフローチャートである。   FIG. 8 is a flowchart showing a control procedure by the CPU 41 of date and time acquisition processing executed in the electronic timepiece 1 of the present embodiment.

上述のように、本実施形態の電子時計1では、日付の修正に係るステップS105以降の各処理に応じた処理がGPS受信処理部50で実行されるので、この日時取得処理では、これらの処理が全て省略される。CPU41は、GPS受信処理部50から出力されたUTC日時をステップS104、S144の処理でそのまま取得して処理を終了する。実行されている処理の内容は、第1実施形態の電子時計1で実行される処理の内容と同一であり、説明を省略する。   As described above, in the electronic timepiece 1 according to the present embodiment, since the GPS reception processing unit 50 executes the processing corresponding to each processing after step S105 related to the correction of the date, these processings in the date and time acquisition processing Is omitted altogether. The CPU 41 acquires the UTC date and time output from the GPS reception processing unit 50 as it is in the processing of steps S104 and S144, and ends the processing. The content of the processing being executed is the same as the content of the processing executed by the electronic timepiece 1 of the first embodiment, and the description will be omitted.

以上のように、第2実施形態の電子時計1では、GPS受信処理部50のマイコンのCPU(制御部)により実行される日時算出処理において、制御部は、入力されたUTC日時から変換されたGPS日時からWNを算出し、取得されたTOWと組み合わせて日時を取得する。一方で、制御部は、入力されたUTC日時から変換されたGPS日時と、取得されたGPS日時のずれに応じ、週末を跨ぐ場合に生じる6日のずれを検出して補正する処理を行う。これにより、GPS受信処理部50は、週跨ぎに正確に対応した日時を出力することが出来る。従って、容易な処理で正確な日時を取得することが出来る。   As described above, in the electronic timepiece 1 of the second embodiment, in the date and time calculation process executed by the CPU (control unit) of the microcomputer of the GPS reception processing unit 50, the control unit is converted from the input UTC date and time. The WN is calculated from the GPS date and time, and the date and time are acquired in combination with the acquired TOW. On the other hand, the control unit performs processing of detecting and correcting a shift of six days which occurs when crossing a weekend according to the shift between the GPS date and time converted from the input UTC date and time and the obtained GPS date and time. As a result, the GPS reception processing unit 50 can output the date and time that corresponds correctly across the week. Accordingly, accurate date and time can be acquired by easy processing.

また、入出力日時の比較がGPS日時の段階で行われるので、7日のずれが生じることなく、一週間以内のずれに応じて容易に日付ずれの判定と修正とを行うことが出来る。   Further, since the comparison of the input and output date and time is performed at the GPS date and time, it is possible to easily determine and correct the date difference according to the difference within one week without causing a difference of 7 days.

また、出力日時の日付の補正処理は、出力日付に対して直接行われ、補正量は、TOW−Countの一周期分の長さに限られるので、出力日時の一部(時刻)と入力日時の一部(日付)とを組合せるといった処理を省略して画一的な処理で容易に行うことが出来る。   Moreover, since the correction processing of the date of the output date is directly performed on the output date, and the correction amount is limited to the length of one cycle of TOW-Count, part (time) of the output date and the input date It is possible to omit the processing of combining with a part (date) of the data and to easily carry out by a uniform processing.

[変形例]
次に、日時取得に係る動作の変形例について説明する。
本変形例の日時取得動作では、入出力日時の差が15秒以内の場合にのみ日付の修正を行い、15秒より大きい場合には、エラーとして日時の修正を行わない。
[Modification]
Next, a variation of the operation relating to date and time acquisition will be described.
In the date and time acquisition operation of the present modification, the date is corrected only when the difference between the input and output dates and times is within 15 seconds, and when it is greater than 15 seconds, the date and time correction is not performed as an error.

図9は、上記第2実施形態の電子時計1において実行される日時算出処理のGPS受信処理部50の制御部による制御手順の変形例を示すフローチャートである。
ここでは、上述の第2実施形態と同様に、現在のサブフレームの先頭のタイミングにおける日時に応じて日曜日の0時0分0秒で1増加するWNを算出し、取得されたTOW−Countから1を減算した値と組み合わせて日時を算出するものとして説明する。また、上記15秒の差を正確に判断するために、本変形例における入力日時としては、CPU41からGPS受信処理部50にUTC日時が入力されてから、算出された出力日時がCPU41に出力されるタイミングまでの時間経過を考慮した日時を用いるものとして説明する。
FIG. 9 is a flow chart showing a modification of the control procedure by the control unit of the GPS reception processing unit 50 of the date and time calculation process executed in the electronic timepiece 1 of the second embodiment.
Here, as in the second embodiment described above, WN that increases by 1 at 00:00:00 on Sunday is calculated according to the date and time at the start timing of the current sub-frame, and the acquired TOW-Count is used. A description will be given assuming that the date and time is calculated in combination with the value obtained by subtracting one. In addition, as the input date and time in the present modification, the UTC output date and time is input from the CPU 41 to the GPS reception processing unit 50, and the calculated output date and time is output to the CPU 41 as the input date and time in this modification. In the following description, it is assumed that the date and time taking into consideration the time lapse up to the

この変形例の日時算出処理は、上記第2実施形態の日時算出処理におけるステップS105、S106、S115、S116、S126、S137の処理が、それぞれ、ステップS105b、S106b、S115b、S116b、S126b、S137bに置き換えられた点を除き、上記第2実施形態の日時算出処理と同一であり、同一の処理については同一の符号を付して詳しい説明を省略する。   In the date and time calculation process of this modification, the processes of steps S105, S106, S115, S116, S126, and S137 in the date and time calculation process of the second embodiment are respectively performed on steps S105 b, S106 b, S115 b, S116 b, S126 b, and S137 b. Except for the replaced point, the process is the same as the date and time calculation process of the second embodiment, and the same process is denoted by the same reference numeral and the detailed description is omitted.

ステップS221の判別処理において、ステップS201a判別処理でCPU41からUTC日時の入力があったと判別されたと判別された場合(ステップS221で“YES”)、制御部は、算出された出力タイミングにおけるGPS日時(週内経過時間)が土曜日(7日目)の23時59分45秒以降であるか否かを判別する(ステップS105b)。土曜日の23時59分45秒以降であると判別された場合には(ステップS105bで“YES”)、制御部は、出力するGPS日時と、GPS受信処理部50に入力されたUTC日時から換算、計数された現在のGPS日時との時間差が6日23時間59分45秒以上であるか否かを判別する(ステップS106b)。時間差が6日23時間59分45秒以上であると判別された場合には(ステップS106bで“YES”)、制御部の処理は、ステップS107aに移行する。6日23時間59分45秒以上ではないと判別された場合には(ステップS106bで“NO”)、制御部の処理は、ステップS126bに移行する。   When it is determined that the UTC date and time has been input from the CPU 41 in the determination process of step S201a in the determination process of step S221 ("YES" in step S221), the control unit determines the GPS date and time at the calculated output timing ( It is determined whether or not the elapsed time in a week is after 23:59:45 on Saturday (the seventh day) (step S105 b). When it is determined that it is after 23:59:45 on Saturday ("YES" in step S105b), the control unit converts the GPS date and time to be output and the UTC date and time input to the GPS reception processing unit 50. Then, it is determined whether the time difference from the current GPS date and time counted is 23 hours, 59 minutes, 45 seconds or more on the 6th (step S106b). If it is determined that the time difference is 23 hours 59 minutes 45 seconds or more on the 6th ("YES" in step S106b), the process of the control unit proceeds to step S107a. When it is determined that the time is not 23 hours 59 minutes 45 seconds on the 6th ("NO" in step S106b), the processing of the control unit shifts to step S126b.

制御部は、GPS日時における出力日時と入力日時との時間差が15秒以上であるか否かを判別する(ステップS126b)。15秒以上であると判別された場合には(ステップS126bで“YES”)、制御部の処理は、ステップS137bに移行し、制御部は、エラー出力を行うと共に、直近の日時修正履歴を消去する。
一方、15秒以上ではないと判別された場合には(ステップS126bで“NO”)、制御部の処理は、ステップS127に移行する。
The control unit determines whether the time difference between the output date and time on the GPS date and time and the input date and time is 15 seconds or more (step S126 b). If it is determined that the time is 15 seconds or more ("YES" in step S126b), the processing of the control unit shifts to step S137b, and the control unit performs error output and erases the latest date and time correction history Do.
On the other hand, when it is determined that the time is not 15 seconds or more ("NO" in step S126b), the process of the control unit shifts to step S127.

ステップS105bの処理で、出力日時に係るGPS日時での週内経過時間が土曜日(7日目)の23時59分45秒以降ではないと判別された場合には(ステップS105bで“NO”)、制御部は、GPS日時での出力日時の週内経過時間が日曜日(1日目)の0時0分15秒以前であるか否かを判別する(ステップS115b)。日曜日(1日目)の0時0分15秒以前であると判別された場合には(ステップS115bで“YES”)、制御部は、出力日時と入力日時との時間差が6日23時間59分45秒以上であるか否かを判別する(ステップS116b)。6日23時間59分45秒以上であると判別された場合には(ステップS116bで“YES”)、制御部の処理は、ステップS117aに移行する。6日23時間59分45秒以上ではないと判別された場合には(ステップS116bで“NO”)、制御部の処理は、ステップS126bに移行する。   If it is determined in the process of step S105 b that the elapsed time within the week at the GPS date and time related to the output date and time is not 23:59:45 on Saturday (the seventh day) (“NO” in step S105 b) The control unit determines whether the weekly elapsed time of the output date and time at the GPS date and time is less than 0: 0: 15 on Sunday (the first day) (step S115 b). When it is determined that it is before 0: 0:15 on Sunday (the first day) ("YES" in step S115b), the control unit determines that the time difference between the output date and time and the input date and time is sixty-three 23 hours 59 It is determined whether or not it is 45 minutes or more (step S116 b). When it is determined that the time is 23 hours 59 minutes 45 seconds on the 6th ("YES" in step S116b), the process of the control unit shifts to step S117a. When it is determined that the time is not 23 hours 59 minutes 45 seconds on the 6th ("NO" in step S116b), the processing of the control unit shifts to step S126b.

ステップS115bの処理で、GPS日時での出力日時に係る週内経過時間が日曜日(1日目)の0時0分15秒以前ではないと判別された場合には(ステップS115bで“NO”)、制御部の処理は、ステップS126bに移行する。   If it is determined in the process of step S115b that the elapsed time in a week related to the output date and time on the GPS date and time is not less than 0: 0: 15 on Sunday (the first day) ("NO" in step S115b) The process of the control unit proceeds to step S126b.

以上の処理のうち、ステップS105b、S106bでそれぞれ“YES”に分岐するパターンは、図4における(d)に該当し、ステップS115b、S116bでそれぞれ“YES”に分岐するパターンは、図4における(c)に該当する。なお、図4(a)、(b)の場合、計時回路46の計数する日時と出力する日時(正確な日時)との差が15秒より大きくなるので、本変形例の日時取得に係る動作では、取得に成功しないことになる。   Among the above processes, the patterns branched to “YES” in step S105 b and S106 b correspond to (d) in FIG. 4, and the patterns branched to “YES” in step S115 b and S116 b correspond to (D in FIG. It corresponds to c). In the case of FIGS. 4A and 4B, since the difference between the date and time counted by the clock circuit 46 and the date and time to be output (correct date and time) is larger than 15 seconds, the operation according to the date and time acquisition of this modification Then, it will not succeed in acquisition.

図10は、本変形例の日時取得処理のCPU41による制御手順を示すフローチャートである。
この日時取得処理は、第2実施形態の電子時計1で実行される日時取得処理のうちステップS101の処理がステップS101bの処理に置き換えられた点を除いて第2実施形態の日時取得処理と同一であり、同一の処理内容については同一の符号を付して説明を省略する。
FIG. 10 is a flowchart showing a control procedure by the CPU 41 of the date and time acquisition process of the present modification.
This date and time acquisition process is the same as the date and time acquisition process of the second embodiment except that the process of step S101 is replaced with the process of step S101 b in the date and time acquisition process executed by the electronic timepiece 1 of the second embodiment. The same processing content is given the same reference numeral and the description is omitted.

この日時取得処理では、CPU41は、修正履歴記憶部43aを参照して直近の1ヵ月以内に受信履歴があるか否かを判別する(ステップS101b)。この1ヵ月の期間は、上述のように、計時回路46の計数する日時のずれが15秒程度生じる期間に相当する。1ヵ月以内に受信履歴があると判別された場合には(ステップS101bで“YES”)、CPU41の処理は、ステップS102に移行する。1ヵ月以内に受信履歴がないと判別された場合には(ステップS101bで“NO”)、CPU41の処理は、ステップS143に移行する。   In this date and time acquisition process, the CPU 41 determines whether or not there is a reception history within the last one month with reference to the correction history storage unit 43a (step S101 b). The one-month period corresponds to a period in which the time difference of the date and time counted by the timer circuit 46 is about 15 seconds as described above. If it is determined that there is a reception history within one month ("YES" in step S101 b), the processing of the CPU 41 shifts to step S102. If it is determined that there is no reception history within one month (“NO” in step S101 b), the process of the CPU 41 shifts to step S143.

以上のように、日時取得処理の変形例では、日時の取得が前回行われてからの経過時間が計時回路46の計時誤差に基づいて定められた所定の期間(ここでは、例えば、1ヵ月)以上であるか否かを判別し、所定の期間以上であると判別された場合には、GPS受信処理部50のマイコンは、HOWとWNの両方をGPS受信処理部50により受信させ、CPU41は、GPS受信処理部50に受信されたHOW及びWNによって通常通り日時を算出させる。従って、計時回路46の日時に大きなずれが見込まれる場合には、無理にHOWだけで調整せず、最初からWNも受信することで処理を複雑にせずに効率良く正確な日時データを取得することが出来る。   As described above, in the modification of the date and time acquisition process, a predetermined period (here, for example, one month) has been determined based on the timing error of the clock circuit 46 since the elapsed time since the date and time acquisition was performed last time. If it is determined that the predetermined period is over, the microcomputer of the GPS reception processing unit 50 causes the GPS reception processing unit 50 to receive both the HOW and the WN, and the CPU 41 The GPS reception processing unit 50 calculates the date and time as usual based on the received HOW and WN. Therefore, when a large deviation in the date and time of the clock circuit 46 is expected, it is possible to efficiently obtain accurate date and time data without complicating the process by forcibly receiving WN from the beginning without forcibly adjusting with HOW alone. Can do.

また、RAM43には、修正履歴記憶部43aが設けられて直近の日時データの修正が行われた日時を記憶し、この日時データに基づいて前回の日時の取得からの経過時間を算出して所定の期間との比較を行うので、専用のカウンタなどを設ける必要が無く、必要な場合に容易に経過時間を求めてWNデータの取得要否を判断することが出来る。   Further, the RAM 43 is provided with the correction history storage unit 43a and stores the date and time when the latest date and time data was corrected, and based on the date and time data, the elapsed time from the previous acquisition of the date and time is calculated Since it is not necessary to provide a dedicated counter or the like, it is possible to easily determine the elapsed time and determine whether it is necessary to acquire WN data, if necessary.

また、CPU41は、算出された日時(週内経過時間)がその下限、ここでは、0秒、即ち、日曜日の0時0分0秒、及び上限、ここでは、7日に相当する土曜日の24時0分0秒の何れかから所定のずれ幅として設定された15秒以内である場合に、7日からこの15秒を減じた6日23時間59分45秒を所定幅とし、入出力時刻の差がこの所定幅より大きいか否かによって、計時誤差によって週跨ぎが生じたか否かを判別する。即ち、計時誤差によって出力され得る日時の範囲が入力日時に対して固定幅で設定されるので、より確実に計時誤差を判別して正確な日時を取得することが出来る。   In addition, the CPU 41 calculates the date and time (elapsed time in the week) at its lower limit, here 0 seconds, that is, Sunday 00:00:00, and the upper limit, here the 24th on Saturday. If it is within 15 seconds which is set as a predetermined shift width from any one of the hours 0 minutes 0 seconds, 6 days 23 hours 59 minutes 45 seconds obtained by subtracting this 15 seconds from 7 days is a predetermined width, and the input / output time Whether or not the time crossing has occurred due to the timing error is determined based on whether or not the difference between the two is larger than the predetermined width. That is, since the range of the date and time that can be output due to the time difference is set with a fixed width with respect to the input date and time, it is possible to more reliably determine the time difference and acquire the correct date and time.

また、日時の算出がエラーとなった場合に、ステップS137bの処理で履歴を消去することで、次回の日時取得処理におけるステップS101bの処理において、一ヶ月以内に受信履歴がないと判別されて、ステップS143の処理に分岐しやすくなる。   Further, when the date and time calculation results in an error, the history is erased in the process of step S137b, and it is determined that there is no reception history within one month in the process of step S101b in the next date and time acquisition process, It becomes easy to branch to the process of step S143.

なお、本発明は、上記実施の形態に限られるものではなく、様々な変更が可能である。
例えば、上記実施の形態では、出力される日付は、入力された日付の±1日の範囲内にあるものとして判断を行ったが、これに限られない。例えば、出力された日付が入力された日付よりも4日を超えて進んでいた場合には、出力された日時から7日を減算した日時を取得し、出力された日付が入力された日付よりも4日を超えて遅れていた場合には、出力された日時に7日を加算した日時を取得することとしても良い。
The present invention is not limited to the above embodiment, and various modifications are possible.
For example, in the above embodiment, although the judgment is made on the assumption that the output date is within ± 1 day of the input date, the present invention is not limited to this. For example, if the output date has advanced more than 4 days from the input date, the date obtained by subtracting 7 days from the output date is acquired, and the output date is input from the input date If it is delayed by more than four days, the date and time obtained by adding seven days to the output date and time may be acquired.

また、上記実施の形態では、日付のずれと秒のずれを例に挙げて説明したが、他の単位レベルでのずれであっても良い。即ち、出力された日時が入力された時、分のずれを対象とし、例えば、6日と23時間58分以上のずれがあった場合に、日付を7日移動させることで2分程度内のずれに係る日付を修正し、出力された日時と入力された日時との間にこのずれより小さいずれがある場合には、エラーとするか、或いは、出力された日時が正しいものとみなすことが出来る。このような区切り方は、変形例同様、計時回路46の計時誤差(歩度)に基づいて定めることが出来る。   Moreover, although the said embodiment mentioned and demonstrated the shift | offset | difference of a date and the shift | offset | difference of a second as an example, the shift | offset | difference in another unit level may be sufficient. That is, when the output date and time is input, the difference between the minutes is taken as an object, and, for example, when there is a difference of 6 days and 23 hours and 58 minutes or more, the date is moved by 7 days within about 2 minutes Correct the date related to the deviation, and if there is a deviation smaller than this deviation between the output date and time and the input date and time, it is considered as an error or the output date and time is regarded as correct. It can. Such division can be determined based on the timing error (rate) of the timing circuit 46 as in the modification.

また、上記実施の形態では、HOW及びWNに基づいて、年月日曜日及び時分秒に換算してから処理を行うこととしたが、電子時計1における所定の基準に基づく秒値で処理を行った後に年月日曜日及び時分秒に変換しても良い。   In the above embodiment, processing is performed after conversion to date, day, hour, minute, and second based on HOW and WN. However, processing is performed using a second value based on a predetermined reference in the electronic timepiece 1. After that, it may be converted to date, day, hour, minute and second.

また、上記実施の形態では、修正履歴記憶部43aに直近の修正日時を記憶させたが、このように記憶させる代わりに、修正日時を起点としてカウンタを動作させて経過時間を計数しても良い。この場合、所定の期間を計数した段階で計数を中止させ、リセットすることが出来る。   In the above embodiment, the latest correction date and time is stored in the correction history storage unit 43a, but instead of storing the correction date and time as described above, the counter may be operated starting from the correction date and time to count the elapsed time. . In this case, the counting can be stopped and reset when the predetermined period has been counted.

また、上記実施の形態では、GPS受信処理部50とCPU41とにより日時取得部が構成され、GPS受信処理部50で受信したHOWと、CPU41から取得された計時回路46の日時とによりGPS受信処理部50が日時算出部として日時の算出を行い、当該算出された時刻を取得したCPU41が日時補正部(誤差判定部及び誤差整合部)としてずれの大きさに基づいて週末を跨ぐ場合の調整を行う場合と、GPS受信処理部50が日時算出部及び日時補正部として、週末を跨ぐ場合の調整まで行う場合とを例に挙げて説明したが、GPS受信処理部50は、HOWに基づく値を出力する構成として、CPU41が日時算出部及び日時補正部として日時の算出及び補正を行うこととしても良く、正確な時刻を取得するための処理は、電子時計1内部の各CPU(マイコン)に適宜割り振って又は一個のCPUに集中させて行わせることが出来る。   In the above embodiment, the GPS reception processing unit 50 and the CPU 41 constitute a date and time acquisition unit, and the GPS reception processing is performed by the HOW received by the GPS reception processing unit 50 and the date and time of the clock circuit 46 acquired from the CPU 41 The unit 50 calculates date and time as a date and time calculation unit, and the CPU 41 that has acquired the calculated time performs adjustment in the case of crossing a weekend based on the size of deviation as a date and time correction unit (error determination unit and error matching unit). Although the case where it carries out and the case where the GPS reception processing part 50 performs adjustment in the case where it straddles a weekend as a date calculation part and a date correction part was mentioned as an example and explained, the GPS reception processing part 50 has the value based on HOW. The CPU 41 may calculate and correct the date and time as a date and time calculation unit and a date and time correction unit as a configuration to output, and the process for acquiring an accurate time is It can be performed to concentrate appropriately allocated by or one of the CPU to the child timepiece 1 within each CPU (microcomputer).

また、上記第2実施形態の変形例で示した誤差を15秒以内に限定する条件は、第1実施形態に示した日時取得処理に適用されても良い。この場合、うるう秒に係るオフセット値(現在、+16秒)や、TOW−Countのリセットタイミングと日付の変更タイミングとのずれ(6秒)に応じて図4の(c)、(d)に示した条件分けがなされる。   Further, the conditions for limiting the error shown in the modification of the second embodiment to within 15 seconds may be applied to the date and time acquisition process shown in the first embodiment. In this case, as shown in (c) and (d) of FIG. 4 according to the offset value (currently +16 seconds) related to the leap second and the difference (6 seconds) between the TOW-Count reset timing and the date change timing. Conditions are divided.

一方で、図4(c)、(d)で示したケース(7日ずれ)は、特定の期間及び条件でしか生じ得ないので、日時取得処理や日時算出処理に追加せずに無視しても良い。この場合、当該期間では日時の算出、取得を行わないように制限を付しても良い。
また、当該ケースの判定を行う場合でも、入出力の日付差が6日の場合とまとめて6日以上として行われ、出力日付に対して7日の加減算を行わせることとしても良い。
On the other hand, the cases (7-day shift) shown in FIGS. 4C and 4D can occur only in a specific period and condition, and are ignored without being added to the date acquisition process or date calculation process. Also good. In this case, the calculation may be restricted so as not to calculate and acquire the date and time during the period.
Further, even in the case of performing the determination of the case, the input / output date difference may be collectively performed as six days or more as in the case of six days, and addition / subtraction of seven days may be performed on the output date.

また、上記実施の形態では、UTC日時によりCPU41とGPS受信処理部50との間で日時情報の入出力を行い、GPS受信処理部50では、GPS日時により処理を行う場合について説明したが、入出力される日時は、UTC日時以外の特定の地方時などであっても良い。但し、GPS日時と地方時との差がGPS日時とUTC日時との差よりも広がることで、GPS日時で週末を跨ぐタイミングにおける当該地方時の日時が週末(土曜日の24時0分0秒)からずれることになるので、本発明に係る一週間のずれを地方時で判別する場合には、当該地方時に応じた判別条件を設定する必要が生じる場合がある。   In the above embodiment, the date and time information is input / output between the CPU 41 and the GPS reception processing unit 50 according to the UTC date and time, and the GPS reception processing unit 50 is described based on the GPS date and time. The date and time to be output may be a specific local time other than the UTC date and time. However, since the difference between the GPS date and time and the local time is wider than the difference between the GPS date and time and the UTC time, the local time and date at the timing across the weekend with the GPS date and time is a weekend (Saturday 24:00:00) Since it deviates from this, when it discriminate | determines the gap of one week which concerns on this invention by local time, it may be necessary to set the discrimination condition according to the said local time.

また、上記実施の形態では、週の中の時間であるTOW−Countを出力するGPS衛星のデータを例に挙げて説明したが、他のフォーマットの衛星については、当該フォーマットに応じて同様に本発明を適用することが出来る。
例えば、GLONASS衛星のデータでは、各ストリングでストリング番号に応じた時刻が取得され、日付データが各フレームで一回取得される。従って、両端の時刻、例えば、23時台の時刻を入力して0時台の時刻が出力された場合には、日付を一日進め、0時台の時刻を入力して23時台の時刻が出力された場合には、日付を一日遅らせる、という処理を行わせることが出来る。
In the above embodiment, although data of GPS satellites outputting TOW-Count, which is the time in a week, has been described as an example, satellites of other formats are similarly described according to the format. The invention can be applied.
For example, in the data of the GLONASS satellite, the time corresponding to the string number is acquired for each string, and the date data is acquired once for each frame. Therefore, when the time at both ends, for example, the time of 23 o'clock, is input and the time of 0 o'clock is output, the date is advanced by 1 day, and the time of 0 o'clock is input and the time of 23 o'clock is input Can be processed to delay the date by one day.

また、上記日時取得処理でエラーとなった場合、そのまま日付を変更しないで時刻のみを修正しても良いし、当該処理をそのまま終了しても良い。或いは、一週間以内の受信履歴を消去した後に日時取得処理を再実行してHOWとWNの両方を受信し、正確な日時を取得することとしても良い。   When an error occurs in the date and time acquisition process, only the time may be corrected without changing the date as it is, or the process may be terminated as it is. Alternatively, after deleting the reception history within one week, the date and time acquisition process may be re-executed to receive both the HOW and the WN, and the accurate date and time may be acquired.

また、上記実施の形態では、電子機器として電子腕時計を例に挙げて説明したが、これに限られず、GPS衛星からの電波を短時間受信して日時情報を取得する他の電子機器、例えば、電子歩数計や携帯型情報端末、携帯電話、スマートフォン、デジタルカメラやカーナビゲーション装置にも本発明を適用することが出来る。   In the above embodiment, the electronic watch has been described as an example of the electronic device. However, the present invention is not limited thereto. Other electronic devices that receive radio waves from GPS satellites for a short time and acquire date and time information, for example, The present invention can be applied to an electronic pedometer, a portable information terminal, a mobile phone, a smart phone, a digital camera and a car navigation device.

また、上記実施の形態では、デジタル表示を行う電子時計を例に挙げて説明したが、指針を用いたアナログ表示式の電子時計であっても良い。   Further, in the above embodiment, the electronic timepiece performing digital display has been described as an example, but it may be an analog display electronic timepiece using a pointer.

また、上記実施の形態では、受信制御をGPS受信処理部50に行わせることとしたが、全ての処理をCPU41に行わせても良い。   In the above embodiment, although the GPS reception processing unit 50 performs the reception control, the CPU 41 may perform all the processing.

また、上記実施の形態では、本発明に係るプログラムのコンピュータ読み取り可能な媒体としてROM42を使用した例を開示したが、この例に限定されない。その他のコンピュータ読み取り可能な媒体として、フラッシュメモリ、SSD(Solid State Disk)などの不揮発性メモリ、HDD(Hard Disk Drive)及びCD−ROMやUSBメモリ等の可搬型記録媒体を適用することが可能である。また、本発明に係るプログラムのデータを通信回線を介して提供する媒体として、キャリアウェーブ(搬送波)も本発明に適用される。
その他、上記実施の形態で示した具体的な構成、数値、制御手順などの細部は、本発明の趣旨を逸脱しない範囲において適宜変更可能である。
In the above embodiment, an example using the ROM 42 as a computer readable medium of the program according to the present invention has been disclosed, but the present invention is not limited to this example. As other computer readable media, it is possible to apply portable recording media such as flash memory, nonvolatile memory such as solid state disk (SSD), hard disk drive (HDD), CD-ROM, and USB memory. is there. Also, as a medium for providing data of the program according to the present invention via a communication line, carrier wave (carrier wave) is also applied to the present invention.
In addition, details such as specific configurations, numerical values, and control procedures shown in the above-described embodiment can be appropriately changed without departing from the spirit of the present invention.

本発明のいくつかの実施形態を説明したが、本発明の範囲は、上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明の範囲とその均等の範囲を含む。
以下に、この出願の願書に最初に添付した特許請求の範囲に記載した発明を付記する。付記に記載した請求項の項番は、この出願の願書に最初に添付した特許請求の範囲の通りである。
Although several embodiments of the present invention have been described, the scope of the present invention is not limited to the above-described embodiments, but includes the scope of the invention described in the claims and the equivalents thereof.
In the following, the invention described in the claims initially attached to the request for this application is appended. The item numbers of the claims described in the appendix are as in the claims attached at the beginning of the application for this application.

[付記]
<請求項1>
日時を計数する計時部と、
測位衛星からの送信電波を受信する受信部と、
前記受信部による受信期間を制御する受信制御部と、
前記受信された送信電波から日時を取得する日時取得部と、
を備え、
前記受信制御部は、前記測位衛星が送信する第1時間単位の第1日時情報と、当該第1時間単位より単位幅が大きい第2時間単位の第2日時情報とのうち、前記第1日時情報のみを前記受信部に受信させ、
前記日時取得部は、
前記計時部の日時から算出される前記第2時間単位の内部日時情報と、前記受信部により受信された前記第1日時情報と、に基づいて、前記内部日時情報に係る範囲内の日時を算出する日時算出部と、
前記日時算出部により算出された日時と、前記計時部により計数されている日時と、の差分に基づいて前記算出された日時を補正する日時補正部と、
を有することを特徴とする電子機器。
<請求項2>
前記日時補正部は、
前記差分が所定幅以上であるか否かを判別する誤差判定部と、
前記所定幅以上であると判別された場合に、前記算出された日時が前記計時部の日時から異なっている方向とは反対方向に、当該算出された日時を前記第2時間単位の単位幅分ずらした日時に補正する誤差整合部と、
を含むことを特徴とする請求項1記載の電子機器。
<請求項3>
前記誤差判定部は、算出された前記第1時間単位の値が当該第1時間単位の上限及び下限の何れかから所定のずれ幅以内にある場合に、前記第2時間単位の単位幅から前記ずれ幅を減じた値を前記所定幅として判定を行うことを特徴とする請求項2記載の電子機器。
<請求項4>
前記第1日時情報は、前記第1時間単位の値と、前記第1時間単位より単位幅が大きく前記第2時間単位より単位幅が小さい第3時間単位の値との組合せで表されることが可能であり、
前記誤差判定部は、前記算出された日時に係る前記第3時間単位の値が当該第3時間単位の上限及び下限の何れかから所定のずれ幅以内にある場合に、当該算出された日時に係る前記第3時間単位の値と、前記計時部により計数されている日時に係る第3時間単位の値との差が、前記第2時間単位の単位幅に相当する前記第3時間単位の値から前記ずれ幅を減じた値以上であるか否かを判別することを特徴とする請求項2記載の電子機器。
<請求項5>
前記日時の取得が前回行われてからの経過時間が前記計時部の計時誤差に基づいて定められた所定の期間以上であるか否かを判別する日付取得タイミング判別部を備え、
前記所定の期間以上であると判別された場合には、
前記受信制御部は、前記第1日時情報と前記第2日時情報の両方を前記受信部に受信させ、
前記日時取得部は、当該受信部により受信された前記第1日時情報と前記第2日時情報とにより日時を算出する
ことを特徴とする請求項1〜4の何れか一項に記載の電子機器。
<請求項6>
前記日時取得部による日時の取得に係る履歴を記憶する履歴記憶部を備え、
前記日付取得タイミング判別部は、当該記憶された履歴を参照して前記所定の期間以上であるか否かを判別する
ことを特徴とする請求項5記載の電子機器。
<請求項7>
前記日時算出部により算出された日時と、前記計時部により計数されている日時と、の差が前記所定幅以上であり、且つ、前記第2時間単位の単位幅から前記所定幅を減じた幅未満である場合には、前記日時取得部は、前記算出された前記第2時間単位の値を取得しない
ことを特徴とする請求項2〜4の何れか一項に記載の電子機器。
<請求項8>
前記測位衛星はGPS衛星であり、
前記受信制御部は、前記第1日時情報としてHOWを受信させ、
前記日時取得部は、前記計時部の日時から前記内部日時情報としてWNに係る値を算出する
ことを特徴とする請求項1〜7の何れか一項に記載の電子機器。
<請求項9>
前記第1日時情報は、前記第1時間単位の値と、前記第1時間単位の単位幅である秒より大きく前記第2時間単位の単位幅である週より小さい単位幅である日に応じた第3時間単位の曜日との組合せで表されることが可能であり、
前記誤差判定部は、前記算出された日時に係る曜日が日曜日又は土曜日の場合に、当該算出された日時の日付と、前記計時部により計数されている日時の日付との差が6日以上であるか否かを判別し、
前記日時算出部により算出された日時の日付と前記計時部により計数されている日時の日付との差が2日以上6日未満の範囲にある場合には、前記受信制御部は、前記受信部を再度動作させて、前記第1日時情報及び前記第2日時情報の両方を受信させる
ことを特徴とする請求項8記載の電子機器。
<請求項10>
前記日時算出部は、前記GPS衛星が搭載する時計を基準とした日時を算出し、
前記日時補正部は、前記計時部との入出力に係る時計を基準とした日時で前記計時部が計数する日時との比較及び前記算出された日時の補正を行い、
前記第1日時情報は、前記第1時間単位の値と、前記第1時間単位の単位幅である秒より大きく前記第2時間単位の単位幅である週より小さい単位幅である日に応じた第3時間単位の曜日との組合せで表されることが可能であり、
前記誤差判定部は、前記算出された日時の曜日が日曜日又は土曜日の場合に、当該算出された日時の日付と、前記計時部により計数されている日時の日付との差が6日以上であるか否かを判別し、
前記日時算出部により算出された日時の日付と前記計時部により計数されている日時の日付との差が2日以上6日未満の範囲にある場合には、前記受信制御部は、前記受信部を再度動作させて、前記第1日時情報及び前記第2日時情報の両方を受信させる
ことを特徴とする請求項8記載の電子機器。
<請求項11>
前記GPS衛星が搭載する時計により計数される日時と、前記計時部との入出力に係る時計により計数される日時との差は、うるう秒の実施状況に基づいて定まることを特徴とする請求項10記載の電子機器。
<請求項12>
日時を表示可能な表示部と、
当該表示部の動作を制御する表示制御部と
を備えた電子時計であることを特徴とする請求項1〜11の何れか一項に記載の電子機器。
<請求項13>
日時を計数する計時部と、測位衛星からの送信電波を受信する受信部と、を備えたコンピュータを、
前記受信部による受信期間を制御する受信制御手段、
前記受信された送信電波から日時を取得する日時取得手段
として機能させることを特徴とするプログラムであって、
前記受信制御手段は、前記測位衛星が送信する第1時間単位の第1日時情報と、当該第1時間単位より単位幅が大きい第2時間単位の第2日時情報とのうち、前記第1日時情報のみを前記受信部に受信させ、
前記日時取得手段は、
前記計時部の日時から算出される前記第2時間単位の内部日時情報と、前記受信部により受信された前記第1日時情報とに基づいて、前記内部日時情報に係る範囲内の日時を算出する日時算出手段、
前記日時算出手段により算出された日時と、前記計時部により計数されている日時と、の差分に基づいて前記算出された日時を補正する日時補正手段、
を有することを特徴とするプログラム。
<請求項14>
日時を計数する計時部と、
測位衛星からの送信電波を受信する受信部と、
を用いた日時情報の取得方法であって、
前記受信部による受信期間を制御する受信制御ステップ、
前記受信された送信電波から日時を取得する日時取得ステップ、
を含み、
前記受信制御ステップは、前記測位衛星が送信する第1時間単位の第1日時情報と、当該第1時間単位より単位幅が大きい第2時間単位の第2日時情報とのうち、前記第1日時情報のみを前記受信部に受信させ、
前記日時取得ステップは、
前記計時部の日時から算出される前記第2時間単位の内部日時情報と、前記受信部により受信された前記第1日時情報とに基づいて、前記内部日時情報に係る範囲内の日時を算出する日時算出ステップ、
前記日時算出ステップで算出された日時と、前記計時部により計数されている日時と、の差分に基づいて前記算出された日時を補正する日時補正ステップ、
を含むことを特徴とする日時情報の取得方法。
[Supplementary note]
<Claim 1>
Timekeeping section which counts date and time,
A receiving unit that receives a radio wave transmitted from a positioning satellite;
A reception control unit that controls a reception period of the reception unit;
A date and time acquisition unit for acquiring a date and time from the received transmission radio wave;
Equipped with
The reception control unit transmits the first date and time of the first date and time information of a first time unit transmitted by the positioning satellite, and second date and time information of a second time unit having a unit width larger than the first time unit. Only the information is received by the receiving unit,
The date and time acquisition unit
The date and time within the range according to the internal date and time information is calculated based on the internal date and time information of the second time unit calculated from the date and time of the timekeeping unit and the first date and time information received by the receiving unit Date and time calculation unit
A date and time correction unit that corrects the calculated date and time based on a difference between the date and time calculated by the date and time calculation unit and the date and time counted by the time counting unit;
Electronic equipment characterized by having.
<Claim 2>
The date and time correction unit
An error determination unit that determines whether the difference is equal to or greater than a predetermined width;
When it is determined that the calculated width is equal to or more than the predetermined width, the calculated date is divided by the unit width of the second time unit in the direction opposite to the direction in which the calculated date is different from the date of the timekeeping unit. An error matching unit that corrects the shifted date and time;
The electronic device according to claim 1, further comprising:
<Claim 3>
When the calculated value of the first time unit is within a predetermined shift width from any of the upper limit and the lower limit of the first time unit, the error determination unit determines the unit width of the second time unit from the unit width of the second time unit. The electronic device according to claim 2, wherein the determination is performed with a value obtained by subtracting the deviation width as the predetermined width.
<Claim 4>
The first date and time information is represented by a combination of a value of the first time unit and a value of a third time unit having a unit width larger than the first time unit and a unit width smaller than the second time unit. Is possible,
When the value of the third time unit relating to the calculated date and time is within a predetermined deviation from any of the upper limit and the lower limit of the third time unit, the error determination unit determines the calculated date and time. The value of the third time unit corresponding to the unit width of the second time unit, which is the difference between the value of the third time unit concerned and the value of the third time unit related to the date and time counted by the clock unit. The electronic device according to claim 2, wherein it is determined whether or not the difference is less than or equal to the value of.
<Claim 5>
It has a date acquisition timing determination unit that determines whether the elapsed time since the acquisition of the date and time was last performed is equal to or longer than a predetermined period determined based on the time measurement error of the time measurement unit,
If it is determined that the predetermined period of time or more,
The reception control unit causes the reception unit to receive both the first date and time information and the second date and time information.
The electronic device according to any one of claims 1 to 4, wherein the date and time acquisition unit calculates the date and time based on the first date and time information and the second date and time information received by the reception unit. .
<Claim 6>
A history storage unit for storing a history related to the acquisition of the date and time by the date and time acquisition unit;
The electronic device according to claim 5, wherein the date acquisition timing determination unit determines whether or not the predetermined period is longer than the stored history with reference to the stored history.
<Claim 7>
The difference between the date and time calculated by the date and time calculation unit and the date and time counted by the clock unit is equal to or greater than the predetermined width, and a width obtained by subtracting the predetermined width from the unit width of the second time unit. The electronic device according to any one of claims 2 to 4, wherein the date and time obtaining unit does not obtain the calculated value of the second unit of time if it is less than 5 minutes.
<Claim 8>
The positioning satellite is a GPS satellite,
The reception control unit causes the HOW to be received as the first date and time information.
The electronic device according to any one of claims 1 to 7, wherein the date and time acquisition unit calculates a value according to WN as the internal date and time information from the date and time of the clock unit.
<Claim 9>
The first date and time information corresponds to a date having a value of the first time unit and a unit width smaller than a week which is a unit width of the second time unit and larger than a second which is a unit width of the first time unit. It can be expressed in combination with the third day of the week,
When the day of the calculated date is Sunday or Saturday, the error determination unit has a difference of 6 days or more between the date of the calculated date and the date of the date counted by the time counting unit. Determine if there is,
If the difference between the date of the date and time calculated by the date and time calculating unit and the date of the date and time counted by the time counting unit is in the range of 2 days to less than 6 days, the reception control unit may The electronic device according to claim 8, characterized in that: the electronic device operates again to receive both the first date and time information and the second date and time information.
<Claim 10>
The date and time calculation unit calculates a date and time based on a clock mounted on the GPS satellite,
The date and time correction unit performs a comparison with a date and time counted by the clock unit and a correction of the calculated date and time based on a clock based on a clock related to input and output with the clock unit.
The first date and time information corresponds to a date having a value of the first time unit and a unit width smaller than a week which is a unit width of the second time unit and larger than a second which is a unit width of the first time unit. It can be expressed in combination with the third day of the week,
When the day of the calculated date is Sunday or Saturday, the error determination unit has a difference of 6 days or more between the date of the calculated date and the date of the date counted by the timer unit. To determine whether or not
If the difference between the date of the date and time calculated by the date and time calculating unit and the date of the date and time counted by the time counting unit is in the range of 2 days to less than 6 days, the reception control unit may The electronic device according to claim 8, characterized in that: the electronic device operates again to receive both the first date and time information and the second date and time information.
<Claim 11>
The difference between the date and time counted by the clock carried by the GPS satellite and the date and time counted by the clock related to the input and output with the timekeeping unit is determined based on the implementation status of the leap second. 10. The electronic device according to 10.
<Claim 12>
A display unit capable of displaying the date and time;
The electronic device according to any one of claims 1 to 11, being an electronic timepiece comprising: a display control unit configured to control an operation of the display unit.
<Claim 13>
A computer provided with a timekeeping unit for counting date and time, and a reception unit for receiving a radio wave transmitted from a positioning satellite,
Reception control means for controlling a reception period by the reception unit;
It is a program characterized by functioning as date and time acquisition means to acquire a date and time from the received transmission radio wave,
The reception control means is configured to perform the first date and time of the first date and time information of a first time unit transmitted by the positioning satellite and second date and time information of a second time unit having a unit width larger than the first time unit. Only the information is received by the receiving unit,
The date and time acquisition means
The date and time within the range according to the internal date and time information is calculated based on the internal date and time information of the second time unit calculated from the date and time of the timekeeping unit and the first date and time information received by the receiver Date and time calculation means,
Date and time correction means for correcting the calculated date and time based on the difference between the date and time calculated by the date and time calculation means and the date and time counted by the timekeeping unit;
A program characterized by having:
<Claim 14>
Timekeeping section which counts date and time,
A receiving unit that receives a radio wave transmitted from a positioning satellite;
A method of acquiring date and time information using
A reception control step of controlling a reception period by the reception unit;
A date and time acquisition step of acquiring a date and time from the received transmission radio wave,
Including
In the reception control step, the first date and time of the first time and date information of a first time unit transmitted by the positioning satellite, and second date and time information of a second time unit having a unit width larger than the first time unit, Only the information is received by the receiving unit,
The date and time acquisition step is
The date and time within the range according to the internal date and time information is calculated based on the internal date and time information of the second time unit calculated from the date and time of the timekeeping unit and the first date and time information received by the receiver Date and time calculation step,
A date and time correction step for correcting the calculated date and time based on the difference between the date and time calculated at the date and time calculating step and the date and time counted by the clock unit.
A method of acquiring date and time information, including:

1 電子時計
41 CPU
42 ROM
42a プログラム
43 RAM
43a 修正履歴記憶部
44 発振回路
45 分周回路
46 計時回路
47 操作部
48 表示部
49 表示ドライバ
50 GPS受信処理部
51 アンテナ
52 温度センサ
53 電源部
1 Electronic clock 41 CPU
42 ROM
42a Program 43 RAM
43a Correction history storage unit 44 Oscillator circuit 45 Divider circuit 46 Clocking circuit 47 Operation unit 48 Display unit 49 Display driver 50 GPS reception processing unit 51 Antenna 52 Temperature sensor 53 Power supply unit

本発明は、上記目的を達成するため、
日時を計数する計時部と、
測位衛星からの送信電波を受信する受信部と、
前記受信された送信電波から日時を取得する日時取得部と、
を備え、
前記日時取得部は、
前記受信部により受信された第1時間単位の第1日時情報と、前記計時部の日時から算出され、前記第1時間単位より単位幅が大きい第2時間単位の内部日時情報と、に基づいて、前記内部日時情報に係る範囲内の日時を算出する日時算出部と、
前記日時算出部により算出された日時と、前記計時部により計数されている日時と、の差分に基づいて前記算出された日時を補正する日時補正部と、
を有し、
前記日時補正部は、
前記差分が所定幅以上であるか否かを判別する誤差判定
し、
前記誤差判定部は、算出された前記第1時間単位の値が当該第1時間単位の上限及び下限の何れかから所定のずれ幅以内にある場合に、前記第2時間単位の単位幅から前記ずれ幅を減じた値を前記所定幅として判定を行い、
前記日時補正部は、前記誤差判定部の判定結果に基づいて補正を行う
ことを特徴とする電子機器である。
The present invention achieves the above object by
Timekeeping section which counts date and time,
A receiving unit that receives a radio wave transmitted from a positioning satellite;
A date and time acquisition unit for acquiring a date and time from the received transmission radio wave;
Equipped with
The date and time acquisition unit
Based on the first date and time information of the first time unit received by the receiving unit, and internal date and time information of the second time unit calculated from the date and time of the time counting unit and having a unit width larger than the first time unit. A date and time calculation unit that calculates a date and time within a range related to the internal date and time information;
A date and time correction unit that corrects the calculated date and time based on a difference between the date and time calculated by the date and time calculation unit and the date and time counted by the time counting unit;
Have
The date and time correction unit
An error determination unit that determines whether the difference is equal to or greater than a predetermined width
I have a,
When the calculated value of the first time unit is within a predetermined shift width from any of the upper limit and the lower limit of the first time unit, the error determination unit determines the unit width of the second time unit from the unit width of the second time unit. The value obtained by subtracting the deviation width is determined as the predetermined width,
The date and time correction unit is an electronic device that performs correction based on the determination result of the error determination unit .

Claims (14)

日時を計数する計時部と、
測位衛星からの送信電波を受信する受信部と、
前記受信された送信電波から日時を取得する日時取得部と、
を備え、
前記日時取得部は、
前記受信部により受信された第1時間単位の第1日時情報と、前記計時部の日時から算出され、前記第1時間単位より単位幅が大きい第2時間単位の内部日時情報と、に基づいて、前記内部日時情報に係る範囲内の日時を算出する日時算出部と、
前記日時算出部により算出された日時と、前記計時部により計数されている日時と、の差分に基づいて前記算出された日時を補正する日時補正部と、
を有し、
前記日時補正部は、
前記差分が所定幅以上であるか否かを判別する誤差判定部と、
前記所定幅以上であると判別された場合に、前記算出された日時が前記計時部の日時から異なっている方向とは反対方向に、当該算出された日時を前記第2時間単位の単位幅分ずらした日時に補正する誤差整合部と、
を有することを特徴とする電子機器。
Timekeeping section which counts date and time,
A receiving unit that receives a radio wave transmitted from a positioning satellite;
A date and time acquisition unit for acquiring a date and time from the received transmission radio wave;
Equipped with
The date and time acquisition unit
Based on the first date and time information of the first time unit received by the receiving unit, and internal date and time information of the second time unit calculated from the date and time of the time counting unit and having a unit width larger than the first time unit. A date and time calculation unit that calculates a date and time within a range related to the internal date and time information;
A date and time correction unit that corrects the calculated date and time based on a difference between the date and time calculated by the date and time calculation unit and the date and time counted by the time counting unit;
Have
The date and time correction unit
An error determination unit that determines whether the difference is equal to or greater than a predetermined width;
When it is determined that the calculated width is equal to or more than the predetermined width, the calculated date is divided by the unit width of the second time unit in the direction opposite to the direction in which the calculated date is different from the date of the timekeeping unit. An error matching unit that corrects the shifted date and time;
Electronic equipment characterized by having.
前記受信部による受信期間を制御する受信制御部を備え、
前記受信制御部は、前記測位衛星が送信する前記第1時間単位の前記第1日時情報と、前記第2時間単位の第2日時情報とのうち、前記第1日時情報のみを前記受信部に受信させる
ことを特徴とする請求項1記載の電子機器。
A reception control unit configured to control a reception period of the reception unit;
The reception control unit transmits only the first date and time information out of the first time and date information of the first time unit transmitted by the positioning satellite and the second date and time information of the second time unit to the reception unit. The electronic device according to claim 1, wherein the electronic device is made to receive.
前記誤差判定部は、算出された前記第1時間単位の値が当該第1時間単位の上限及び下限の何れかから所定のずれ幅以内にある場合に、前記第2時間単位の単位幅から前記ずれ幅を減じた値を前記所定幅として判定を行うことを特徴とする請求項1又は2記載の電子機器。   When the calculated value of the first time unit is within a predetermined shift width from any of the upper limit and the lower limit of the first time unit, the error determination unit determines the unit width of the second time unit from the unit width of the second time unit. The electronic device according to claim 1, wherein the determination is performed with a value obtained by subtracting the deviation width as the predetermined width. 前記第1日時情報は、前記第1時間単位の値と、前記第1時間単位より単位幅が大きく前記第2時間単位より単位幅が小さい第3時間単位の値との組合せで表されることが可能であり、
前記誤差判定部は、前記算出された日時に係る前記第3時間単位の値が当該第3時間単位の上限及び下限の何れかから所定のずれ幅以内にある場合に、当該算出された日時に係る前記第3時間単位の値と、前記計時部により計数されている日時に係る第3時間単位の値との差が、前記第2時間単位の単位幅に相当する前記第3時間単位の値から前記ずれ幅を減じた値以上であるか否かを判別することを特徴とする請求項1又は2記載の電子機器。
The first date and time information is represented by a combination of a value of the first time unit and a value of a third time unit having a unit width larger than the first time unit and a unit width smaller than the second time unit. Is possible,
When the value of the third time unit relating to the calculated date and time is within a predetermined deviation from any of the upper limit and the lower limit of the third time unit, the error determination unit determines the calculated date and time. The value of the third time unit corresponding to the unit width of the second time unit, which is the difference between the value of the third time unit concerned and the value of the third time unit related to the date and time counted by the clock unit. The electronic device according to claim 1 or 2, wherein it is determined whether or not the difference is less than or equal to the value of.
前記日時の取得が前回行われてからの経過時間が前記計時部の計時誤差に基づいて定められた所定の期間以上であるか否かを判別する日付取得タイミング判別部を備え、
前記所定の期間以上であると判別された場合には、
前記受信制御部は、前記第1日時情報と前記第2日時情報の両方を前記受信部に受信させ、
前記日時取得部は、当該受信部により受信された前記第1日時情報と前記第2日時情報とにより日時を算出する
ことを特徴とする請求項2〜4の何れか一項に記載の電子機器。
It has a date acquisition timing determination unit that determines whether the elapsed time since the acquisition of the date and time was last performed is equal to or longer than a predetermined period determined based on the time measurement error of the time measurement unit,
If it is determined that the predetermined period of time or more,
The reception control unit causes the reception unit to receive both the first date and time information and the second date and time information.
The electronic device according to any one of claims 2 to 4, wherein the date and time acquisition unit calculates the date and time based on the first date and time information and the second date and time information received by the reception unit. .
前記日時取得部による日時の取得に係る履歴を記憶する履歴記憶部を備え、
前記日付取得タイミング判別部は、当該記憶された履歴を参照して前記所定の期間以上であるか否かを判別する
ことを特徴とする請求項5記載の電子機器。
A history storage unit for storing a history related to the acquisition of the date and time by the date and time acquisition unit;
The electronic device according to claim 5, wherein the date acquisition timing determination unit determines whether or not the predetermined period is longer than the stored history with reference to the stored history.
前記日時算出部により算出された日時と、前記計時部により計数されている日時と、の差が前記所定幅以上であり、且つ、前記第2時間単位の単位幅から前記所定幅を減じた幅未満である場合には、前記日時取得部は、前記算出された前記第2時間単位の値を取得しない
ことを特徴とする請求項1〜4の何れか一項に記載の電子機器。
The difference between the date and time calculated by the date and time calculation unit and the date and time counted by the clock unit is equal to or greater than the predetermined width, and a width obtained by subtracting the predetermined width from the unit width of the second time unit. The electronic device according to any one of claims 1 to 4, wherein the date and time obtaining unit does not obtain the calculated value of the second unit of time if it is less than 5.
前記測位衛星はGPS衛星であり、
前記受信制御部は、前記第1日時情報としてHOWを受信させ、
前記日時取得部は、前記計時部の日時から前記内部日時情報としてWNに係る値を算出する
ことを特徴とする請求項1〜7の何れか一項に記載の電子機器。
The positioning satellite is a GPS satellite,
The reception control unit causes the HOW to be received as the first date and time information.
The electronic device according to any one of claims 1 to 7, wherein the date and time acquisition unit calculates a value according to WN as the internal date and time information from the date and time of the clock unit.
前記第1日時情報は、前記第1時間単位の値と、前記第1時間単位の単位幅である秒より大きく前記第2時間単位の単位幅である週より小さい単位幅である日に応じた第3時間単位の曜日との組合せで表されることが可能であり、
前記誤差判定部は、前記算出された日時に係る曜日が日曜日又は土曜日の場合に、当該算出された日時の日付と、前記計時部により計数されている日時の日付との差が6日以上であるか否かを判別し、
前記日時算出部により算出された日時の日付と前記計時部により計数されている日時の日付との差が2日以上6日未満の範囲にある場合には、前記受信制御部は、前記受信部を再度動作させて、前記第1日時情報及び前記第2日時情報の両方を受信させる
ことを特徴とする請求項8記載の電子機器。
The first date and time information corresponds to a date having a value of the first time unit and a unit width smaller than a week which is a unit width of the second time unit and larger than a second which is a unit width of the first time unit. It can be expressed in combination with the third day of the week,
When the day of the calculated date is Sunday or Saturday, the error determination unit has a difference of 6 days or more between the date of the calculated date and the date of the date counted by the time counting unit. Determine if there is,
If the difference between the date of the date and time calculated by the date and time calculating unit and the date of the date and time counted by the time counting unit is in the range of 2 days to less than 6 days, the reception control unit may The electronic device according to claim 8, characterized in that: the electronic device operates again to receive both the first date and time information and the second date and time information.
前記日時算出部は、前記GPS衛星が搭載する時計を基準とした日時を算出し、
前記日時補正部は、前記計時部との入出力に係る時計を基準とした日時で前記計時部が計数する日時との比較及び前記算出された日時の補正を行い、
前記第1日時情報は、前記第1時間単位の値と、前記第1時間単位の単位幅である秒より大きく前記第2時間単位の単位幅である週より小さい単位幅である日に応じた第3時間単位の曜日との組合せで表されることが可能であり、
前記誤差判定部は、前記算出された日時の曜日が日曜日又は土曜日の場合に、当該算出された日時の日付と、前記計時部により計数されている日時の日付との差が6日以上であるか否かを判別し、
前記日時算出部により算出された日時の日付と前記計時部により計数されている日時の日付との差が2日以上6日未満の範囲にある場合には、前記受信制御部は、前記受信部を再度動作させて、前記第1日時情報及び前記第2日時情報の両方を受信させる
ことを特徴とする請求項8記載の電子機器。
The date and time calculation unit calculates a date and time based on a clock mounted on the GPS satellite,
The date and time correction unit performs a comparison with a date and time counted by the clock unit and a correction of the calculated date and time based on a clock based on a clock related to input and output with the clock unit.
The first date and time information corresponds to a date having a value of the first time unit and a unit width smaller than a week which is a unit width of the second time unit and larger than a second which is a unit width of the first time unit. It can be expressed in combination with the third day of the week,
When the day of the calculated date is Sunday or Saturday, the error determination unit has a difference of 6 days or more between the date of the calculated date and the date of the date counted by the timer unit. To determine whether or not
If the difference between the date of the date and time calculated by the date and time calculating unit and the date of the date and time counted by the time counting unit is in the range of 2 days to less than 6 days, the reception control unit may The electronic device according to claim 8, characterized in that: the electronic device operates again to receive both the first date and time information and the second date and time information.
前記GPS衛星が搭載する時計により計数される日時と、前記計時部との入出力に係る時計により計数される日時との差は、うるう秒の実施状況に基づいて定まることを特徴とする請求項10記載の電子機器。   The difference between the date and time counted by the clock carried by the GPS satellite and the date and time counted by the clock related to the input and output with the timekeeping unit is determined based on the implementation status of the leap second. 10. The electronic device according to 10. 日時を表示可能な表示部と、
当該表示部の動作を制御する表示制御部と
を備えた電子時計であることを特徴とする請求項1〜11の何れか一項に記載の電子機器。
A display unit capable of displaying the date and time;
The electronic device according to any one of claims 1 to 11, being an electronic timepiece comprising: a display control unit configured to control an operation of the display unit.
日時を計数する計時部と、測位衛星からの送信電波を受信する受信部と、を備えたコンピュータを、
前記受信された送信電波から日時を取得する日時取得手段、
として機能させることを特徴とするプログラムであって、
前記日時取得手段は、
前記受信部により受信された第1時間単位の第1日時情報と、前記計時部の日時から算出され、前記第1時間単位より単位幅が大きい第2時間単位の内部日時情報と、に基づいて、前記内部日時情報に係る範囲内の日時を算出する日時算出手段、
前記日時算出手段により算出された日時と、前記計時部により計数されている日時と、の差分に基づいて前記算出された日時を補正する日時補正手段、
を有し、
前記日時補正手段は、
前記差分が所定幅以上であるか否かを判別する誤差判定手段、
前記所定幅以上であると判別された場合に、前記算出された日時が前記計時部の日時から異なっている方向とは反対方向に、当該算出された日時を前記第2時間単位の単位幅分ずらした日時に補正する誤差整合手段、
を有することを特徴とするプログラム。
A computer provided with a timekeeping unit for counting date and time, and a reception unit for receiving a radio wave transmitted from a positioning satellite,
Date and time acquisition means for acquiring a date and time from the received transmission radio wave,
A program that is characterized as functioning as
The date and time acquisition means
Based on the first date and time information of the first time unit received by the receiving unit, and internal date and time information of the second time unit calculated from the date and time of the time counting unit and having a unit width larger than the first time unit. Date and time calculation means for calculating date and time within a range related to the internal date and time information;
Date and time correction means for correcting the calculated date and time based on the difference between the date and time calculated by the date and time calculation means and the date and time counted by the timekeeping unit;
Have
The date and time correction means
An error determination unit that determines whether the difference is equal to or greater than a predetermined width;
When it is determined that the calculated width is equal to or more than the predetermined width, the calculated date is divided by the unit width of the second time unit in the direction opposite to the direction in which the calculated date is different from the date of the timekeeping unit. Error matching means to correct on shifted date,
A program characterized by having:
日時を計数する計時部と、
測位衛星からの送信電波を受信する受信部と、
を用いた日時情報の取得方法であって、
前記受信された送信電波から日時を取得する日時取得ステップ、
を含み、
前記日時取得ステップは、
前記受信部により受信された第1時間単位の第1日時情報と、前記計時部の日時から算出され、前記第1時間単位より単位幅が大きい第2時間単位の内部日時情報と、に基づいて、前記内部日時情報に係る範囲内の日時を算出する日時算出ステップ、
前記日時算出ステップで算出された日時と、前記計時部により計数されている日時と、の差分に基づいて前記算出された日時を補正する日時補正ステップ、
を含み、
前記日時補正ステップは、
前記差分が所定幅以上であるか否かを判別する誤差判定ステップ、
前記所定幅以上であると判別された場合に、前記算出された日時が前記計時部の日時から異なっている方向とは反対方向に、当該算出された日時を前記第2時間単位の単位幅分ずらした日時に補正する誤差整合ステップ、
を含むことを特徴とする日時情報の取得方法。
Timekeeping section which counts date and time,
A receiving unit that receives a radio wave transmitted from a positioning satellite;
A method of acquiring date and time information using
A date and time acquisition step of acquiring a date and time from the received transmission radio wave,
Including
The date and time acquisition step is
Based on the first date and time information of the first time unit received by the receiving unit, and internal date and time information of the second time unit calculated from the date and time of the time counting unit and having a unit width larger than the first time unit. A date and time calculating step of calculating a date and time within a range related to the internal date and time information;
A date and time correction step for correcting the calculated date and time based on the difference between the date and time calculated at the date and time calculating step and the date and time counted by the clock unit.
Including
The date and time correction step is
An error determining step of determining whether the difference is equal to or greater than a predetermined width;
When it is determined that the calculated width is equal to or more than the predetermined width, the calculated date is divided by the unit width of the second time unit in the direction opposite to the direction in which the calculated date is different from the date of the timekeeping unit. Error matching step to correct to shifted date and time,
A method of acquiring date and time information, including:
JP2018213404A 2013-12-26 2018-11-14 Electronic device, program, and acquisition method of date and time information Active JP6741058B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2013268841 2013-12-26
JP2013268841 2013-12-26

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014207038A Division JP6435762B2 (en) 2013-12-26 2014-10-08 Electronic device, program, and date / time information acquisition method

Publications (2)

Publication Number Publication Date
JP2019045506A true JP2019045506A (en) 2019-03-22
JP6741058B2 JP6741058B2 (en) 2020-08-19

Family

ID=65812818

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018213404A Active JP6741058B2 (en) 2013-12-26 2018-11-14 Electronic device, program, and acquisition method of date and time information

Country Status (1)

Country Link
JP (1) JP6741058B2 (en)

Also Published As

Publication number Publication date
JP6741058B2 (en) 2020-08-19

Similar Documents

Publication Publication Date Title
JP6435762B2 (en) Electronic device, program, and date / time information acquisition method
JP5842908B2 (en) Radio clock
JP6075297B2 (en) Radio clock
JP6327183B2 (en) Radio wave receiver, radio wave clock, signal acquisition method and program
JP6508103B2 (en) Radio wave clock, leap second correction information acquisition method, and program
JP6508096B2 (en) Satellite radio wave receiver, radio wave clock, date and time information output method, and program
JP2016121983A (en) Radio clock, date and time information acquisition method and program
CN109100930B (en) Electronic device, date and time acquisition control method, and recording medium
JP6394008B2 (en) Electronic clock and date data correction method
JP6888575B2 (en) Electronic clock and information acquisition method
JP6741058B2 (en) Electronic device, program, and acquisition method of date and time information
JP6485148B2 (en) Radio clock
JP6264175B2 (en) Radio clock
US10915071B2 (en) Electronic timepiece, device, method and computer-readable storage device storing instructions for controlling method for obtaining date/time information
JP6687141B2 (en) Radio clock
JP6493574B2 (en) Radio wave receiver, radio wave clock, signal acquisition method and program
JP6562067B2 (en) Radio clock
JP6953860B2 (en) Electronic clock, date and time information acquisition method and program
JP2019060753A (en) Satellite radio wave receiver, electronic timepiece, date-time information acquisition control method and program
JP2018025459A (en) Satellite radio wave receiving device, electronic clock, radio wave reception level determination method, and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181206

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181206

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200131

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200623

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200706

R150 Certificate of patent or registration of utility model

Ref document number: 6741058

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150