JP4161985B2 - Portable electronic device with orientation detection function and calibration method thereof - Google Patents

Portable electronic device with orientation detection function and calibration method thereof Download PDF

Info

Publication number
JP4161985B2
JP4161985B2 JP2005170674A JP2005170674A JP4161985B2 JP 4161985 B2 JP4161985 B2 JP 4161985B2 JP 2005170674 A JP2005170674 A JP 2005170674A JP 2005170674 A JP2005170674 A JP 2005170674A JP 4161985 B2 JP4161985 B2 JP 4161985B2
Authority
JP
Japan
Prior art keywords
electronic device
portable electronic
magnetic sensor
unit
offset
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.)
Expired - Fee Related
Application number
JP2005170674A
Other languages
Japanese (ja)
Other versions
JP2006023293A (en
Inventor
秀樹 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP2005170674A priority Critical patent/JP4161985B2/en
Publication of JP2006023293A publication Critical patent/JP2006023293A/en
Application granted granted Critical
Publication of JP4161985B2 publication Critical patent/JP4161985B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measuring Magnetic Variables (AREA)
  • Telephone Function (AREA)

Description

本発明は、方位検出機能付き携帯電子機器に関し、特には、折畳み式の携帯電子機器に搭載された磁気センサの出力のキャリブレーションを容易にするための技術に関する。   The present invention relates to a portable electronic device with an azimuth detection function, and more particularly to a technique for facilitating calibration of the output of a magnetic sensor mounted on a folding portable electronic device.

地磁気を検出する磁気センサを備え、この磁気センサによって検出された地磁気に基づいて方位測定を行う携帯電話等の携帯端末が知られている。測定された方位は、例えば地図の表示に利用される。一例として挙げると、位置検出を行うGPS(Global Positioning System)センサを備え、現在位置に基づいた地図を、携帯端末の向き(方位)に合わせて表示する機能を有する携帯端末が登場している。   A portable terminal such as a mobile phone that includes a magnetic sensor that detects geomagnetism and performs azimuth measurement based on the geomagnetism detected by the magnetic sensor is known. The measured orientation is used for display of a map, for example. As an example, a mobile terminal that has a GPS (Global Positioning System) sensor for detecting a position and has a function of displaying a map based on the current position in accordance with the orientation (direction) of the mobile terminal has appeared.

ところが、携帯端末は、これに搭載されるスピーカおよびマイクロホンや、着磁した電子部品の金属パッケージ等から漏れる磁気が存在するため、この携帯端末に搭載された磁気センサは、携帯端末内部の電子部品等から発生する磁界と地磁気とが合成された磁界を検出することになる。したがって、携帯端末内部の電子部品等から発生する磁界による誤差(オフセット)分を補正するためのキャリブレーションが必要となる。従来、キャリブレーションを行うために、ユーザが携帯端末を例えば180度回転させる動作を行っていた。この動作の間に携帯端末は磁気センサから測定データを収集し、測定データに基づいてオフセットを推定していた。   However, since a mobile terminal has magnetism leaking from a speaker and a microphone mounted on the mobile terminal and a metal package of a magnetized electronic component, the magnetic sensor mounted on the mobile terminal is an electronic component inside the mobile terminal. Thus, a magnetic field generated by combining the magnetic field generated from the magnetic field and the geomagnetism is detected. Therefore, calibration for correcting an error (offset) due to a magnetic field generated from an electronic component or the like inside the portable terminal is required. Conventionally, in order to perform calibration, the user has performed an operation of rotating the mobile terminal, for example, 180 degrees. During this operation, the mobile terminal collects measurement data from the magnetic sensor and estimates an offset based on the measurement data.

このような、携帯端末に搭載された磁気センサのキャリブレーションに関しては、例えば特許文献1に開示された技術がある。この技術では、携帯端末を所定の角度ずつ回転させ、各角度において磁気センサによって測定されたデータに基づいてオフセットを推定することにより、回転速度に依存せずにキャリブレーションを行えるようになっている。
特開2004−12416号公報
Regarding the calibration of such a magnetic sensor mounted on a portable terminal, there is a technique disclosed in Patent Document 1, for example. In this technology, the portable terminal is rotated by a predetermined angle, and the offset is estimated based on data measured by the magnetic sensor at each angle, so that calibration can be performed without depending on the rotation speed. .
JP 2004-12416 A

しかし、特許文献1に記載の方法でも、ユーザが意識的に磁気センサを搭載した携帯機器を回転させ、そのキャリブレーションを行わなければならず、従来よりは改善されるものの、ユーザにキャリブレーションのための操作を強いるので、ユーザにとっては面倒なものであることに変わりはない。また、ユーザがキャリブレーションを怠ったり忘れていると、地磁気センサを最適な状態で動作させることができなかった。   However, even in the method described in Patent Document 1, the user must consciously rotate the portable device on which the magnetic sensor is mounted and calibrate the portable device. Therefore, it is troublesome for the user. In addition, if the user neglects or forgets calibration, the geomagnetic sensor cannot be operated in an optimum state.

本発明は、上記の点に鑑みてなされたもので、折畳み式の携帯電子機器に搭載された磁気センサからなる方位検出手段のキャリブレーションを、ユーザに負担をかけずに容易に行える方位検出機能付き携帯電子機器及びそのキャリブレーション方法を提供するものである。   The present invention has been made in view of the above points, and an orientation detection function that can easily perform calibration of orientation detection means including a magnetic sensor mounted on a folding portable electronic device without imposing a burden on the user. A portable electronic device and a calibration method thereof are provided.

上記課題を解決するため、請求項1に記載の発明の方位検出機能付き携帯電子機器は、磁気センサを有する方位検出手段を搭載した折畳み式の携帯電子機器において、該携帯電子機器の開閉を検出する開閉検出手段と、前記磁気センサの出力データを複数格納するデータ格納手段と、前記開閉検出手段により検出される当該携帯電子機器を開くタイミングあるいは閉じるタイミングで前記磁気センサの出力データの前記データ格納手段への格納を開始し、前記データ格納手段に格納された複数の出力データに基づき前記磁気センサの出力の誤差であるオフセットを推定して、前記磁気センサの出力を補正するために用いるオフセット値を更新する制御手段とを、具備することを特徴としている。 In order to solve the above-described problem, the portable electronic device with an orientation detection function according to the first aspect of the invention is a folding portable electronic device equipped with an orientation detection means having a magnetic sensor, and detects opening and closing of the portable electronic device. an opening and closing detection means for a data storage means for storing a plurality of output data of the magnetic sensor, the data storage of the output data of said magnetic sensor at the timing or closing timing of opening the portable electronic device is detected by the opening and closing detecting means An offset value used to correct the output of the magnetic sensor by starting storage in the device, estimating an offset that is an error in the output of the magnetic sensor based on a plurality of output data stored in the data storage device And a control means for updating.

また、請求項2に記載の発明は、請求項1に記載の方位検出機能付き携帯電子機器において、前記磁気センサを、当該折畳み式の携帯電子機器を当該携帯電子機器の一つのユニットを固定して開く際移動させる他のユニット側に設けたことを特徴としている。   According to a second aspect of the present invention, in the portable electronic device with an orientation detection function according to the first aspect, the magnetic sensor is fixed to the folding portable electronic device and one unit of the portable electronic device is fixed. It is provided on the other unit side to be moved when opened.

また、請求項3に記載の発明は、請求項1または請求項2に記載の方位検出機能付き携帯電子機器において、前記磁気センサを、磁気発生源より離れた位置に設けたことを特徴としている。   According to a third aspect of the present invention, in the portable electronic device with an orientation detection function according to the first or second aspect, the magnetic sensor is provided at a position away from the magnetic source. .

また、請求項4に記載の発明は、請求項1から請求項3のいずれかに記載の方位検出機能付き携帯電子機器において、前記制御手段により前記オフセットの推定が無効であると判定された場合、前記制御手段は、当該折畳み式の携帯電子機器をさらに開くあるいは閉じるようにユーザに指示するための制御を行うことを特徴としている。   According to a fourth aspect of the present invention, in the portable electronic device with an orientation detection function according to any one of the first to third aspects, the control means determines that the offset estimation is invalid. The control means performs control for instructing the user to further open or close the foldable portable electronic device.

また、請求項5に記載の発明は、請求項1から請求項3のいずれかに記載の方位検出機能付き携帯電子機器において、前記制御手段により、前記オフセットの推定が無効であると判定された場合、前記制御手段は、当該折畳み式の携帯電子機器を複数の方向で開くあるいは閉じるようにユーザに指示するための制御を行うことを特徴としている。   According to a fifth aspect of the present invention, in the portable electronic device with an orientation detection function according to any one of the first to third aspects, the offset is determined to be invalid by the control means. In this case, the control means performs control for instructing the user to open or close the folding portable electronic device in a plurality of directions.

また、請求項6に記載の発明の方位検出機能付き携帯電子機器のキャリブレーション方法は、磁気センサからなる方位検出手段と前記磁気センサの出力データを複数格納するデータ格納手段を搭載した折畳み式の携帯電子機器における方位検出手段のキャリブレーション方法であって、前記携帯電子機器の開閉を検出し、前記携帯電子機器を開くタイミングあるいは閉じるタイミングで前記磁気センサの出力データの前記データ格納手段への格納を開始し、前記データ格納手段に格納された複数の出力データに基づき前記磁気センサの出力の誤差であるオフセットを推定し、前記磁気センサの出力を補正するために用いるオフセット値を更新することを特徴としている。 According to a sixth aspect of the present invention, there is provided a folding method for a portable electronic device with an orientation detection function, which is a folding type equipped with an orientation detection means comprising a magnetic sensor and a data storage means for storing a plurality of output data of the magnetic sensor . A method for calibrating a direction detecting means in a portable electronic device, wherein the opening / closing of the portable electronic device is detected, and the output data of the magnetic sensor is stored in the data storage means at the timing of opening or closing the portable electronic device. Starting offset, estimating an offset which is an error in the output of the magnetic sensor based on a plurality of output data stored in the data storage means, and updating an offset value used for correcting the output of the magnetic sensor. It is a feature.

請求項に記載の方位検出機能付き携帯電子機器は、請求項1から請求項5のいずれかに記載の方位検出機能付き携帯電子機器において、前記複数の出力データと前記推定されたオフセットとの座標上における距離の標準偏差を算出する標準偏差算出手段と、算出された前記標準偏差に基づいて、推定された前記オフセットの有効性を判定する有効性判定手段と、を備えることを特徴としている。 The portable electronic device with an orientation detection function according to claim 7 is the portable electronic device with an orientation detection function according to any one of claims 1 to 5, wherein the plurality of output data and the estimated offset are A standard deviation calculating unit that calculates a standard deviation of the distance on the coordinates; and an effectiveness determining unit that determines the effectiveness of the estimated offset based on the calculated standard deviation. .

請求項に記載の方位検出機能付き携帯電子機器は、請求項1から請求項5のいずれかに記載の方位検出機能付き携帯電子機器において、互いに直交するX、Y、Z軸の3軸に感磁方向を有する前記磁気センサの検出データ(x、y、z)(i=1、2、…、N)を読み出す手段と、最小二乗誤差を[数6]で定義し、
The portable electronic device with azimuth detection function according to claim 8 is the portable electronic device with azimuth detection function according to any one of claims 1 to 5, wherein the X, Y, and Z axes are orthogonal to each other. detection of the magnetic data with the magnetic sensitive direction (x i, y i, z i) (i = 1,2, ..., N) and means for reading, a minimum square error defined in Equation 6],

Figure 0004161985
Figure 0004161985

i=x +y +z 、bi=−2x、ci=−2y、di=−2zとおいて[数6]を変形した[数7]に対して、 For [Equation 7] obtained by modifying [Equation 6] with a i = x i 2 + y i 2 + z i 2 , b i = −2x i , c i = −2y i , d i = −2z i ,

Figure 0004161985
Figure 0004161985

最小二乗誤差εを最小にする条件[数8]を、 The condition [Equation 8] that minimizes the least square error ε is

Figure 0004161985
Figure 0004161985

[数9]の表記を用いて[数10]に示した方程式を解くことにより   By solving the equation shown in [Equation 10] using the notation of [Equation 9]

Figure 0004161985
Figure 0004161985

Figure 0004161985
Figure 0004161985

前記磁気センサのオフセット(X0、Y0、Z0)を求める手段と、を有することを特徴としている。   Means for obtaining an offset (X0, Y0, Z0) of the magnetic sensor.

本発明によれば、折畳み式携帯電子機器の開閉動作時に方位検出手段のキャリブレーションを自動的に行うので、ユーザにキャリブレーションのための操作を強いることがなく、キャリブレーションが容易となる。
また、従来では、ユーザがキャリブレーションの操作を怠ったり忘れたりした場合、地磁気センサを最適な状態で動作させることができなかったが、本発明では、当該携帯電子機器が通常使用される際の開閉動作時に自動的にキャリブレーションがなされることになるので、このような問題がない。
According to the present invention, since the calibration of the azimuth detecting means is automatically performed at the time of opening / closing operation of the folding portable electronic device, the calibration is easy without forcing the user to perform the calibration operation.
Further, conventionally, when the user neglects or forgets the calibration operation, the geomagnetic sensor could not be operated in an optimum state. However, in the present invention, when the portable electronic device is normally used Since calibration is automatically performed during the opening / closing operation, there is no such problem.

以下、本発明の実施の形態を、図面を参照して説明する。
図1は、本発明の方位検出機能付き携帯電子機器の一実施の形態である、CDMA(Code Division Multiple Access:符号分割多元接続)通信方式による携帯通信端末(以下、携帯端末と称す)の電気的構成を示すブロック図である。
なお、以下において、参照する各図に共通する部分には、同一の符号を附している。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is an electric diagram of a mobile communication terminal (hereinafter referred to as a mobile terminal) using a CDMA (Code Division Multiple Access) communication system, which is an embodiment of the mobile electronic device with an orientation detection function of the present invention. It is a block diagram which shows a typical structure.
In the following description, the same reference numerals are given to portions common to the respective drawings to be referred to.

本実施の形態の携帯端末1は、2つの筐体(端末ユニット−1および端末ユニット−2)を備えた、いわゆる折畳み式の構造をもつ。すなわち、この2つの筐体は、図示しない連結部を介して連結され、この連結部の回転軸を中心に端末ユニット−1と端末ユニット−2が開閉自在に構成されている。折畳み式の携帯端末には、2つのユニットが重なった状態から、この携帯端末の主面(閉じた状態で端末ユニット−1と端末ユニット−2が重なる面)に垂直に開き始めそのまま回転軸を中心に回転させる一般的な折畳み式と、携帯端末の主面に平行に端末ユニット−1と端末ユニット−2を回転させ開閉自在としたリボルバー式と呼ばれるものがある。本実施の形態では、特に区別する場合に、一般的な折畳み式と、リボルバー式とを区別するが、リボルバー式の携帯端末も折畳み式の携帯端末に含まれるものとする。   The mobile terminal 1 according to the present embodiment has a so-called foldable structure including two housings (terminal unit-1 and terminal unit-2). That is, the two housings are connected via a connecting portion (not shown), and the terminal unit-1 and the terminal unit-2 are configured to be openable and closable around the rotation axis of the connecting portion. The folding portable terminal starts to open perpendicularly to the main surface of the portable terminal (the surface where the terminal unit-1 and the terminal unit-2 overlap in the closed state) from the state where the two units overlap, and the rotation axis remains unchanged. There are a general foldable type that rotates to the center and a revolver type that can be freely opened and closed by rotating the terminal unit-1 and the terminal unit-2 parallel to the main surface of the mobile terminal. In this embodiment, when particularly distinguishing, a general foldable type and a revolver type are distinguished, but a revolver type portable terminal is also included in the foldable type portable terminal.

次に、本実施の形態の携帯端末1の電気的構成について説明する。
図1に示すアンテナ101は図示せぬ無線基地局と電波の送受信を行う。RF部102は信号の送受信に係る処理を行う。このRF部102は局部発振器等を備え、受信時にアンテナ101から出力された受信信号に対して所定周波数の局部発信信号を混合することにより、受信信号を中間周波数(IF)の受信IF信号に変換し、変復調部103へ出力する。また、RF部102は送信時に中間周波数の送信IF信号に対して所定周波数の局部発信信号を混合することにより、送信IF信号を送信周波数の送信信号に変換し、アンテナ101へ出力する。
Next, the electrical configuration of the mobile terminal 1 of the present embodiment will be described.
An antenna 101 shown in FIG. 1 transmits and receives radio waves to and from a radio base station (not shown). The RF unit 102 performs processing related to signal transmission / reception. This RF unit 102 includes a local oscillator and the like, and converts a received signal into a received IF signal of an intermediate frequency (IF) by mixing a locally transmitted signal of a predetermined frequency with a received signal output from the antenna 101 during reception. And output to the modem 103. Further, the RF unit 102 mixes a local transmission signal having a predetermined frequency with a transmission IF signal having an intermediate frequency during transmission, thereby converting the transmission IF signal into a transmission signal having a transmission frequency and outputting the signal to the antenna 101.

変復調部103は、受信された信号の復調処理、および送信される信号の変調処理を行う。この変復調部103は局部発振器等を備え、RF部102から出力された受信IF信号を所定周波数のベースバンド信号に変換すると共に、このベースバンド信号をデジタル信号に変換し、CDMA部104へ出力する。また、この変復調部103は、CDMA部104から出力された送信用のデジタルのベースバンド信号をアナログ信号に変換すると共に、所定周波数の送信IF信号に変換してRF部102へ出力する。
CDMA部104は、送信される信号の符号化処理、および受信された信号の複号化処理を行う。このCDMA部104は、変復調部103から出力されたベースバンド信号を復号化する。また、CDMA部104は、送信用の信号を符号化し、符号化したベースバンド信号を変復調部103へ出力する。
The modem 103 performs demodulation processing on the received signal and modulation processing on the transmitted signal. The modulation / demodulation unit 103 includes a local oscillator and the like, converts the received IF signal output from the RF unit 102 into a baseband signal having a predetermined frequency, converts the baseband signal into a digital signal, and outputs the digital signal to the CDMA unit 104. . Further, the modem unit 103 converts the digital baseband signal for transmission output from the CDMA unit 104 into an analog signal, converts it into a transmission IF signal having a predetermined frequency, and outputs the signal to the RF unit 102.
The CDMA unit 104 performs encoding processing of a transmitted signal and decoding processing of a received signal. The CDMA unit 104 decodes the baseband signal output from the modem unit 103. The CDMA unit 104 encodes a transmission signal and outputs the encoded baseband signal to the modem unit 103.

音声処理部105は、通話時の音声に係る処理を行う。この音声処理部105は、通話時にマイクロホン(MIC)から出力されたアナログの音声信号をデジタル信号に変換し、送信用の信号としてCDMA部104へ出力する。また、この音声処理部105は、通話時にCDMA部104によって復号化された音声データを示す信号に基づいて、スピーカ(SP)を駆動するためのアナログの駆動信号を生成し、スピーカ(SP)へ出力する。マイクロホン(MIC)は、ユーザによって入力された音声に基づいた音声信号を生成し、音声処理部105へ出力する。スピーカ(SP)は、音声処理部105から出力された信号に基づいて、通話相手の音声を放音する。   The voice processing unit 105 performs processing related to voice during a call. The voice processing unit 105 converts an analog voice signal output from a microphone (MIC) during a call into a digital signal and outputs the digital signal to the CDMA unit 104 as a transmission signal. Also, the voice processing unit 105 generates an analog drive signal for driving the speaker (SP) based on a signal indicating the voice data decoded by the CDMA unit 104 during a call, and sends the analog drive signal to the speaker (SP). Output. The microphone (MIC) generates an audio signal based on the audio input by the user and outputs the audio signal to the audio processing unit 105. The speaker (SP) emits the other party's voice based on the signal output from the voice processing unit 105.

GPSアンテナ106は、図示せぬGPS衛星から送信された電波を受信し、この電波に基づいた受信信号をGPS受信部107へ出力する。GPS受信部107はこの受信信号を復調し、受信信号に基づいて、GPS衛星の正確な時刻情報や電波の伝播時間等の情報を取得する。GPS受信部107は取得した情報に基づいて、3以上のGPS衛星までの距離を算出し、三角測量の原理により、3次元空間上の位置(緯度・経度・高度等)を算出する。   The GPS antenna 106 receives a radio wave transmitted from a GPS satellite (not shown) and outputs a reception signal based on this radio wave to the GPS receiving unit 107. The GPS receiver 107 demodulates the received signal, and acquires accurate time information of GPS satellites and information such as radio wave propagation time based on the received signal. The GPS receiving unit 107 calculates a distance to three or more GPS satellites based on the acquired information, and calculates a position (latitude, longitude, altitude, etc.) in a three-dimensional space based on the principle of triangulation.

主制御部108は、CPU(中央処理装置)等から構成され、携帯端末1内部の各部を制御する。この主制御部108は、RF部102、変復調部103、CDMA部104、音声処理部105、GPS受信部107、下記のセンサデータ取得部201、ROM109、およびRAM110とバスを介して制御信号あるいはデータの入出力を行う。ROM109は、主制御部108が実行する各種のプログラムや、出荷検査時に測定された温度センサおよび傾きセンサの初期特性値等を記憶する。RAM110は、主制御部108によって処理されるデータ等を一時的に記憶する。   The main control unit 108 includes a CPU (Central Processing Unit) and the like, and controls each unit inside the mobile terminal 1. The main control unit 108 includes an RF unit 102, a modem unit 103, a CDMA unit 104, an audio processing unit 105, a GPS reception unit 107, a sensor data acquisition unit 201, a ROM 109, and a RAM 110, and a control signal or data via a bus. I / O is performed. The ROM 109 stores various programs executed by the main control unit 108, initial characteristic values of the temperature sensor and the tilt sensor measured at the time of shipping inspection, and the like. The RAM 110 temporarily stores data processed by the main control unit 108.

報知手段111は、例えばスピーカ、バイブレータ、または発光ダイオード等を備え、着信やメール受信等を、音、振動、または光等によってユーザに報知する。時計部112は計時機能を有し、年、月、日、曜日、時刻等の計時情報を生成する。主操作部113は、ユーザによって操作される文字入力用の入力キー、漢字・数字等の変換用の変換キー、カーソル操作用のカーソルキー、電源のオン/オフキー、通話キー、およびリダイアルキー等を備え、ユーザによる操作結果を示す信号を主制御部108へ出力する。また、開閉スイッチ(SW)114は、折畳み式携帯端末の開け始めと閉め終わりを検出するためのスイッチである。   The notification unit 111 includes, for example, a speaker, a vibrator, a light emitting diode, or the like, and notifies the user of an incoming call or mail reception by sound, vibration, light or the like. The clock unit 112 has a clocking function, and generates clocking information such as year, month, day, day of the week, and time. The main operation unit 113 includes input keys for character input operated by the user, conversion keys for conversion of kanji and numbers, cursor keys for cursor operation, power on / off key, call key, redial key, and the like. And outputs a signal indicating the operation result of the user to the main control unit 108. The open / close switch (SW) 114 is a switch for detecting the opening and closing ends of the folding portable terminal.

センサデータ取得部201は、互いに直交するX軸・Y軸・Z軸の各々の軸方向の磁気(磁界)を検出する磁気センサ(1)〜(3)、温度を検出する温度センサ、携帯端末1の傾きを検出する物理量センサ、および上記の各センサによる検出結果を処理(A/D変換等)するセンサ制御部を備えている。   The sensor data acquisition unit 201 includes magnetic sensors (1) to (3) that detect magnetism (magnetic fields) in the axial directions of the X axis, the Y axis, and the Z axis that are orthogonal to each other, a temperature sensor that detects temperature, and a portable terminal 1 includes a physical quantity sensor that detects the inclination of 1 and a sensor control unit that processes (A / D conversion, etc.) the detection results of the sensors.

電子撮像部202は、光学レンズおよびCCD(Charge Coupled Device)等の撮像素子を備え、光学レンズにより撮像素子の撮像面上に結像した被写体の像を撮像素子によりアナログ信号に変換し、このアナログ信号をデジタル信号に変換して主制御部108へ出力する。表示部203は液晶ディスプレイ等を備え、主制御部108から出力された表示用の信号に基づいて画像や文字等を表示する。タッチパネル204は、表示部203が備える液晶ディスプレイの表面に組み込まれ、ユーザによる操作内容に応じた信号を主制御部108へ出力する。副操作部205は、表示切替に用いられるプッシュスイッチ等を備えている。   The electronic imaging unit 202 includes an optical lens and an imaging device such as a CCD (Charge Coupled Device), converts an image of a subject formed on the imaging surface of the imaging device by the optical lens into an analog signal, and converts the analog signal to the analog signal. The signal is converted into a digital signal and output to the main control unit 108. The display unit 203 includes a liquid crystal display or the like, and displays images, characters, and the like based on display signals output from the main control unit 108. The touch panel 204 is incorporated on the surface of the liquid crystal display included in the display unit 203 and outputs a signal corresponding to the operation content by the user to the main control unit 108. The sub-operation unit 205 includes a push switch used for display switching.

ここで、図2に示す機能ブロック図について説明する。
なお、同図に示す方位データ演算部307は、図1に示す主制御部108が対応し、表示手段316は、図1に示す表示部203が対応する。
Here, the functional block diagram shown in FIG. 2 will be described.
1 corresponds to the main control unit 108 illustrated in FIG. 1, and the display unit 316 corresponds to the display unit 203 illustrated in FIG.

磁気センサ部301は、磁気センサ(1)〜(3)と、電源投入後、各磁気センサを初期化するためのセンサ初期化手段(1)〜(3)とを備えている。センサ初期化手段(1)〜(3)は、強磁界が印加された場合、磁気センサ(1)〜(3)の磁性体の磁化の向きが狂ってしまうことから、磁気センサ(1)〜(3)を初期状態にリセットするために設けられるものである。   The magnetic sensor unit 301 includes magnetic sensors (1) to (3) and sensor initialization means (1) to (3) for initializing each magnetic sensor after the power is turned on. When the strong magnetic field is applied to the sensor initialization means (1) to (3), the direction of magnetization of the magnetic bodies of the magnetic sensors (1) to (3) is out of order. This is provided to reset (3) to the initial state.

傾きセンサ部302は、物理量センサ(傾きセンサ)と、物理量センサの出力値のオフセット、感度などの値を示す初期値を予め製造時に記憶する傾きセンサ初期値記憶手段と、測定時に、傾きセンサ初期値記憶手段によって記憶されている初期値に基づいて物理量センサの出力を補正する傾きセンサ補正手段とを備えている。
温度センサ部303は、温度センサと、温度センサの出力値のオフセット、感度などの値を示す初期値を予め製造時に記憶する温度センサ初期値記憶手段と、測定時に、温度センサ初期値記憶手段によって記憶されている初期値に基づいて温度センサの出力を補正する温度センサ補正手段とを備えている。
The inclination sensor unit 302 includes a physical quantity sensor (inclination sensor), an inclination sensor initial value storage unit that stores initial values indicating values such as offset and sensitivity of output values of the physical quantity sensor in advance, and an initial inclination sensor at the time of measurement. Inclination sensor correction means for correcting the output of the physical quantity sensor based on the initial value stored by the value storage means.
The temperature sensor unit 303 includes a temperature sensor, temperature sensor initial value storage means for storing initial values indicating values such as offset and sensitivity of the output value of the temperature sensor in advance, and temperature sensor initial value storage means for measurement. Temperature sensor correction means for correcting the output of the temperature sensor based on the stored initial value.

切り替え手段304は、磁気センサ部301、傾きセンサ部302、および温度センサ部303からの出力を切り替え、いずれかのセンサ部から出力されたアナログ信号をA/D変換回路305に入力する。A/D変換回路305はこのアナログ信号をデジタル信号に変換する。スキャン範囲設定手段306は、各センサの出力電圧を量子化してデジタル変換する際の変換単位となる電圧レンジ、量子化単位(例えば0.1mVきざみで量子化する等)をセンサごとに設定する。   The switching unit 304 switches outputs from the magnetic sensor unit 301, the tilt sensor unit 302, and the temperature sensor unit 303, and inputs an analog signal output from any one of the sensor units to the A / D conversion circuit 305. The A / D conversion circuit 305 converts this analog signal into a digital signal. The scan range setting unit 306 sets a voltage range and a quantization unit (for example, quantization in increments of 0.1 mV) as a conversion unit when the output voltage of each sensor is quantized and digitally converted for each sensor.

方位データ演算部307において、データ格納判定手段308は、キャリブレーション時に、磁気センサの出力に対応したデジタル信号によって示される測定データを記憶手段に格納すべきかどうかの判定等の、データ格納に関する処理を行う。オフセット推定手段310は、キャリブレーション時に取得した測定データに基づいてオフセットを推定する(詳細は後述)。有効性判定手段311は、オフセット推定手段310によって推定されたオフセットの有効性を判定する(詳細は後述)。記憶手段309は、測定データ等を記憶する。   In the azimuth data calculation unit 307, the data storage determination unit 308 performs processing related to data storage such as determination of whether or not the measurement data indicated by the digital signal corresponding to the output of the magnetic sensor should be stored in the storage unit during calibration. Do. The offset estimation means 310 estimates the offset based on the measurement data acquired at the time of calibration (details will be described later). The validity determination unit 311 determines the validity of the offset estimated by the offset estimation unit 310 (details will be described later). The storage unit 309 stores measurement data and the like.

方位演算手段312は、方位演算時に、このとき取得された測定データに基づいて方位を算出する。オフセット除去手段313は、方位演算時に取得された測定データからオフセットを除去する。温度補正手段314は、測定データの温度補正が必要な場合に、この測定データに対する温度補正を行う。傾き補正手段315は、傾き補正が必要な場合に、測定データに対する傾き補正を行う。表示手段316は、方位演算手段312によって算出された方位を画像として表示する。   The azimuth calculating means 312 calculates the azimuth based on the measurement data acquired at the time of azimuth calculation. The offset removing unit 313 removes the offset from the measurement data acquired during the azimuth calculation. The temperature correction means 314 performs temperature correction on the measurement data when temperature correction of the measurement data is necessary. The tilt correction unit 315 performs tilt correction on the measurement data when tilt correction is necessary. The display unit 316 displays the azimuth calculated by the azimuth calculation unit 312 as an image.

ここで、方位データ演算部307の動作の詳細を説明する。
キャリブレーション時には、センサデータ取得部201から出力される測定データがデータ格納判定手段308に入力される。データ格納判定手段308は、データ格納判定アルゴリズムに基づいて、測定データを記憶手段309に格納すべきかどうか判定する。判定の結果、測定データを記憶手段309に格納すべきと判定した場合には、データ格納判定手段308は測定データを記憶手段309に格納する。また、データ格納判定手段308は、記憶手段309に格納された測定データの数をカウントし、測定データの数が所定の数に達した場合に、記憶手段309への測定データの格納を中止し、オフセット推定手段310に対してオフセットの推定を指示する。
Here, the details of the operation of the azimuth data calculation unit 307 will be described.
At the time of calibration, measurement data output from the sensor data acquisition unit 201 is input to the data storage determination unit 308. The data storage determination unit 308 determines whether or not the measurement data should be stored in the storage unit 309 based on the data storage determination algorithm. If it is determined that the measurement data should be stored in the storage unit 309 as a result of the determination, the data storage determination unit 308 stores the measurement data in the storage unit 309. The data storage determination unit 308 counts the number of measurement data stored in the storage unit 309, and stops storing the measurement data in the storage unit 309 when the number of measurement data reaches a predetermined number. The offset estimation unit 310 is instructed to estimate the offset.

オフセット推定手段310は、データ格納判定手段308によってオフセットの推定を指示された場合に、記憶手段309から測定データを読み出し、オフセット推定アルゴリズムに基づいてオフセットを推定する。また、オフセット推定手段310は、オフセットの推定結果を有効性判定手段311に通知する。有効性判定手段311は、オフセット推定手段310によってオフセットの推定結果が通知された場合に、記憶手段309から測定データを読み出し、有効性判定アルゴリズムに基づいて、推定されたオフセットが有効であるかどうか判定する。推定されたオフセットが有効であった場合、有効性判定手段311はこのオフセットを記憶手段309に格納する。   When the data storage determination unit 308 is instructed to estimate the offset, the offset estimation unit 310 reads the measurement data from the storage unit 309 and estimates the offset based on the offset estimation algorithm. The offset estimation unit 310 notifies the validity determination unit 311 of the offset estimation result. The validity determination unit 311 reads out the measurement data from the storage unit 309 when the offset estimation unit 310 is notified of the offset estimation result, and determines whether the estimated offset is valid based on the validity determination algorithm. judge. If the estimated offset is valid, the validity determination unit 311 stores this offset in the storage unit 309.

方位演算時には、センサデータ取得部201から出力される測定データが方位演算手段312に入力される。この測定データは、磁気データ、温度データ、および傾きデータである。方位演算手段312はオフセット除去手段313へ磁気データおよび温度データを出力する。オフセット除去手段313は、これらの測定データが入力された場合に、記憶手段309からオフセットを読み出し、磁気データからオフセット分を除去することにより補正を行い、補正後の磁気データを方位演算手段312へ出力する。   At the time of azimuth calculation, measurement data output from the sensor data acquisition unit 201 is input to the azimuth calculation means 312. This measurement data is magnetic data, temperature data, and inclination data. The azimuth calculating means 312 outputs magnetic data and temperature data to the offset removing means 313. When these measurement data are input, the offset removing unit 313 reads the offset from the storage unit 309, corrects the offset by removing the offset from the magnetic data, and sends the corrected magnetic data to the azimuth calculating unit 312. Output.

また、方位演算手段312は、必要に応じてオフセット除去手段313に対して、磁気データの温度補正を指示する。この指示を受けたオフセット除去手段313は、温度補正手段314に対して温度データを出力する。温度補正手段314は、キャリブレーション時の温度データを記憶手段309から読み出し、現在の温度とキャリブレーション時の温度とに基づいて、現在の磁気データを補正し、オフセット除去手段313へ補正結果を通知する。オフセット除去手段313は、この補正結果に基づいて、温度補正をしたオフセット除去後の磁気データを方位演算手段312へ出力する。   In addition, the azimuth calculation unit 312 instructs the offset removal unit 313 to correct the temperature of the magnetic data as necessary. Upon receiving this instruction, the offset removing unit 313 outputs temperature data to the temperature correcting unit 314. The temperature correction unit 314 reads temperature data at the time of calibration from the storage unit 309, corrects the current magnetic data based on the current temperature and the temperature at the time of calibration, and notifies the offset removal unit 313 of the correction result. To do. Based on the correction result, the offset removal unit 313 outputs the temperature-corrected magnetic data after the offset removal to the azimuth calculation unit 312.

具体的には、キャリブレーション時の温度をTO、推定されているオフセットをOF、温度係数A(これは出荷検査時に測定してROM109に記録されている)、測定時の温度をT、磁気センサの測定値をS0とすると、温度補正したオフセット除去後の磁気データS1は、
S1=S0−{OF+A(T−TO)}となる。
Specifically, the temperature at the time of calibration is TO, the estimated offset is OF, the temperature coefficient A (this is measured at the time of shipping inspection and recorded in the ROM 109), the temperature at the time of measurement is T, and the magnetic sensor If the measured value of S0 is S0, the magnetic data S1 after temperature correction and offset removal is
S1 = S0− {OF + A (T−TO)}.

また、方位演算手段312は、必要に応じて傾き補正を行う。
ここで、この傾き補正についてその詳細を説明する。
ここでは、図3(a)に示すように携帯端末1の座標系を定義する。すなわち、携帯端末1のアンテナ101の方位角をα、仰角をβ、ひねり角(アンテナ軸のまわりの回転角)をγとする。符号は、同図に示す矢印方向を正とする。また、アンテナ方向の単位ベクトルをVy、端末ユニット−2(アンテナ101および磁気センサ部301が配置された側)がなす面(例えば、図3では符号99部分の面)に垂直な方向の単位ベクトルをVzとし、Vy,Vzのいずれにも直交する単位ベクトルをVxとする。なお、同図に示す矢印方向を正の向きとする。地面座標系は、図3(b)に示すように、X、Y、Zで表し、北方向をY軸にとる。
In addition, the azimuth calculation means 312 performs tilt correction as necessary.
Here, the details of the inclination correction will be described.
Here, the coordinate system of the portable terminal 1 is defined as shown in FIG. That is, the azimuth angle of the antenna 101 of the mobile terminal 1 is α, the elevation angle is β, and the twist angle (rotation angle around the antenna axis) is γ. The sign is positive in the direction of the arrow shown in the figure. Further, the unit vector in the antenna direction is Vy, and the unit vector in the direction perpendicular to the plane formed by the terminal unit-2 (the side on which the antenna 101 and the magnetic sensor unit 301 are arranged) (for example, the plane of reference numeral 99 in FIG. 3) Is Vz, and a unit vector orthogonal to both Vy and Vz is Vx. In addition, let the arrow direction shown in the figure be a positive direction. As shown in FIG. 3B, the ground coordinate system is represented by X, Y, and Z, and the north direction is the Y axis.

ここで、地面座標系での重力をG=(0,0,Gz)とする。また、携帯座標系での重力をg=(gx、gy、gz)とする。この携帯座標系での重力は傾きセンサにより検出できるものとする。もちろん、地面座標系での重力は既知である。
すると、携帯座標系の重力gと地面座標系での重力Gは、下式で表される。
(Gx,Gy,Gz)BC=(gx,gy,gz)ただし、
Here, the gravity in the ground coordinate system is G = (0, 0, Gz). Further, the gravity in the portable coordinate system is g = (gx, gy, gz). It is assumed that gravity in the portable coordinate system can be detected by an inclination sensor. Of course, gravity in the ground coordinate system is known.
Then, gravity g in the portable coordinate system and gravity G in the ground coordinate system are expressed by the following equations.
(Gx, Gy, Gz) BC = (gx, gy, gz) where

Figure 0004161985
Figure 0004161985

Figure 0004161985
Figure 0004161985

これから、BCは、下式で表せる。   From this, BC can be expressed by the following equation.

Figure 0004161985
Figure 0004161985

したがって、携帯座標系での重力gは下式で表される。   Therefore, gravity g in the portable coordinate system is expressed by the following equation.

Figure 0004161985
Figure 0004161985

この式から、仰角β、ひねり角γが求まる。   From this equation, the elevation angle β and the twist angle γ are obtained.

Figure 0004161985
Figure 0004161985

Figure 0004161985
Figure 0004161985

以上のようにして求められた仰角β、ひねり角γから方位角α、地磁気の仰角θを求めることができる。ここで携帯座標系での地磁気をh=(hx,hy,hz)、地面座標系での地磁気をH=(0,Hy,Hz)とすると、
(0,Hy,Hz)ABC=(hx,hy,hz)が成り立つ。ただし、
From the elevation angle β and twist angle γ determined as described above, the azimuth angle α and the geomagnetic elevation angle θ can be determined. Here, if the geomagnetism in the portable coordinate system is h = (hx, hy, hz) and the geomagnetism in the ground coordinate system is H = (0, Hy, Hz),
(0, Hy, Hz) ABC = (hx, hy, hz) holds. However,

Figure 0004161985
Figure 0004161985

Figure 0004161985
Figure 0004161985

Figure 0004161985
Figure 0004161985

である。これから、下式が導かれる。 It is. From this, the following equation is derived.

Figure 0004161985
Figure 0004161985

よって、
(hx’,hy’,hz’)=(Hysinα,Hycosα,Hz)となる。仰角β、ひねり角γは先に求められており、携帯座標系での地磁気hは測定されるので、(hx’,hy’,hz’)が定まる。ここで地面座標系での地磁気Hが既知であるとすると、方位角αが求まる。また、地磁気の仰角θも下式により求まる。
Therefore,
(Hx ′, hy ′, hz ′) = (Hysin α, Hycos α, Hz). Since the elevation angle β and the twist angle γ are obtained in advance and the geomagnetism h in the portable coordinate system is measured, (hx ′, hy ′, hz ′) is determined. Here, if the geomagnetism H in the ground coordinate system is known, the azimuth angle α is obtained. The geomagnetic elevation angle θ is also obtained by the following equation.

Figure 0004161985
Figure 0004161985

方位演算手段312は、以上のようにして、補正後の磁気データに基づいて方位を算出し、算出した方位を表示手段316に通知する。表示手段316は、例えば方位を示す情報を地図上に表示する。   The azimuth calculating means 312 calculates the azimuth based on the corrected magnetic data as described above, and notifies the display means 316 of the calculated azimuth. The display unit 316 displays, for example, information indicating the direction on the map.

次に、データ格納判定アルゴリズムについて説明する。
データ格納判定アルゴリズムは、ユーザが携帯端末1をほとんど動かしていないときにデータの取り込みが行われ方位円または方位球(下記)上の同一点近傍に測定データが集中したり、ユーザの動作スピードが均一でないためにデータ密度にまだらができたりしたような場合に、キャリブレーションに使えない測定データを格納するのを防止するためのものである。このような測定データが得られた場合には、測定データを記憶手段309に格納させない。
Next, a data storage determination algorithm will be described.
In the data storage determination algorithm, data is taken in when the user hardly moves the mobile terminal 1, and the measurement data is concentrated in the vicinity of the same point on the azimuth circle or azimuth sphere (below). This is to prevent storing measurement data that cannot be used for calibration when the data density is mottled due to non-uniformity. When such measurement data is obtained, the measurement data is not stored in the storage unit 309.

携帯端末1が水平面内で回転した場合(ここでは、磁気センサ(1)及び磁気センサ(2)の各軸がなすXY平面が水平面に平行であるとする)、磁界値に変換された磁気センサ(1)の出力Xは正弦波状に変化し、磁界値に変換された磁気センサ(2)の出力Yは、出力Xと位相が90度だけ異なる正弦波状に変化する。オフセットを(X0,Y0)とすると、以下の関係式が成り立ち、これを方位円と称す。
(X−X0)+(Y−Y0)=R3次元の場合も同様の関係式が成り立ち、これを方位球と称す。
(X−X0)+(Y−Y0)+(Z−Z0)=R
When the portable terminal 1 rotates in a horizontal plane (here, the XY plane formed by the axes of the magnetic sensor (1) and the magnetic sensor (2) is parallel to the horizontal plane), the magnetic sensor converted into a magnetic field value The output X of (1) changes in a sine wave shape, and the output Y of the magnetic sensor (2) converted into the magnetic field value changes in a sine wave shape whose phase is different from that of the output X by 90 degrees. Assuming that the offset is (X0, Y0), the following relational expression is established, and this is referred to as an azimuth circle.
(X−X0) 2 + (Y−Y0) 2 = R 2 The same relational expression holds for the three-dimensional case, and this is referred to as an azimuth sphere.
(X−X0) 2 + (Y−Y0) 2 + (Z−Z0) 2 = R 2

データ格納判定アルゴリズムは、具体的には、直前にRAM110に格納されたデータを(X0,Y0,Z0)とし、格納判定の対象となるデータを(X,Y,Z)として、以下の条件式が満たされた場合にのみ、データ(X,Y,Z)をRAM110に格納する。
なお、dの値としては、方位円半径の1/10程度が好ましい。
More specifically, the data storage determination algorithm uses (X0, Y0, Z0) as the data stored immediately before in the RAM 110, and (X, Y, Z) as the data to be subjected to storage determination. Only when the condition is satisfied, the data (X, Y, Z) is stored in the RAM 110.
The value of d is preferably about 1/10 of the azimuth radius.

Figure 0004161985
Figure 0004161985

次に、オフセット推定アルゴリズムについて説明する。
測定データを(x,y,z)(i=1,・・・,N)、オフセットを(X0,Y0,Z0)、方位球半径をRとすると、以下の関係式が成り立つ。
(x−X0)+(y−Y0)+(z−Z0)=Rこのとき、最小二乗誤差εを次式のように定義する。
Next, an offset estimation algorithm will be described.
When the measurement data is (x i , y i , z i ) (i = 1,..., N), the offset is (X0, Y0, Z0), and the azimuth radius is R, the following relational expression is established.
(x i −X 0) 2 + (y i −Y 0) 2 + (z i −Z 0) 2 = R 2 At this time, the least square error ε is defined as follows.

Figure 0004161985
Figure 0004161985

ここで、
i=x +y +z
i=−2x
i=−2y
i=−2z
D=(X0+Y0+Z0)−R …(1)とすると、εは以下の式となる。
here,
a i = x i 2 + y i 2 + z i 2
b i = -2x i
c i = -2y i
d i = −2z i
When D = (X0 2 + Y0 2 + Z0 2 ) −R 2 (1), ε is represented by the following equation.

Figure 0004161985
Figure 0004161985

このとき、最小二乗誤差εを最小とする条件は、X0、Y0、Z0およびDをεの独立変数とし、εをX0、Y0、Z0およびDで微分することにより以下の式となる。   At this time, the condition for minimizing the least square error ε is as follows by making X0, Y0, Z0 and D independent variables of ε and differentiating ε with X0, Y0, Z0 and D.

Figure 0004161985
Figure 0004161985

したがって、以下の式が成り立つ。   Therefore, the following equation holds.

Figure 0004161985
Figure 0004161985

ただし、 However,

Figure 0004161985
Figure 0004161985

である。この連立方程式を解くことにより、最小二乗誤差εを最小とするX0,Y0,Z0,Dが求まる。また、(1)式により、Rも求めることができる。 It is. By solving these simultaneous equations, X0, Y0, Z0, and D that minimize the minimum square error ε are obtained. In addition, R can also be obtained from equation (1).

次に、有効性判定アルゴリズムについて説明する。
このアルゴリズムによる処理では、推定されたオフセットおよび方位球(または方位円)半径と、RAM110に格納された測定データから以下の値を算出する。
Next, the effectiveness determination algorithm will be described.
In the processing by this algorithm, the following values are calculated from the estimated offset and the azimuth sphere (or azimuth circle) radius and the measurement data stored in the RAM 110.

Figure 0004161985
Figure 0004161985

Figure 0004161985
Figure 0004161985

Figure 0004161985
Figure 0004161985

Figure 0004161985
Figure 0004161985

ただし、Max(x)は、測定データx,・・・,xの中の最大値を表し、Min(x)は、測定データx,・・・,xの中の最小値を表す。また、σは標準偏差である。上記の値に対して、以下の判定基準が満たされるかどうか判定し、判定基準が満たされた場合に、推定したオフセットが有効であると判定する。
σ<F
>G
>G
>G
ここで、Fは0.1程度が好ましく、Gは1程度が好ましい。
However, Max (x i) is the minimum in the measurement data x 1, · · ·, represents the maximum value among the x N, Min (x i), the measurement data x 1, ···, x N Represents a value. Σ is a standard deviation. It is determined whether or not the following determination criterion is satisfied for the above value, and when the determination criterion is satisfied, it is determined that the estimated offset is valid.
σ <F
w x > G
w y > G
w z > G
Here, F is preferably about 0.1, and G is preferably about 1.

次に、キャリブレーションに係る動作について、図4を参照し、さらに詳細に説明する。   Next, the operation relating to calibration will be described in more detail with reference to FIG.

[リボルバー式の携帯端末の場合]
図1に示した構成例では、各磁気センサは、当該携帯端末1が開閉される際移動する側である端末ユニット−2側に配置され(一方、端末ユニット−1は、携帯端末1が開閉される際はユーザの手による把持などにより概ね固定されている)、携帯端末1がリボルバー式の場合では、開閉時に回転させる側に搭載されことになる(図5参照)。この磁気センサが配置される位置は、端末ユニット−1と端末ユニット−2を結合する部分に近い方が好適である(もちろん、端末ユニット−1側に配置してもよい)。この位置は通常、磁気を発生するマイクロホンMICやスピーカSPが配置される位置から離れているからである。携帯端末1には開閉スイッチ(SW)114が設けられており、開閉動作を、開け始め、閉め終わりの段階で認識できる。磁気センサ部301は、二軸磁気センサからなるものでも三軸磁気センサからなるものでもよい。
[For revolver type mobile terminals]
In the configuration example shown in FIG. 1, each magnetic sensor is arranged on the terminal unit-2 side, which is the side that moves when the mobile terminal 1 is opened and closed (while the mobile terminal 1 is opened and closed in the terminal unit-1). When the portable terminal 1 is a revolver type, it is mounted on the side to be rotated when opening and closing (see FIG. 5). The position where this magnetic sensor is arranged is preferably closer to the portion where terminal unit-1 and terminal unit-2 are coupled (of course, it may be arranged on the terminal unit-1 side). This is because this position is usually away from the position where the microphone MIC and the speaker SP that generate magnetism are arranged. The portable terminal 1 is provided with an open / close switch (SW) 114 so that the open / close operation can be recognized at the stage of opening and closing. The magnetic sensor unit 301 may be a biaxial magnetic sensor or a triaxial magnetic sensor.

(1)キャリブレーション方法1
はじめ、開閉スイッチ(SW)114により端末ユニット−2の開け始めが検出されると、このタイミングでトリガーがかかる(ステップS101)。このとき磁気センサ部301が搭載された端末ユニット−2は、最終的には端末ユニット−1と図5に示すようにθの角度をなすように回転(開く動作)を始めている。
主制御部108は、センサ制御部に対して各センサによる計測を指示する(ステップS102)。各磁気センサからデータが読み出され、データサンプリングが始まる(ステップS103)。ここでは、各磁気センサの出力を所定時間の間連続的にサンプリングする。
(1) Calibration method 1
First, when the opening / closing switch (SW) 114 detects the opening of the terminal unit-2, a trigger is activated at this timing (step S101). At this time, the terminal unit-2 on which the magnetic sensor unit 301 is mounted finally starts rotating (opening operation) so as to form an angle θ with the terminal unit-1 as shown in FIG.
The main control unit 108 instructs the sensor control unit to perform measurement using each sensor (step S102). Data is read from each magnetic sensor, and data sampling starts (step S103). Here, the output of each magnetic sensor is sampled continuously for a predetermined time.

次いで、前述のデータ格納判定アルゴリズムに基づいて、測定データをRAM110に格納するかどうか判断する(ステップS104)。
ステップS104でNoと判定された場合、0.1秒だけ待機し(ステップS105)、ステップS102に戻る。
ステップS104でYesと判定した場合には、RAM110に測定データを格納し(ステップS106)、RAM110に格納された測定データの数が所定の数に達したかどうかさらに判断する(ステップS107)。
Next, it is determined whether or not the measurement data is stored in the RAM 110 based on the data storage determination algorithm described above (step S104).
When it determines with No by step S104, it waits for 0.1 second (step S105), and returns to step S102.
If it is determined Yes in step S104, the measurement data is stored in the RAM 110 (step S106), and it is further determined whether or not the number of measurement data stored in the RAM 110 has reached a predetermined number (step S107).

このステップS107でNoと判定された場合には、ステップS105へ移る。一方、ステップS107でYesと判定された場合には、測定データのサンプリングを中止するとともに、RAM110からこれに格納された測定データを読み出し、オフセット推定アルゴリズムに基づいて、オフセットを推定する(ステップS108)。
続いて、前述の有効性判定アルゴリズムに基づいて、推定したオフセットが有効な値であるかどうか判断する(ステップS109)。この判断で、Yesと判定された場合には、ステップS108で推定したオフセットをRAM110に格納し、更新処理が終了する(S110)。一方、ステップS109でNoと判定された場合には、オフセットの更新はせず一連の処理を終了する(ステップS111)。
If it is determined No in step S107, the process proceeds to step S105. On the other hand, if it is determined Yes in step S107, the sampling of the measurement data is stopped, the measurement data stored in the RAM 110 is read out, and the offset is estimated based on the offset estimation algorithm (step S108). .
Subsequently, it is determined whether the estimated offset is a valid value based on the above-described validity determination algorithm (step S109). If it is determined as Yes in this determination, the offset estimated in step S108 is stored in the RAM 110, and the update process is ended (S110). On the other hand, if it is determined No in step S109, the offset is not updated and the series of processes is terminated (step S111).

なお、ステップS109でNoと判定された場合、すなわち、ステップS108で推定したオフセットが無効であると判定された場合に、携帯端末1をさらに開閉するようにユーザに指示するか、携帯端末1の開閉を複数の向きで行うようにユーザに指示し、各磁気センサから測定データをさらに取得するようにしてもよい。このようにすると、測定されるデータ数が増え、オフセット推定の精度が向上する。ユーザに対する指示は、例えば報知手段111により警告音を発し、ユーザに指示する内容を表示部203に表示させることにより行う。   If it is determined No in step S109, that is, if it is determined that the offset estimated in step S108 is invalid, the user is instructed to further open and close the mobile terminal 1, or the mobile terminal 1 The user may be instructed to perform opening and closing in a plurality of directions, and measurement data may be further acquired from each magnetic sensor. This increases the number of data to be measured and improves the accuracy of offset estimation. The instruction to the user is performed by, for example, generating a warning sound by the notification unit 111 and causing the display unit 203 to display the content instructed to the user.

磁気センサ部301が2軸磁気センサからなる場合では、以上のようにして(キャリブレーション方法1により)キャリブレーションを行う。磁気センサ部301が3軸磁気センサからなる場合では、上記キャリブレーション方法1におけるステップS107でYesと判定された後、さらに下記のキャリブレーション方法2によるキャリブレーションを行う。   When the magnetic sensor unit 301 is composed of a biaxial magnetic sensor, calibration is performed as described above (by the calibration method 1). In the case where the magnetic sensor unit 301 is composed of a three-axis magnetic sensor, after the determination in step S107 in the calibration method 1 is Yes, calibration by the following calibration method 2 is further performed.

(2)キャリブレーション方法2
主操作部113の所定のボタン(キャリブレーションボタン)を押下に応じて、サンプリングを開始する。このキャリブレーション方法2では、ユーザに携帯端末1を図6の矢印方向に振らせる(なお、ユーザによるこれらの操作は、予め取扱説明書等によりユーザに指示されているものとする)。
(2) Calibration method 2
Sampling is started in response to pressing a predetermined button (calibration button) on the main operation unit 113. In this calibration method 2, the user shakes the mobile terminal 1 in the direction of the arrow in FIG. 6 (note that these operations by the user are instructed by the user in advance according to the instruction manual, etc.).

そして各磁気センサの出力を所定の時間の間連続的にサンプリングする。リボルバー式では、端末ユニット−2を端末ユニット−1対し回転させ開く際、端末ユニット−2は、完全な開状態(図5の(b)に示した状態)において、携帯端末1の主面(前述)に対してθの角度をなすように動作する(すなわち、端末ユニット−2にある磁気センサ部301は、3つの軸それぞれに対し変化するように動作するが、θが小さい場合、このθの変化分を補って測定データを得られるようにユーザに携帯端末1を振らせる。
上記のようにしてデータ取得が完了すると、得られたデータからオフセットを推定する。そして、推定されたオフセットで、RAM110に保存されているオフセットを更新する。
The output of each magnetic sensor is sampled continuously for a predetermined time. In the revolver type, when the terminal unit-2 is rotated and opened with respect to the terminal unit-1, the terminal unit-2 is in a completely open state (the state shown in FIG. 5B). The magnetic sensor unit 301 in the terminal unit-2 operates so as to change with respect to each of the three axes. However, when θ is small, this θ The user is caused to shake the portable terminal 1 so that the measurement data can be obtained by compensating for the amount of change.
When data acquisition is completed as described above, an offset is estimated from the obtained data. Then, the offset stored in the RAM 110 is updated with the estimated offset.

上記キャリブレーション方法1および2におけるオフセットの更新処理は、今回得られたオフセットのデータと更新前のオフセットのデータとの比較により、オフセットの補正が必要であると判断された場合にのみ(この判断基準は別途定められる)、オフセットの更新が行われるようにしてもよい。
あるいは、予め定められた基準に従い、オフセットがその更新が必要なレベル(あるいは基準の範囲)となっているかどうか判断をして、携帯端末1の開閉時にデータ取得を行うかどうか選択されるようにしてもよい。
The offset update processing in the calibration methods 1 and 2 is performed only when it is determined that the offset correction is necessary by comparing the offset data obtained this time with the offset data before the update (this determination). The reference may be determined separately), and the offset may be updated.
Alternatively, according to a predetermined standard, it is determined whether or not the offset is at a level (or a range of the standard) that needs to be updated, and whether to acquire data when the portable terminal 1 is opened or closed is selected. May be.

ここで、リボルバー式の携帯端末1におけるオフセット推定方法(他の例)について説明する。
オフセットの推定は、前述のオフセット推定アルゴリズムにより求めることができるが、図6に示す端末ユニット−1と端末ユニット−2がなす角度θを考慮した場合、下記のようにしても求めることができる。
Here, an offset estimation method (another example) in the revolver type portable terminal 1 will be described.
The offset can be estimated by the above-described offset estimation algorithm. However, when the angle θ formed between the terminal unit-1 and the terminal unit-2 shown in FIG.

(a)磁気センサ部301が二軸磁気センサからなる場合
キャリブレーション方法1でサンプリングされた測定データを、横軸をXセンサ(X軸方向の地磁気の磁力を検出する磁気センサ)の値、縦軸をYセンサ(X軸に直交するY軸方向の地磁気の磁力を検出する磁気センサ)の値でプロットすると(すなわち、XY平面にXセンサの出力値とYセンサの出力値の組をプロットすると)、図7のようになる。この軌跡は楕円の一部であり、その扁平率は図6のθ、及び地磁気と回転面(磁気センサが回転移動する際に形成する面)のなす角に依存する。いま、θが既知のため、楕円の扁平率と中心座標を求めることにより、X,Yのオフセットと地磁気と回転面のなす角を得ることができる。
(A) When the magnetic sensor unit 301 is composed of a biaxial magnetic sensor The measurement data sampled by the calibration method 1 is the X sensor (magnetic sensor for detecting the magnetic force of the geomagnetism in the X axis direction), the vertical axis If the axis is plotted with the value of the Y sensor (the magnetic sensor that detects the geomagnetic force in the Y axis direction perpendicular to the X axis) (that is, the set of the output value of the X sensor and the output value of the Y sensor is plotted on the XY plane) ), As shown in FIG. This locus is a part of an ellipse, and its flatness depends on θ in FIG. 6 and the angle formed by the geomagnetism and the rotation surface (surface formed when the magnetic sensor rotates). Now, since θ is known, the angle between the X and Y offset, the geomagnetism, and the rotation plane can be obtained by obtaining the oblateness of the ellipse and the center coordinates.

(b)磁気センサ部301が三軸磁気センサからなる場合
XY平面上のオフセットについては、上記(a)の二軸の場合と同様にして求めることができる。Z軸方向のオフセットについてもθが比較的大きいとき(θ>30度)には、XZ平面上のキャリブレーション時の測定データの軌跡を用いて、二軸の場合と同様にしてZのオフセット値を求めることができる。しかし、θが小さいときには精度がでない。
これは図8に示すように、軌跡が扁平しすぎてほぼ直線となってしまうためである。
(B) When the magnetic sensor part 301 consists of a triaxial magnetic sensor About the offset on XY plane, it can obtain | require similarly to the case of the biaxial of said (a). When θ is also relatively large (θ> 30 degrees) in the Z-axis direction offset, the Z offset value is used in the same manner as in the case of two axes, using the trajectory of measurement data during calibration on the XZ plane. Can be requested. However, when θ is small, there is no accuracy.
This is because, as shown in FIG. 8, the trajectory is too flat and becomes almost a straight line.

このような場合には、キャリブレーション方法2でサンプリングされたデータからZのオフセットを求めればよい。なお、キャリブレーション方法2では、ユーザに携帯端末1を振らせるようにしているが、ユーザが方位計測時に端末の傾きを変化させた場合に磁気センサの出力をサンプリングして、その測定データを使用するようにしてもよい。   In such a case, the Z offset may be obtained from the data sampled by the calibration method 2. In the calibration method 2, the user swings the mobile terminal 1, but when the user changes the tilt of the terminal during the orientation measurement, the output of the magnetic sensor is sampled and the measured data is used. You may make it do.

[一般の折畳み式携帯端末の場合]
前述の図1に示す構成例では、各磁気センサは、当該携帯端末1が開閉される際移動する側である端末ユニット−2側に配置される。(一方、端末ユニット−1は、携帯端末1が開閉される際はユーザの手による把持などにより概ね固定されている。)すなわち、端末ユニット−2を蓋と呼ぶと、開閉させる蓋側に搭載されことになる(図9参照)。この磁気センサが配置される位置は、リボルバー式と同様に、端末ユニット−1と端末ユニット−2を結合する部分に近い方が好適である。携帯端末1には開閉スイッチ(SW)114がついていて、開閉動作を、開け始め(端末ユニット−2を端末ユニット−1に対し所定角度以上開いた段階)、閉め終わりの段階で認識できる。ここでは、磁気センサ部301は、三軸磁気センサからなるものとする。
[In the case of a general folding mobile terminal]
In the configuration example shown in FIG. 1 described above, each magnetic sensor is arranged on the terminal unit-2 side, which is the side that moves when the portable terminal 1 is opened and closed. (On the other hand, when the mobile terminal 1 is opened and closed, the terminal unit-1 is generally fixed by gripping by the user's hand, etc.) That is, when the terminal unit-2 is called a lid, it is mounted on the lid side to be opened and closed. (See FIG. 9). The position where this magnetic sensor is disposed is preferably close to the portion where the terminal unit-1 and the terminal unit-2 are coupled, as in the revolver type. The portable terminal 1 has an open / close switch (SW) 114 so that the opening / closing operation can be recognized at the beginning of opening (when the terminal unit-2 is opened at a predetermined angle or more with respect to the terminal unit-1) and at the end of closing. Here, the magnetic sensor unit 301 is assumed to be a triaxial magnetic sensor.

一般の折畳み式携帯端末の場合も、前述のリボルバー式の場合のキャリブレーション方法1およびキャリブレーション方法2による処理手順を利用できる。ただし、ここでのキャリブレーション方法2では、各磁気センサの出力をサンプリングする際、ユーザに携帯端末1を図10のように振らせる。携帯端末1が図9に示す一般的な折畳み式の場合、磁気センサ部301がある端末ユニット−2は、これを端末ユニット−1から開く際、その軌跡がなす面には大きく変化するが、この軌跡と直交する方向(X方向)の変化が小さいため、この方向への変化分が現れるように、図10に示す矢印方向に携帯端末1を振らせて測定データを得るようにする。   Also in the case of a general folding portable terminal, the processing procedure by the calibration method 1 and the calibration method 2 in the case of the above-described revolver type can be used. However, in the calibration method 2 here, when sampling the output of each magnetic sensor, the user shakes the portable terminal 1 as shown in FIG. When the mobile terminal 1 is a general foldable type shown in FIG. 9, the terminal unit-2 with the magnetic sensor unit 301 changes greatly on the surface formed by the locus when the terminal unit-2 is opened from the terminal unit-1. Since the change in the direction orthogonal to the locus (X direction) is small, the mobile terminal 1 is shaken in the direction of the arrow shown in FIG. 10 so that the change in this direction appears, and measurement data is obtained.

以上のようにして、携帯端末1が、一般の折畳み式携帯端末の場合、キャリブレーション方法1により得られた測定データからY軸・Z軸方向のオフセットを推定することができる。X軸方向のオフセットは、上記キャリブレーション方法2により得られる測定データから推定することができる。あるいは、方位計測時のユーザが向きを変える際の測定データを使用して推定することも可能である。   As described above, when the mobile terminal 1 is a general folding mobile terminal, the offset in the Y-axis / Z-axis direction can be estimated from the measurement data obtained by the calibration method 1. The offset in the X-axis direction can be estimated from the measurement data obtained by the calibration method 2. Or it is also possible to estimate using the measurement data when the user changes the direction during azimuth measurement.

なお、上記で説明した各動作フローは一例であり、上記の処理の流れに限定されるものではない。
以上、この発明の実施形態を、図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の構成等も含まれることは言うまでもない。
Each operation flow described above is an example, and is not limited to the above processing flow.
The embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to this embodiment, and includes a configuration and the like that do not depart from the gist of the present invention. Needless to say.

上述の実施形態では、ユーザが携帯端末を開くタイミングでキャリブレーションを行っているが、閉じた後にキャリブレーションを行うこともできる。これは、携帯端末を閉じた直後、ユーザは、当該携帯端末をポケットに入れる、机の上に置くなどの動作をするので、携帯端末は、閉じられた直後からしばらくは向きを変化させることになる。したがって、この間磁気センサの出力をサンプリングしてこの測定データからオフセットを推定することができる。
また、ユーザが携帯端末を開閉するタイミングで必ずキャリブレーションを行うようにしてもよいし、開閉時にユーザにキャリブレーションをするべきかどうかの確認するようにしてもよい。
In the above-described embodiment, the calibration is performed at the timing when the user opens the portable terminal. However, the calibration can be performed after the user closes the portable terminal. This is because immediately after the mobile terminal is closed, the user performs an operation such as putting the mobile terminal in a pocket or placing it on a desk. Therefore, the mobile terminal changes its orientation for a while after being closed. Become. Therefore, during this time, the output of the magnetic sensor can be sampled and the offset can be estimated from this measurement data.
Further, the calibration may be performed at the timing when the user opens / closes the mobile terminal, or the user may be asked whether the calibration should be performed at the time of opening / closing.

本発明の方位検出機能付き携帯電子機器の一実施の形態である携帯通信端末(携帯端末)の電気的構成を示すブロック図である。It is a block diagram which shows the electrical constitution of the portable communication terminal (mobile terminal) which is one Embodiment of the portable electronic device with a direction detection function of this invention. 同実施の形態の機能ブロック図である。It is a functional block diagram of the embodiment. (a)携帯端末の座標系(定義)と、(b)地面座標系を示す図である。(A) It is a figure which shows the coordinate system (definition) of a portable terminal, and (b) the ground coordinate system. キャリブレーションに係る動作を説明するためのフローチャートである。It is a flowchart for demonstrating the operation | movement which concerns on calibration. リボルバー式の携帯端末の外観(閉じた状態と開いた状態)を示す図である。It is a figure which shows the external appearance (a closed state and an open state) of a revolver type portable terminal. リボルバー式の携帯端末におけるキャリブレーション方法2で携帯端末を振る方向を示す図である。It is a figure which shows the direction which shakes a portable terminal with the calibration method 2 in a revolver type portable terminal. キャリブレーション方法1でサンプリングされた測定データをXY平面上にプロットした図(一例)である。It is the figure (an example) which plotted the measurement data sampled by the calibration method 1 on XY plane. キャリブレーション方法1でサンプリングされた測定データをXY平面上にプロットした図(一例:θが小さい場合)である。It is the figure (an example: when (theta) is small) which plotted the measurement data sampled by the calibration method 1 on XY plane. 一般の折畳み式携帯端末の外観(閉じた状態と開いた状態)を示す図である。It is a figure which shows the external appearance (a closed state and an open state) of a common foldable portable terminal. 一般の折畳み式携帯端末におけるキャリブレーション方法2で携帯端末を振る方向を示す図である。It is a figure which shows the direction which shakes a portable terminal by the calibration method 2 in a general folding portable terminal.

符号の説明Explanation of symbols

1…携帯端末(携帯電子機器)、101…アンテナ、102…RF部、103…変復調部、104…CDMA部、105…音声処理部、106…GPSアンテナ、107…GPS受信部、108…主制御部(制御手段)、109…ROM、110…RAM、111…報知手段、112…時計部、113…主操作部、114…開閉スイッチ(SW)(開閉検出手段)、201…センサデータ取得部(方位検出手段)、202…電子撮像部、203…表示部、204…タッチパネル、205…副操作部、301…磁気センサ部、302…傾きセンサ部、303…温度センサ部、304…切り替え手段、305…A/D変換回路、306…スキャン範囲設定手段、307…方位データ演算部、308…データ格納判定手段、309…記憶手段、310…オフセット推定手段、311…有効性判定手段、312…方位演算手段、313…オフセット除去手段、314…温度補正手段、315…傾き補正手段、316…表示手段   DESCRIPTION OF SYMBOLS 1 ... Portable terminal (mobile electronic device), 101 ... Antenna, 102 ... RF part, 103 ... Modulation / demodulation part, 104 ... CDMA part, 105 ... Voice processing part, 106 ... GPS antenna, 107 ... GPS receiving part, 108 ... Main control (Control means) 109 ... ROM 110 ... RAM 111 ... notification means 112 ... clock part 113 ... main operation part 114 ... open / close switch (SW) (open / close detection means) 201 ... sensor data acquisition part ( (Azimuth detection means), 202 ... electronic imaging unit, 203 ... display unit, 204 ... touch panel, 205 ... sub-operation unit, 301 ... magnetic sensor unit, 302 ... tilt sensor unit, 303 ... temperature sensor unit, 304 ... switching unit, 305 ... A / D conversion circuit, 306 ... scan range setting means, 307 ... azimuth data calculation section, 308 ... data storage determination means, 309 ... storage means, 31 ... offset estimating means, 311 ... validity determining unit, 312 ... azimuth calculation means 313 ... offset removal means, 314 ... temperature correction means, 315 ... inclination correction unit, 316 ... display unit

Claims (8)

磁気センサを有する方位検出手段を搭載した折畳み式の携帯電子機器において、
該携帯電子機器の開閉を検出する開閉検出手段と、
前記磁気センサの出力データを複数格納するデータ格納手段と、
前記開閉検出手段により検出される当該携帯電子機器を開くタイミングあるいは閉じるタイミングで前記磁気センサの出力データの前記データ格納手段への格納を開始し、前記データ格納手段に格納された複数の出力データに基づき前記磁気センサの出力の誤差であるオフセットを推定して、前記磁気センサの出力を補正するために用いるオフセット値を更新する制御手段とを、具備する
ことを特徴とする方位検出機能付き携帯電子機器。
In a folding portable electronic device equipped with an orientation detection means having a magnetic sensor,
Open / close detecting means for detecting open / close of the portable electronic device;
Data storage means for storing a plurality of output data of the magnetic sensor;
Storage of the output data of the magnetic sensor in the data storage means is started at the opening timing or closing timing of the portable electronic device detected by the open / close detection means, and the output data stored in the data storage means And a control means for estimating an offset, which is an error in the output of the magnetic sensor, and updating an offset value used to correct the output of the magnetic sensor. machine.
前記磁気センサを、当該折畳み式の携帯電子機器を当該携帯電子機器の一つのユニットを固定して開く際移動させる他のユニット側に設けた
ことを特徴とする請求項1に記載の方位検出機能付き携帯電子機器。
The direction detection function according to claim 1, wherein the magnetic sensor is provided on the other unit side that moves the folding portable electronic device when the unit of the portable electronic device is fixed and opened. With portable electronic devices.
前記磁気センサを、磁気発生源より離れた位置に設けた
ことを特徴とする請求項1または請求項2に記載の方位検出機能付き携帯電子機器。
The portable electronic device with an orientation detection function according to claim 1 or 2, wherein the magnetic sensor is provided at a position distant from the magnetism generation source.
前記制御手段により前記オフセットの推定が無効であると判定された場合、前記制御手段は、当該折畳み式の携帯電子機器をさらに開くあるいは閉じるようにユーザに指示するための制御を行う
ことを特徴とする請求項1から請求項3のいずれかに記載の方位検出機能付き携帯電子機器。
When the control means determines that the offset estimation is invalid, the control means performs control for instructing the user to further open or close the foldable portable electronic device. The portable electronic device with an orientation detection function according to any one of claims 1 to 3.
前記制御手段により、前記オフセットの推定が無効であると判定された場合、前記制御手段は、当該折畳み式の携帯電子機器を複数の方向で開くあるいは閉じるようにユーザに指示するための制御を行う
ことを特徴とする請求項1から請求項3のいずれかに記載の方位検出機能付き携帯電子機器。
When the control means determines that the offset estimation is invalid, the control means performs control for instructing the user to open or close the folding portable electronic device in a plurality of directions. The portable electronic device with an orientation detection function according to any one of claims 1 to 3.
磁気センサからなる方位検出手段と前記磁気センサの出力データを複数格納するデータ格納手段を搭載した折畳み式の携帯電子機器における方位検出手段のキャリブレーション方法であって、
前記携帯電子機器の開閉を検出し、
前記携帯電子機器を開くタイミングあるいは閉じるタイミングで前記磁気センサの出力データの前記データ格納手段への格納を開始し、
前記データ格納手段に格納された複数の出力データに基づき前記磁気センサの出力の誤差であるオフセットを推定し、
前記磁気センサの出力を補正するために用いるオフセット値を更新する
ことを特徴とする方位検出機能付き携帯電子機器のキャリブレーション方法。
A calibration method for azimuth detection means in a folding portable electronic device equipped with azimuth detection means comprising a magnetic sensor and data storage means for storing a plurality of output data of the magnetic sensor ,
Detecting opening and closing of the portable electronic device;
Start storing the output data of the magnetic sensor in the data storage means at the timing of opening or closing the portable electronic device ,
Estimating an offset that is an error in the output of the magnetic sensor based on a plurality of output data stored in the data storage means ,
An offset value used for correcting the output of the magnetic sensor is updated. A calibration method for a portable electronic device with an orientation detection function.
前記複数の出力データと前記推定されたオフセットとの座標上における距離の標準偏差を算出する標準偏差算出手段と、
算出された前記標準偏差に基づいて、推定された前記オフセットの有効性を判定する有効性判定手段と、
を備えることを特徴とする請求項1から請求項5のいずれかに記載の方位検出機能付き携帯電子機器
A standard deviation calculating means for calculating a standard deviation of the distance on the coordinates of the plurality of output data and the estimated offset;
Effectiveness determination means for determining the effectiveness of the estimated offset based on the calculated standard deviation;
The portable electronic device with an orientation detection function according to any one of claims 1 to 5, further comprising:
互いに直交するX、Y、Z軸の3軸に感磁方向を有する前記磁気センサの検出データ(x、y、z)(i=1、2、…、N)を読み出す手段と、
最小二乗誤差を[数6]で定義し、
Figure 0004161985
=x +y +z 、b=−2x、c=−2y、d=−2zとおいて[数6]を変形した[数7]に対して、
Figure 0004161985
最小二乗誤差εを最小にする条件[数8]を、
Figure 0004161985
[数9]の表記を用いて[数10]に示した方程式を解くことにより
Figure 0004161985
Figure 0004161985
前記磁気センサのオフセット(X0、Y0、Z0)を求める手段と、
を有することを特徴とする請求項1から請求項5のいずれかに記載の方位検出機能付き携帯電子機器
X orthogonal to each other, Y, detection data of the magnetic sensor having a magnetic sensing direction three axes of Z-axis (x i, y i, z i) (i = 1,2, ..., N) and means for reading,
Define the least square error by [Equation 6],
Figure 0004161985
For [Equation 7] modified from [Equation 6] with a i = x i 2 + y i 2 + z i 2 , b i = −2x i , c i = −2y i , d i = −2z i ,
Figure 0004161985
The condition [Equation 8] that minimizes the least square error ε is
Figure 0004161985
By solving the equation shown in [Equation 10] using the notation of [Equation 9]
Figure 0004161985
Figure 0004161985
Means for obtaining an offset (X0, Y0, Z0) of the magnetic sensor;
The portable electronic device with an orientation detection function according to claim 1, wherein the portable electronic device has an orientation detection function .
JP2005170674A 2004-06-11 2005-06-10 Portable electronic device with orientation detection function and calibration method thereof Expired - Fee Related JP4161985B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005170674A JP4161985B2 (en) 2004-06-11 2005-06-10 Portable electronic device with orientation detection function and calibration method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004174108 2004-06-11
JP2005170674A JP4161985B2 (en) 2004-06-11 2005-06-10 Portable electronic device with orientation detection function and calibration method thereof

Publications (2)

Publication Number Publication Date
JP2006023293A JP2006023293A (en) 2006-01-26
JP4161985B2 true JP4161985B2 (en) 2008-10-08

Family

ID=35796643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005170674A Expired - Fee Related JP4161985B2 (en) 2004-06-11 2005-06-10 Portable electronic device with orientation detection function and calibration method thereof

Country Status (1)

Country Link
JP (1) JP4161985B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4657742B2 (en) * 2005-01-27 2011-03-23 パナソニック株式会社 Mobile terminal device
KR100890307B1 (en) 2006-03-07 2009-03-26 야마하 가부시키가이샤 Magnetic data processing device
KR101220600B1 (en) * 2006-03-30 2013-01-10 교세라 가부시키가이샤 Mobile electronic device and method for calibrating terrestrial magnetism sensor
JP5012252B2 (en) 2007-06-25 2012-08-29 ヤマハ株式会社 Magnetic data processing apparatus, method and program
EP2431709B1 (en) 2009-05-14 2016-06-01 Nec Corporation Method for correcting a geomagnetic sensor for a mobile device, as well as a mobile device and a program
JP5453969B2 (en) 2009-07-10 2014-03-26 ヤマハ株式会社 Magnetic data processing apparatus, magnetic data processing method, and magnetic data processing program
JP7141094B2 (en) * 2018-08-06 2022-09-22 サイトテック株式会社 device with an electronic compass
CN110689528B (en) * 2019-09-21 2024-06-21 山西金智鸿阳科技有限公司 Automatic positioning-based opposite-opening type disconnecting link opening and closing angle detection method

Also Published As

Publication number Publication date
JP2006023293A (en) 2006-01-26

Similar Documents

Publication Publication Date Title
US7606676B2 (en) Compass sensor unit and portable electronic device
KR100847382B1 (en) Azimuth data producing method, azimuth sensor unit and portable electronic device
KR100876030B1 (en) Azimuth processing device, azimuth processing method, computer readable recording medium recording azimuth processing program, azimuth measuring device, a method of correcting a tilt offset, azimuth measuring method, azimuth sensor unit and portable electronic device
JP4161985B2 (en) Portable electronic device with orientation detection function and calibration method thereof
US6957088B2 (en) Electronic apparatus
JP4311447B2 (en) Azimuth processing device, azimuth processing method, azimuth processing program, azimuth measurement device, tilt offset correction method, azimuth measurement method, azimuth sensor unit, and portable electronic device
US20090320305A1 (en) Portable Electronic Apparatus and Geomagnetism Sensor Calibration Method
JP4229093B2 (en) Portable electronic device with azimuth detection function, magnetic sensor device, and calibration method thereof
JP4111211B2 (en) Direction data generation method, direction sensor unit, storage medium, and portable electronic device
JP2006047038A (en) Correction method for geomagnetic sensor
JP4433919B2 (en) Mobile terminal and tilt angle calculation method
KR100743250B1 (en) Portable terminal having for function of navigation
JP4839975B2 (en) Azimuth and tilt angle detection device, azimuth and tilt angle detection method, program, and portable terminal device
KR100856192B1 (en) Azimuth data calculation method, azimuth sensor unit, and portable electronic apparatus
JP2005345387A (en) Portable terminal apparatus
JP4609151B2 (en) Portable terminal device and method for controlling portable terminal device
JP2005345388A (en) Portable terminal apparatus
JP4586596B2 (en) Program for correcting portable information terminal and geomagnetic sensor
JP4639672B2 (en) Geomagnetic sensor correction method
JP2005345389A (en) Portable terminal apparatus
JP2008005430A (en) Portable telephone, subtended angle specification method, and subtended angle specification program
JP2003232636A (en) Azimuth detecting method, azimuth detecting device, navigation device, portable instrument, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060123

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080401

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080602

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: 20080701

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080714

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110801

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120801

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130801

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees