JP4761142B2 - Magnetic data processing method, apparatus and program - Google Patents

Magnetic data processing method, apparatus and program Download PDF

Info

Publication number
JP4761142B2
JP4761142B2 JP2006096522A JP2006096522A JP4761142B2 JP 4761142 B2 JP4761142 B2 JP 4761142B2 JP 2006096522 A JP2006096522 A JP 2006096522A JP 2006096522 A JP2006096522 A JP 2006096522A JP 4761142 B2 JP4761142 B2 JP 4761142B2
Authority
JP
Japan
Prior art keywords
magnetic data
input
stored
storage means
magnetic
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
JP2006096522A
Other languages
Japanese (ja)
Other versions
JP2007271414A (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 JP2006096522A priority Critical patent/JP4761142B2/en
Publication of JP2007271414A publication Critical patent/JP2007271414A/en
Application granted granted Critical
Publication of JP4761142B2 publication Critical patent/JP4761142B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measuring Magnetic Variables (AREA)

Description

本発明は、磁気データ処理方法、装置及びプログラムに関し、特に磁気センサのオフセットを導出する技術に関する。   The present invention relates to a magnetic data processing method, apparatus, and program, and more particularly to a technique for deriving an offset of a magnetic sensor.

従来、携帯型電話機、車両等の移動体に搭載され、地磁気の方向を検出する2次元又は3次元の磁気センサが知られている。一般に磁気センサは、磁界のベクトルを互いに直交する方向成分に分解して検出するための2つ又は3つの磁気センサモジュールを備えている。磁気センサの出力である磁気データは、複数の磁気センサモジュールの出力の組み合わせからなるベクトルデータである。磁気データが示す方向と大きさが磁気センサが検出している磁界の方向と大きさである。磁気センサの出力に基づいて地磁気の方向又は大きさを特定するとき、移動体の着磁や磁気センサ自体の温度特性による測定誤差を打ち消すために磁気センサの出力を補正する処理が必要である。この補正処理の操作値はオフセットと呼ばれている。オフセットは磁気センサが検出している移動体の着磁による磁界などを表すベクトルデータであって、磁気センサの出力である磁気データからオフセットが引き算されることによって測定誤差が打ち消される。磁気データ群が分布する円又は球の中心を求めることによってオフセットを導出することができる。   2. Description of the Related Art Conventionally, a two-dimensional or three-dimensional magnetic sensor that is mounted on a mobile body such as a mobile phone or a vehicle and detects the direction of geomagnetism is known. In general, a magnetic sensor includes two or three magnetic sensor modules for detecting a vector of a magnetic field by decomposing it into directional components orthogonal to each other. The magnetic data that is the output of the magnetic sensor is vector data that is a combination of the outputs of a plurality of magnetic sensor modules. The direction and magnitude indicated by the magnetic data are the direction and magnitude of the magnetic field detected by the magnetic sensor. When the direction or magnitude of geomagnetism is specified based on the output of the magnetic sensor, it is necessary to correct the output of the magnetic sensor in order to cancel measurement errors due to magnetization of the moving body and temperature characteristics of the magnetic sensor itself. The operation value of this correction process is called offset. The offset is vector data representing a magnetic field or the like due to magnetization of the moving body detected by the magnetic sensor, and the measurement error is canceled by subtracting the offset from the magnetic data that is the output of the magnetic sensor. The offset can be derived by determining the center of a circle or sphere in which the magnetic data group is distributed.

ところで、磁気データの分布は現実には完全な円又は球にならない。なぜならば、磁気センサの出力自体がガウス分布に従う測定誤差を有しているし、現実には完全に一様な磁界は存在しないためオフセットを導出するために必要な磁気データ群が蓄積される期間中に磁気センサが測定している磁界が変動するし、磁気センサの出力をディジタル値で取り出すまでの計算誤差があるからである。このような磁気データ群に基づいてオフセットを導出するアルゴリズムとして、最小二乗法などの統計的手法を用いたものが知られている。統計的手法を用いてオフセットを導出する場合、母集団としての磁気データ群の分布の偏りが大きい場合には正確なオフセットを導出することができないし、母集団の要素数がある程度多くない場合にも高精度のオフセットを導出できない。   By the way, the distribution of magnetic data is not actually a complete circle or sphere. This is because the output of the magnetic sensor itself has a measurement error according to a Gaussian distribution, and in reality there is no completely uniform magnetic field, so the period in which the magnetic data group necessary to derive the offset is accumulated This is because the magnetic field measured by the magnetic sensor fluctuates, and there is a calculation error until the output of the magnetic sensor is extracted as a digital value. As an algorithm for deriving an offset based on such a magnetic data group, an algorithm using a statistical method such as a least square method is known. When the offset is derived using a statistical method, if the distribution of the magnetic data group as a population is highly biased, an accurate offset cannot be derived, and the number of elements in the population is not large to some extent. Even high-precision offset cannot be derived.

特許文献1には、オフセットを統計的手法によって導出するための母集団として磁気データを蓄積する際、連続入力される磁気データ間の距離が短い場合には、入力されたそのような磁気データを母集団要素として蓄積せずに破棄することにより、偏った分布の磁気データ群に基づいて低い精度のオフセットが導出されることを防止する方法が開示されている。母集団要素として蓄積対象とする磁気データ間の間隔を広げると、移動体が特定の姿勢変化(例えば特定の時間内に一定の角速度で一回転)をしなければ、母集団の蓄積を完了するまでに長時間を要するという問題がある。しかし、移動体の移動にともなって移動体の存在する磁界が変化すると、移動体の姿勢が変化していなくても、磁界の変化前後で磁気センサから出力される磁気データ間の距離が離れる。したがって、母集団要素として蓄積対象とする磁気データ間の間隔を狭めると、互いに異なる磁界において磁気センサから出力された磁気データを含む母集団に基づいて精度の低いオフセットが導出されるという問題がある。   In Patent Document 1, when magnetic data is stored as a population for deriving an offset by a statistical method, if the distance between magnetic data that are continuously input is short, such magnetic data that has been input is stored. Disclosed is a method for preventing a low-accuracy offset from being derived on the basis of a magnetic data group having a biased distribution by discarding without accumulating it as a population element. When the interval between magnetic data to be accumulated as a population element is increased, the accumulation of the population is completed if the moving body does not change a specific posture (for example, one revolution at a constant angular velocity within a specific time). There is a problem that it takes a long time to complete. However, if the magnetic field in which the moving body is present changes as the moving body moves, the distance between magnetic data output from the magnetic sensor is increased before and after the change of the magnetic field, even if the attitude of the moving body is not changed. Therefore, if the interval between magnetic data to be stored as population elements is narrowed, there is a problem that an offset with low accuracy is derived based on populations including magnetic data output from magnetic sensors in different magnetic fields. .

国際公開第2004/003476号パンフレットInternational Publication No. 2004/003476 Pamphlet

本発明は上記問題に鑑みて創作されたものであって、高精度にオフセットを導出するための磁気データ群を短時間に蓄積できる磁気データ処理方法、装置及びプログラムを提供することを目的とする。   The present invention was created in view of the above problems, and an object thereof is to provide a magnetic data processing method, apparatus, and program capable of accumulating magnetic data groups for deriving an offset with high accuracy in a short time. .

(1)上記目的を達成するための磁気データ処理方法は、磁気センサから磁気データを順次入力し、入力された2個の前記磁気データ間の距離が第一しきい値を越えることを必要条件として、前記磁気データの蓄積手段への格納を入力された2個の前記磁気データから開始し、前記蓄積手段に格納されている前記磁気データとの距離が前記第一しきい値より小さい第二しきい値を越える前記磁気データが入力されたことを必要条件として、入力された前記磁気データを前記蓄積手段に追加格納し、前記蓄積手段に格納されている前記磁気データに基づいて前記磁気データのオフセットを導出する、ことを含む。
この方法によると、入力された2個の磁気データ間の距離が第一しきい値を越えない限り、オフセットを導出するために用いられる磁気データ群の蓄積が開始されない。磁界が激変する状況は希であるため、通常頻繁に起こりうる程度の磁界変化によって磁気データ群の蓄積が開始されない程度に大きな値に第一しきい値を設定することにより、通常頻繁に起こりうる程度の磁界変化の前後にそれぞれ磁気センサから出力された磁気データが含まれる磁気データ群に基づいて低い精度でオフセットが導出されることを防止できる。また、そのように第一しきい値が設定されている場合に、磁気データ群の蓄積が開始されるとすれば、そのきっかけは通常頻繁に起こりうる程度の磁界変化ではなく、移動体の姿勢変化である。移動体の姿勢が変化し始めてから短時間のうちにオフセットを導出するために必要な個数の磁気データ群を蓄積すれば、一定の磁界内で磁気センサから出力される磁気データ群を蓄積することができる。この方法によると、オフセットを導出するためにいったん磁気データ群の蓄積が開始されると、蓄積対象とする磁気データと既に蓄積されている磁気データとの距離のしきい値が第一しきい値より小さい第二しきい値に縮められるため、短時間のうちに一定の磁界内で磁気センサから出力される磁気データ群を蓄積することができる。さらに、蓄積対象とする磁気データと既に蓄積されている磁気データとの距離のしきい値が第一しきい値より小さい第二しきい値に縮められるため、オフセットを導出するためにいったん磁気データ群の蓄積が開始されると、移動体の姿勢変化が特定の作法(例えば一定時間内に等角速度で一回転)に則ってないとしても短時間のうちに必要な磁気データ群が蓄積される。
(1) A magnetic data processing method for achieving the above-described object requires that magnetic data is sequentially input from a magnetic sensor, and the distance between the two input magnetic data exceeds a first threshold value. As described above, the storage of the magnetic data in the storage means starts from the two input magnetic data, and the distance from the magnetic data stored in the storage means is smaller than the first threshold value. On condition that the magnetic data exceeding the threshold value is input, the input magnetic data is additionally stored in the storage means, and the magnetic data is based on the magnetic data stored in the storage means Deriving the offset of.
According to this method, accumulation of the magnetic data group used for deriving the offset is not started unless the distance between the two input magnetic data exceeds the first threshold value. Since the situation in which the magnetic field changes drastically is rare, it can usually occur frequently by setting the first threshold value to a value large enough that the accumulation of magnetic data groups does not start due to the magnetic field change that can normally occur frequently It is possible to prevent the offset from being derived with low accuracy based on the magnetic data group including the magnetic data output from the magnetic sensor before and after a certain change in the magnetic field. If the first threshold value is set in this way and the accumulation of the magnetic data group is started, the trigger is not a magnetic field change that usually occurs frequently, but the posture of the moving object. It is a change. If the number of magnetic data groups necessary for deriving the offset is accumulated within a short period of time after the attitude of the moving body starts to change, the magnetic data groups output from the magnetic sensor can be accumulated within a certain magnetic field. Can do. According to this method, once accumulation of the magnetic data group is started to derive the offset, the threshold value of the distance between the magnetic data to be accumulated and the already accumulated magnetic data is set to the first threshold value. Since the second threshold value is reduced to a smaller second threshold value, the magnetic data group output from the magnetic sensor can be stored in a constant magnetic field within a short time. Further, since the threshold value of the distance between the magnetic data to be stored and the already stored magnetic data is reduced to a second threshold value that is smaller than the first threshold value, the magnetic data is temporarily used to derive the offset. When group accumulation is started, necessary magnetic data groups are accumulated in a short time even if the posture change of the moving body does not follow a specific manner (for example, one revolution at a constant angular velocity within a certain period of time). .

(2)上記目的を達成するための磁気データ処理方法において、入力された前記磁気データを前記蓄積手段に追加格納するとき、前記蓄積手段に最後に格納された前記磁気データとの距離が前記第二しきい値を越える前記磁気データが入力されたことを必要条件として、入力された前記磁気データを前記蓄積手段に追加格納してもよい。
この方法によると、蓄積される磁気データ群の分布が偏る可能性はあるものの、短時間のうちに必要な磁気データ群が蓄積される。
(2) In the magnetic data processing method for achieving the above object, when the input magnetic data is additionally stored in the storage means, the distance from the magnetic data stored last in the storage means is the first The inputted magnetic data may be additionally stored in the accumulating means on condition that the magnetic data exceeding two threshold values is inputted.
According to this method, the distribution of the magnetic data group to be accumulated may be biased, but the necessary magnetic data group is accumulated in a short time.

(3)上記目的を達成するための磁気データ処理方法において、入力された前記磁気データを前記蓄積手段に追加格納するとき、前記蓄積手段に格納されている全ての前記磁気データとの距離が前記第二しきい値を越える前記磁気データが入力されたことを必要条件として、入力された前記磁気データを前記蓄積手段に追加格納してもよい。
この方法によると、オフセットを導出するために蓄積するデータ群の分布が偏ることを防止できる。
(3) In the magnetic data processing method for achieving the above object, when the input magnetic data is additionally stored in the storage means, the distance from all the magnetic data stored in the storage means is The input magnetic data may be additionally stored in the storage means on condition that the magnetic data exceeding the second threshold is input.
According to this method, it is possible to prevent the distribution of the data group accumulated to derive the offset from being biased.

(4)上記目的を達成するための磁気データ処理方法において、入力された前記磁気データを前記蓄積手段に格納する前に1個保持し、保持されている前記磁気データとの距離が前記第一しきい値以下の前記磁気データが、保持されている前記磁気データに続いて所定個数連続入力されたことを必要条件として、保持されている前記磁気データを破棄し、保持されている前記磁気データとの距離が前記第一しきい値を越える前記磁気データが入力されたことを必要条件として、保持されている前記磁気データと保持されている前記磁気データより後に入力された前記磁気データとから、入力された前記磁気データの前記蓄積手段への格納を開始してもよい。
この方法によると、オフセットを導出するための磁気データ群の蓄積が、姿勢変化を伴わない移動体の移動に伴って徐々に磁界が変化したために開始されることを防止できる。特に3次元磁気センサのオフセットを導出する場合には、移動体が特定の姿勢変化(例えば軸固定の等速回転運動)をするようにユーザを促すことなく、オフセットを導出するための磁気データ群を蓄積することができるため、この方法による効果が大きくなる。
(4) In the magnetic data processing method for achieving the above object, one piece of the inputted magnetic data is held before being stored in the storage means, and the distance from the held magnetic data is the first On the condition that the magnetic data below the threshold is continuously input a predetermined number following the stored magnetic data, the stored magnetic data is discarded and the stored magnetic data From the stored magnetic data and the magnetic data input after the stored magnetic data, on condition that the magnetic data exceeding the first threshold is input. The storage of the input magnetic data in the storage means may be started.
According to this method, accumulation of the magnetic data group for deriving the offset can be prevented from being started due to the gradual change of the magnetic field accompanying the movement of the moving body without any change in posture. In particular, when deriving an offset of a three-dimensional magnetic sensor, a group of magnetic data for deriving the offset without prompting the user to make a specific posture change (for example, constant-axis rotational motion with a fixed axis). Therefore, the effect of this method is increased.

(5)上記目的を達成するための磁気データ処理方法において、入力された前記磁気データを前記蓄積手段に格納する前に1個保持し、保持されている前記磁気データとの距離が前記第一しきい値以下の前記磁気データが、保持されている前記磁気データに続いて所定期間連続入力されたことを必要条件として、保持されている前記磁気データを破棄し、保持されている前記磁気データとの距離が前記第一しきい値を越える前記磁気データが入力されたことを必要条件として、保持されている前記磁気データと保持されている前記磁気データより後に入力された前記磁気データとから、入力された前記磁気データの前記蓄積手段への格納を開始してもよい。
この方法によると、オフセットを導出するための磁気データ群の蓄積が、姿勢変化を伴わない移動体の移動に伴って徐々に磁界が変化したために開始されることを防止できる。特に3次元磁気センサのオフセットを導出する場合には、この方法による効果が大きくなる。
(5) In the magnetic data processing method for achieving the above object, the inputted magnetic data is held one before being stored in the storage means, and the distance from the held magnetic data is the first On the condition that the magnetic data below a threshold value is continuously input for a predetermined period following the magnetic data held, the magnetic data held is discarded and the magnetic data held From the stored magnetic data and the magnetic data input after the stored magnetic data, on condition that the magnetic data exceeding the first threshold is input. The storage of the input magnetic data in the storage means may be started.
According to this method, accumulation of the magnetic data group for deriving the offset can be prevented from being started due to the gradual change of the magnetic field accompanying the movement of the moving body without any change in posture. In particular, when the offset of the three-dimensional magnetic sensor is derived, the effect of this method is increased.

(6)上記目的を達成するための磁気データ処理方法において、前記蓄積手段に格納されている前記磁気データとの距離が前記第二しきい値以下の前記磁気データが所定個数連続入力されたことを必要条件として、前記蓄積手段に格納されている全ての前記磁気データを破棄した後に前記蓄積手段への前記磁気データの格納を再開してもよい。
この方法によると、姿勢変化を伴わない移動体の移動に伴って徐々に磁界が変化したためにオフセットを導出するための母集団要素として磁気データが蓄積されることを防止できる。
(6) In the magnetic data processing method for achieving the above object, a predetermined number of the magnetic data whose distance from the magnetic data stored in the storage means is not more than the second threshold value are continuously input. As a necessary condition, the storage of the magnetic data in the storage means may be resumed after discarding all the magnetic data stored in the storage means.
According to this method, it is possible to prevent magnetic data from being accumulated as a population element for deriving an offset because the magnetic field gradually changes with the movement of the moving body without a change in posture.

(7)上記目的を達成するための磁気データ処理方法において、前記蓄積手段に格納押されている前記磁気データとの距離が前記第二しきい値以下の前記磁気データが所定期間連続入力されたことを必要条件として、前記蓄積手段に格納されている全ての前記磁気データを破棄した後に前記蓄積手段への前記磁気データの格納を再開してもよい。
この方法によると、姿勢変化を伴わない移動体の移動に伴って徐々に磁界が変化したためにオフセットを導出するための母集団要素として磁気データが蓄積されることを防止できる。
(7) In the magnetic data processing method for achieving the above object, the magnetic data whose distance from the magnetic data stored and pushed in the storage means is not more than the second threshold value is continuously input for a predetermined period. As a necessary condition, the storage of the magnetic data in the storage means may be resumed after discarding all the magnetic data stored in the storage means.
According to this method, it is possible to prevent magnetic data from being accumulated as a population element for deriving an offset because the magnetic field gradually changes with the movement of the moving body without a change in posture.

(8)上記目的を達成するための磁気データ処理方法において、所定個数の前記磁気データが前記蓄積手段に格納されたことを必要条件として、前記蓄積手段に格納されている前記磁気データに基づいて前記磁気データのオフセットを導出してもよい。
尚、請求項に記載された方法の各動作の順序は、技術上の阻害要因がない限り、記載順に限定されるものではなく、どのような順番で実行されてもよく、また同時に実行されてもよい。また、本発明に備わる複数の手段の各機能は、構成自体で機能が特定されるハードウェア資源、プログラムにより機能が特定されるハードウェア資源、又はそれらの組み合わせにより実現される。また、これら複数の手段の各機能は、各々が物理的に互いに独立したハードウェア資源で実現されるものに限定されない。また、本発明は方法の発明として特定できるだけでなく、装置の発明としても、プログラムの発明としても、そのプログラムを記録した記録媒体の発明としても特定することができる。
(8) In the magnetic data processing method for achieving the above object, on the basis of the magnetic data stored in the storage means on the condition that a predetermined number of the magnetic data is stored in the storage means An offset of the magnetic data may be derived.
It should be noted that the order of each operation of the method described in the claims is not limited to the order of description as long as there is no technical obstruction factor, and may be executed in any order, or may be executed simultaneously. Also good. In addition, each function of the plurality of means provided in the present invention is realized by a hardware resource whose function is specified by the configuration itself, a hardware resource whose function is specified by a program, or a combination thereof. The functions of the plurality of means are not limited to those realized by hardware resources that are physically independent of each other. The present invention can be specified not only as a method invention but also as an apparatus invention, a program invention, and a recording medium recording the program.

以下、本発明の実施の形態を以下の順に説明する。
A.第一の実施形態
[1.全体説明]
1−1.ハードウェア構成
1−2.ソフトウェア構成
[2.バッファ更新]
2−1.全体の流れ
2−2.格納開始処理
2−3.追加格納処理
[3.オフセットの導出]
B.第二の実施形態
C.第三の実施形態
D.他の実施形態
Hereinafter, embodiments of the present invention will be described in the following order.
A. First embodiment [1. Overall explanation]
1-1. Hardware configuration 1-2. Software configuration [2. Buffer update]
2-1. Overall flow 2-2. Storage start process 2-3. Additional storage processing [3. Derivation of offset]
B. Second Embodiment C. Third Embodiment D. Other embodiments

A.第一の実施形態
[1.全体説明]
1−1.ハードウェア構成
図2は、本発明が適用される移動体の一例である携帯型電話機3の外観を示す模式図である。携帯型電話機3には3次元磁気センサ4が搭載されている。3次元磁気センサは互いに直交するx、y、zの3方向について磁界の強さを検出することによって磁界の方向及び強さを検出する。携帯型電話機3のディスプレイ2には、文字や画像の各種情報が表示される。例えば、ディスプレイ2には、地図と、方位を示す矢印や文字が表示される。
A. First embodiment [1. Overall explanation]
1-1. Hardware Configuration FIG. 2 is a schematic diagram showing an appearance of a mobile phone 3 which is an example of a mobile body to which the present invention is applied. A three-dimensional magnetic sensor 4 is mounted on the mobile phone 3. The three-dimensional magnetic sensor detects the direction and strength of the magnetic field by detecting the strength of the magnetic field in three directions of x, y, and z orthogonal to each other. Various information such as characters and images is displayed on the display 2 of the mobile phone 3. For example, the display 2 displays a map and an arrow or character indicating the direction.

図3は、3次元磁気センサ4と磁気データ処理装置1とを備える磁気測定装置を示すブロック図である。3次元磁気センサ4は、地磁気による磁界ベクトルのx方向成分、y方向成分、z方向成分をそれぞれ検出するx軸センサ30とy軸センサ32とz軸センサ34とを備えている。x軸センサ30、y軸センサ32、z軸センサ34は、いずれも磁気抵抗素子、ホール素子等で構成され、指向性のある1次元磁気センサであればどのようなものであってもよい。x軸センサ30、y軸センサ32及びz軸センサ34は、それぞれの感度方向が互いに直交するように固定されている。x軸センサ30、y軸センサ32及びz軸センサ34の出力は、時分割して磁気センサI/F(Inter Face)22に入力される。磁気センサI/F22では、x軸センサ30、y軸センサ32及びz軸センサ34からの入力が増幅された後にAD変換される。磁気センサI/F22から出力されるディジタルの磁気データは、バス5を介して磁気データ処理装置1に入力される。   FIG. 3 is a block diagram showing a magnetic measurement device including the three-dimensional magnetic sensor 4 and the magnetic data processing device 1. The three-dimensional magnetic sensor 4 includes an x-axis sensor 30, a y-axis sensor 32, and a z-axis sensor 34 that respectively detect an x-direction component, a y-direction component, and a z-direction component of a magnetic field vector due to geomagnetism. The x-axis sensor 30, the y-axis sensor 32, and the z-axis sensor 34 are all configured by a magnetoresistive element, a Hall element, etc., and may be any one as long as it has directivity. The x-axis sensor 30, the y-axis sensor 32, and the z-axis sensor 34 are fixed so that their sensitivity directions are orthogonal to each other. Outputs of the x-axis sensor 30, the y-axis sensor 32, and the z-axis sensor 34 are time-divisionally input to a magnetic sensor I / F (Inter Face) 22. In the magnetic sensor I / F 22, input from the x-axis sensor 30, the y-axis sensor 32, and the z-axis sensor 34 is amplified and then AD converted. Digital magnetic data output from the magnetic sensor I / F 22 is input to the magnetic data processing device 1 via the bus 5.

磁気データ処理装置1は、CPU40とROM42とRAM44とを備えている所謂コンピュータである。CPU40は、例えば携帯型電話機3の全体制御を司るプロセッサである。ROM42は、CPU40によって実行される磁気データ処理プログラムや、移動体の機能を実現するための種々のプログラム、例えばナビゲーションプログラムが格納されている、不揮発性の記憶媒体である。RAM44はCPU40の処理対象となるデータ(後述するp1、p2、Pn等)を一時的に保持する揮発性の記憶媒体であって、蓄積手段として機能する。尚、磁気データ処理装置1と3次元磁気センサ4とを1チップの磁気測定装置として構成することもできる。 The magnetic data processing device 1 is a so-called computer including a CPU 40, a ROM 42, and a RAM 44. The CPU 40 is a processor that performs overall control of the mobile phone 3, for example. The ROM 42 is a non-volatile storage medium that stores a magnetic data processing program executed by the CPU 40 and various programs for realizing the function of the moving body, for example, a navigation program. The RAM 44 is a volatile storage medium that temporarily holds data to be processed by the CPU 40 (p 1 , p 2 , P n to be described later), and functions as an accumulation unit. The magnetic data processing device 1 and the three-dimensional magnetic sensor 4 can be configured as a one-chip magnetic measurement device.

1−2.ソフトウェア構成
図4は、磁気データ処理プログラム90の構成を示すブロック図である。磁気データ処理プログラム90は、ナビゲーションプログラム98に方位データを提供するためのプログラムであって、ROM42に格納されている。方位データは地磁気の方向を示す2次元ベクトルデータである。尚、方位データは例えば移動体の姿勢認識のための3次元ベクトルデータとして他のアプリケーションプログラムに提供されてもよい。磁気データ処理プログラム90は、バッファ管理モジュール92、オフセット導出モジュール94、方位導出モジュール96等のモジュール群で構成されている。
1-2. Software Configuration FIG. 4 is a block diagram showing the configuration of the magnetic data processing program 90. The magnetic data processing program 90 is a program for providing azimuth data to the navigation program 98, and is stored in the ROM 42. The azimuth data is two-dimensional vector data indicating the direction of geomagnetism. The orientation data may be provided to other application programs as, for example, three-dimensional vector data for recognizing the posture of the moving body. The magnetic data processing program 90 is composed of a module group such as a buffer management module 92, an offset derivation module 94, and an orientation derivation module 96.

バッファ管理モジュール92は、磁気センサ4から順次出力される磁気データを入力し、入力した磁気データをオフセット更新に用いるためにバッファに蓄積するプログラム部品であって、CPU40、RAM44及びROM42を入力手段、蓄積手段、蓄積開始手段及び蓄積継続手段として機能させる。尚、このバッファはハードウェアで構成されてもよいし、ソフトウェアで構成されてもよい。このバッファに蓄積される磁気データ群を母集団データ群というものとする。   The buffer management module 92 is a program component that inputs magnetic data sequentially output from the magnetic sensor 4 and accumulates the input magnetic data in a buffer for use in offset updating. The CPU 40, the RAM 44, and the ROM 42 are input means. It functions as an accumulation means, an accumulation start means, and an accumulation continuation means. The buffer may be configured by hardware or software. The magnetic data group stored in this buffer is referred to as a population data group.

オフセット導出モジュール94は、バッファ管理モジュール92によって保持されている母集団データ群に基づいて新オフセットを導出し、旧オフセットを新オフセットに更新するプログラム部品であって、CPU40、RAM44及びROM42をオフセット導出手段として機能させる。尚、誤解のない文脈では旧オフセット及び新オフセットのことを単にオフセットというものとする。   The offset derivation module 94 is a program component that derives a new offset based on the population data group held by the buffer management module 92 and updates the old offset to the new offset. The offset derivation module 94 derives the offset of the CPU 40, the RAM 44, and the ROM 42. It functions as a means. In the context where there is no misunderstanding, the old offset and the new offset are simply referred to as offsets.

方位導出モジュール96は、磁気センサ4から順次出力される磁気データをオフセット導出モジュール94が保持しているオフセットによって補正して方位データを生成するプログラム部品である。具体的には、方位導出モジュール96は、3次元ベクトルデータである磁気データの各成分からオフセットの各成分を引き算して得られる3成分のうちの2成分又は3成分全部を方位データとして出力する。   The azimuth derivation module 96 is a program component that corrects the magnetic data sequentially output from the magnetic sensor 4 with the offset held by the offset derivation module 94 to generate azimuth data. Specifically, the azimuth derivation module 96 outputs two or all three of the three components obtained by subtracting each offset component from each component of magnetic data that is three-dimensional vector data as azimuth data. .

ナビゲーションプログラム98は、目的地までの誘導経路を探索し、地図上に誘導経路を表示する周知のプログラムである。地図の認識のし易さから、地図は現実の方位に地図上の方位が一致するように画面表示される。したがって例えば、携帯型電話機3が回転すると、ディスプレイ2に表示される地図は地面に対して回転しないようにディスプレイ2に対して回転する。このような地図の表示処理に方位データが用いられる。もちろん、方位データは、単に東西南北を文字や矢印で表示するためにのみ用いられてもよい。   The navigation program 98 is a well-known program that searches for a guidance route to a destination and displays the guidance route on a map. For ease of map recognition, the map is displayed on the screen so that the orientation on the map matches the actual orientation. Therefore, for example, when the mobile phone 3 rotates, the map displayed on the display 2 rotates with respect to the display 2 so as not to rotate with respect to the ground. Direction data is used for such map display processing. Of course, the azimuth data may be used only for displaying east, west, south, and north with characters or arrows.

[2.バッファ更新]
2−1.全体の流れ
図5及び図6は、バッファ更新処理の流れを示すフローチャートである。図5及び図6に示す処理は、オフセットの更新要求が発生したときにCPU40がオフセット導出モジュール94を実行することによって進行する。オフセットの更新要求は、一定時間間隔で発生するものであってもよいし、ユーザ入力などの特定のイベントの発生に応じて発生するものであってもよい。バッファ更新処理は、図5に示す前段の格納開始処理と図6に示す後段の追加格納処理とで構成される。
[2. Buffer update]
2-1. Overall Flow FIGS. 5 and 6 are flowcharts showing the flow of buffer update processing. The processing shown in FIGS. 5 and 6 proceeds when the CPU 40 executes the offset derivation module 94 when an offset update request is generated. The offset update request may be generated at regular time intervals, or may be generated in response to occurrence of a specific event such as user input. The buffer update process includes a front-stage storage start process shown in FIG. 5 and a rear-stage additional storage process shown in FIG.

2−2.格納開始処理
格納開始処理では、通常頻繁に起こりうる程度の磁界変化によっては磁気データのバッファへの蓄積を開始せず、移動体が大きく姿勢変化したときに磁気データのバッファへの格納を開始するために、第一しきい値として定数Aが用いられる。また格納開始処理では、磁気データのバッファへの格納が、姿勢変化を伴わない携帯型電話機3の移動に伴って徐々に磁界が変化したために開始されることを防止するため、カウンタ変数mと定数sとが用いられる。
2-2. Storage start processing In the storage start processing, storage of magnetic data in the buffer is not started due to a magnetic field change that can occur frequently frequently, but storage of the magnetic data in the buffer is started when the posture of the moving body changes greatly. Therefore, a constant A is used as the first threshold value. In addition, in the storage start process, the counter variable m and a constant are stored in order to prevent the magnetic data from being stored in the buffer from being started due to a gradual change in the magnetic field accompanying the movement of the mobile phone 3 without any change in posture. and s are used.

ステップS100では、カウンタ変数mが0にリセットされる。
ステップS102では、3次元磁気センサ4から磁気データqが磁気データ処理装置1に入力され、1個目の蓄積候補磁気データを保持するためのデータ構造体q1(q1x、q1y、q1z)にセットされる。
ステップS104では、カウンタ変数mがインクリメントされる。
ステップS106では、3次元磁気センサ4から磁気データqが磁気データ処理装置1に入力され、2個目の蓄積候補磁気データを保持するためのデータ構造体q2(q2x、q2y、q2z)にセットされる。
ステップS108では、1個目の蓄積候補磁気データと2個目の蓄積候補磁気データとの距離がしきい値Aを越えているかが判定される。すなわち、次式(1)が満たされているか否かが判定される。
|q1−q2|>A・・・(1)
ステップS108で否定判定されると、ステップS110においてカウンタ変数mが定数sまでカウントアップしているかが判定される。
In step S100, the counter variable m is reset to zero.
In step S102, magnetic data q is input from the three-dimensional magnetic sensor 4 to the magnetic data processing device 1, and a data structure q 1 (q 1x , q 1y , q 1z for holding the first accumulation candidate magnetic data is obtained. ) Is set.
In step S104, the counter variable m is incremented.
In step S106, magnetic data q is input from the three-dimensional magnetic sensor 4 to the magnetic data processing apparatus 1, and a data structure q 2 (q 2x , q 2y , q 2z for holding the second accumulation candidate magnetic data is obtained. ) Is set.
In step S108, it is determined whether the distance between the first accumulation candidate magnetic data and the second accumulation candidate magnetic data exceeds the threshold A. That is, it is determined whether or not the following expression (1) is satisfied.
| Q 1 −q 2 |> A (1)
If a negative determination is made in step S108, it is determined in step S110 whether the counter variable m has been counted up to a constant s.

1個目の蓄積候補磁気データと2個目の蓄積候補磁気データとの距離がしきい値Aを越えない限り、カウンタ変数mが定数sまでカウントアップするまでステップS104からステップS110までの処理が繰り返される。この期間、2個目の蓄積候補磁気データを保持するためのデータ構造体q2は、最後に入力された磁気データで更新され続ける。
カウンタ変数mが定数sまでカウントアップすると、ステップS100の処理に戻る。その結果、ステップS102において、1個目の蓄積候補磁気データを保持するためのデータ構造体q1と2個目の蓄積候補磁気データを保持するためのデータ構造体q2に保持されている磁気データとが破棄され、データ構造体q1に保持されている磁気データが新しい磁気データqに更新される。
As long as the distance between the first accumulation candidate magnetic data and the second accumulation candidate magnetic data does not exceed the threshold A, the processing from step S104 to step S110 is performed until the counter variable m is counted up to a constant s. Repeated. During this period, the data structure q 2 for holding the second accumulation candidate magnetic data is continuously updated with the last input magnetic data.
When the counter variable m is counted up to the constant s, the process returns to step S100. As a result, in step S102, a magnetic held in the data structures q 2 for holding data structures q 1 for holding the accumulated candidate magnetic data of one eye and two eyes of accumulated candidate magnetic data The data is discarded, and the magnetic data held in the data structure q 1 is updated to the new magnetic data q.

ステップS108で肯定判定されると、すなわち1個目の蓄積候補磁気データと2個目の蓄積候補磁気データとの距離がしきい値Aを越えると、1個目の蓄積候補磁気データq1が1個目の母集団要素データを保持するためのデータ構造体P1にセットされ、2個目の蓄積候補磁気データq2が1個目の母集団要素データを保持するためのデータ構造体P2にセットされる。すなわち、1個目の蓄積候補磁気データq1と2個目の蓄積候補磁気データq2とが母集団データ群を蓄積するためのバッファとしてのデータ構造体Pn(Pnx、Pny、Pnz)(n=1,2・・・u)に格納される。 If an affirmative determination is made in step S108, that is, if the distance between the first accumulation candidate magnetic data and the second accumulation candidate magnetic data exceeds the threshold A, the first accumulation candidate magnetic data q 1 is A data structure P is set in the data structure P 1 for holding the first population element data, and the second accumulation candidate magnetic data q 2 is for holding the first population element data. Set to 2 . That is, the data structure P n (P nx , P ny , P P as a buffer for storing the population data group of the first storage candidate magnetic data q 1 and the second storage candidate magnetic data q 2. nz ) (n = 1, 2,... u).

図1は、磁気データ処理装置1に順次入力される磁気データの例示である。図1では、理解を容易にするために二次元で磁気データ群が表現されている。携帯型電話機3の移動によって磁界が変化する前後に磁気データ処理装置1に入力される磁気データ群を示している。各磁気データは白丸及び黒丸で示される。白丸及び黒丸に添えられている数字は磁気データの入力順を示している。白丸は母集団データ群としてオフセットの導出に用いられない磁気データを示し、黒丸は母集団データ群としてオフセットの導出に用いられる磁気データを示している。図1に基づいて、どのような磁気データが入力されると母集団データ群としての磁気データ群の蓄積が開始されるかを具体的に説明する。尚、磁気データ処理装置1に順次入力される磁気データを、入力順に磁気データ1、磁気データ2、磁気データ3、・・・というものとする。   FIG. 1 is an illustration of magnetic data sequentially input to the magnetic data processing apparatus 1. In FIG. 1, a magnetic data group is represented in two dimensions for easy understanding. A magnetic data group input to the magnetic data processing device 1 before and after the magnetic field is changed by the movement of the mobile phone 3 is shown. Each magnetic data is indicated by a white circle and a black circle. The numbers attached to the white and black circles indicate the input order of magnetic data. White circles indicate magnetic data that is not used for derivation of offsets as a population data group, and black circles indicate magnetic data that is used for derivation of offsets as a population data group. Based on FIG. 1, what kind of magnetic data is input will be specifically described as starting accumulation of a magnetic data group as a population data group. The magnetic data sequentially input to the magnetic data processing device 1 are referred to as magnetic data 1, magnetic data 2, magnetic data 3,.

バッファ更新処理が起動した直後に磁気データ1が入力されると、磁気データ1は1個目の蓄積候補磁気データq1として保持される。続いて磁気データ2、磁気データ3が入力されたとき、磁気データ1から磁気データ2及び磁気データ3までの距離がいずれもしきい値Aより小さい場合には、磁気データ2及び磁気データ3は破棄される。図1に示すように、携帯型電話機3の姿勢が大きく変化していない期間においては、変化前の磁界において入力された磁気データ1から、変化前の磁界において入力された磁気データ2までの距離も、変化後の磁界において入力された磁気データ3までの距離d3も、しきい値Aより小さくなる。すなわち、しきい値Aは、携帯型電話機3の姿勢が大きく変化していない期間において磁界が通常頻繁に起こりうる範囲で変化したとしても、磁気データのバッファへの蓄積が開始されないように設定されている。また、定数sを「2」と設定すれば、すなわち、1個目の蓄積候補磁気データq1として磁気データが保持されてから、蓄積候補磁気データq1からの距離がしきい値A以下の磁気データが2個連続入力されると蓄積候補磁気データq1及びq2が破棄されるとすれば、磁気データ4が入力されることによって磁気データ1が破棄され、1個目の蓄積候補磁気データq1として磁気データ4が保持される。もちろん、定数sは2以外に設定することもできる。 When the magnetic data 1 is input immediately after the buffer update process is started, the magnetic data 1 is held as the first accumulation candidate magnetic data q 1 . Subsequently, when the magnetic data 2 and the magnetic data 3 are input, if the distance from the magnetic data 1 to the magnetic data 2 and the magnetic data 3 are both smaller than the threshold value A, the magnetic data 2 and the magnetic data 3 are discarded. Is done. As shown in FIG. 1, in a period in which the attitude of the mobile phone 3 is not greatly changed, the distance from the magnetic data 1 input in the magnetic field before the change to the magnetic data 2 input in the magnetic field before the change. However, the distance d 3 to the magnetic data 3 input in the changed magnetic field is also smaller than the threshold value A. That is, the threshold A is set so that magnetic data is not started to be stored in the buffer even if the magnetic field changes within a range in which it can frequently occur in a period in which the attitude of the mobile phone 3 does not change significantly. ing. Further, by setting the constants s and "2", i.e., the magnetic data from being held as a storage candidate magnetic data q 1 of 1 th, the distance from the storage candidate magnetic data q 1 is equal to or less than the threshold A If two pieces of magnetic data are continuously input, if the accumulation candidate magnetic data q 1 and q 2 are discarded, the magnetic data 1 is discarded by inputting the magnetic data 4, and the first accumulation candidate magnetism is obtained. Magnetic data 4 is held as data q 1 . Of course, the constant s can be set to other than 2.

変化後の磁界において磁気データ4が入力され、1個目の蓄積候補磁気データq1として保持された後の2回目の磁気データの入力によって、磁気データ4からの距離がしきい値Aを越える磁気データ6が入力されると、磁気データ4及び磁気データ6がオフセットを導出するための母集団要素としてバッファに格納される。磁気データ4からの距離がしきい値Aを越える磁気データが短期間に入力されるということは、通常頻繁に起こりうる磁界の変化によるものではない、すなわち携帯型電話機3の姿勢が大きく変化したことによる、磁気センサ4から測定される相対的な磁界の変化が起こったということである。このように携帯型電話機3の姿勢が大きく変化すると、バッファへの磁気データの格納が開始される。図1に示す例では、磁気データ4及び磁気データ6から磁気データのバッファへの格納が開始される。 The magnetic data 4 is input in the magnetic field after the change, and the distance from the magnetic data 4 exceeds the threshold A by the input of the second magnetic data after being held as the first accumulation candidate magnetic data q 1. When the magnetic data 6 is input, the magnetic data 4 and the magnetic data 6 are stored in the buffer as a population element for deriving an offset. The fact that the magnetic data whose distance from the magnetic data 4 exceeds the threshold A is input in a short period of time is not due to the change in the magnetic field that usually occurs frequently, that is, the attitude of the mobile phone 3 has changed greatly. This means that a change in the relative magnetic field measured from the magnetic sensor 4 has occurred. When the attitude of the mobile phone 3 changes greatly in this way, storage of magnetic data in the buffer is started. In the example shown in FIG. 1, storage of magnetic data in the buffer from the magnetic data 4 and the magnetic data 6 is started.

2−3.追加格納処理
図6に示す追加格納処理では、所定数の母集団データ群をバッファに蓄積するために、第一しきい値としての定数Aよりも小さい第二しきい値として定数Bを用いる。すなわち、図1に示すように、格納開始処理においては先に入力された磁気データとの距離が近いが故にバッファに格納されない磁気データであっても、追加格納処理においてはバッファに格納されるように、定数Bは定数Aより小さく設定される。また追加格納処理でも、姿勢変化を伴わない携帯型電話機3の移動に伴って徐々に磁界が変化したためにバッファに磁気データが蓄積されないように、カウンタ変数cと定数tとが用いられる。また追加格納処理では、母集団データ群の蓄積を所定数の磁気データが蓄積された時点で終了するためのカウンタ変数nが用いられる。
2-3. Additional Storage Processing In the additional storage processing shown in FIG. 6, a constant B is used as a second threshold value that is smaller than the constant A as the first threshold value in order to accumulate a predetermined number of population data groups in the buffer. That is, as shown in FIG. 1, even if magnetic data is not stored in the buffer because the distance from the previously input magnetic data is short in the storage start process, it is stored in the buffer in the additional storage process. The constant B is set smaller than the constant A. Also in the additional storage process, the counter variable c and the constant t are used so that magnetic data is not accumulated in the buffer because the magnetic field gradually changes as the mobile phone 3 moves without any change in posture. Further, in the additional storage process, a counter variable n is used for ending the accumulation of the population data group when a predetermined number of magnetic data is accumulated.

ステップS114では、カウンタ変数nが2にセットされる。追加格納処理では3個目の磁気データからバッファに追加格納されるからである。
ステップS116では、カウンタ変数cが0にリセットされる。
ステップS118では、カウンタ変数cがインクリメントされる。
ステップS120では、3次元磁気センサ4から出力された磁気データqが磁気データ処理装置1に入力される。
ステップS122では、バッファに最後に格納された磁気データ、すなわちそれを保持しているPnと最後に入力された磁気データqとの距離がしきい値Bを越えているかが判定される。すなわち、次式(2)が満たされているか否かが判定される。
|q−Pn|>B・・・(2)
ステップS122で否定判定されると、ステップS124においてカウンタ変数cが定数tまでカウントアップしているかが判定される。
In step S114, the counter variable n is set to 2. This is because in the additional storage process, the third magnetic data is additionally stored in the buffer.
In step S116, the counter variable c is reset to 0.
In step S118, the counter variable c is incremented.
In step S 120, the magnetic data q output from the three-dimensional magnetic sensor 4 is input to the magnetic data processing device 1.
In step S122, it is determined whether or not the distance between the last magnetic data stored in the buffer, that is, the P n holding the magnetic data and the last inputted magnetic data q exceeds the threshold value B. That is, it is determined whether or not the following expression (2) is satisfied.
| Q-P n |> B (2)
If a negative determination is made in step S122, it is determined in step S124 whether the counter variable c has been counted up to a constant t.

バッファに最後に格納された磁気データと磁気データ処理装置1に最後に入力された磁気データqとの距離がしきい値Bを越えない限り、カウンタ変数cが定数tまでカウントアップするまでステップS118からステップS124の処理が繰り返される。カウンタ変数cが定数tまでカウントアップすると、処理はステップS100に戻る。その結果、バッファに蓄積された全ての磁気データはその後の処理で破棄される。   Unless the distance between the magnetic data last stored in the buffer and the magnetic data q last input to the magnetic data processing device 1 exceeds the threshold value B, step S118 is performed until the counter variable c is counted up to a constant t. To step S124 is repeated. When the counter variable c is counted up to the constant t, the process returns to step S100. As a result, all the magnetic data stored in the buffer are discarded in the subsequent processing.

ステップS122で肯定判定されると、すなわち直前にバッファに格納された磁気データと最後に入力された磁気データとの距離がしきい値Bを越えると、ステップS126においてカウンタ変数nがインクリメントされ(ステップS126)、n個目の母集団要素データを保持するためのデータ構造体Pnに、磁気データ処理装置1に最後に入力された磁気データqがセットされる(ステップS128)。 If an affirmative determination is made in step S122, that is, if the distance between the magnetic data stored immediately before in the buffer and the last input magnetic data exceeds the threshold value B, the counter variable n is incremented in step S126 (step S126). S126) The magnetic data q last input to the magnetic data processing device 1 is set in the data structure P n for holding the n-th population element data (step S128).

ステップS130では、カウンタ変数nがuまでカウントアップしているかが判定される。カウンタ変数nがuまでカウントアップしている場合、すなわちu個の母集団要素データがバッファに蓄積されている場合、バッファへの磁気データの追加格納処理は終了し、オフセットの導出処理が起動する。カウンタ変数nがuまでカウントアップしていない場合、ステップS116に戻って上述の処理が繰り返される。尚、オフセットを導出するために必要な母集団要素データの数、すなわち定数uをいくつに設定するかは任意である。定数u及びしきい値Bを小さくするほどオフセットの更新頻度が高くなり、ユーザにとってはオフセット更新が容易になる。定数u及びしきい値Bを大きくするほどオフセットの精度が高まる。   In step S130, it is determined whether the counter variable n has been counted up to u. When the counter variable n has been counted up to u, that is, when u population element data has been accumulated in the buffer, the additional storage processing of magnetic data in the buffer is terminated, and the offset derivation processing is started. . If the counter variable n has not been counted up to u, the process returns to step S116 and the above processing is repeated. The number of population element data necessary for deriving the offset, that is, how many constants u are set is arbitrary. The smaller the constant u and the threshold B, the higher the frequency of updating the offset, which makes it easier for the user to update the offset. As the constant u and the threshold value B are increased, the offset accuracy increases.

[3.オフセットの導出]
母集団データ群に基づいて新オフセットを導出するアルゴリズムは、種々提案されており、最小二乗法等の統計的手法を用いるアルゴリズムであってもよいし、本件出願人によって既に出願されている特願2005−337412及び特願2006−44289に開示されているように統計的手法を用いないアルゴリズムであってもよい。いずれのアルゴリズムを採用する場合であっても、オフセットの導出処理は、バッファに蓄積された磁気データ群に基づいて磁気データ処理装置1によって実行される。
[3. Derivation of offset]
Various algorithms for deriving a new offset based on the population data group have been proposed, and may be an algorithm using a statistical method such as the least squares method, or a patent application already filed by the applicant. An algorithm that does not use a statistical method may be used as disclosed in Japanese Patent Application No. 2005-337412 and Japanese Patent Application No. 2006-44289. Regardless of which algorithm is employed, the offset derivation process is executed by the magnetic data processing device 1 based on the magnetic data group stored in the buffer.

B.第二の実施形態
第一の実施形態では、姿勢変化を伴わない携帯型電話機3の移動に伴って徐々に磁界が変化したためにバッファに磁気データが格納されないように、過去に入力された磁気データとの距離がしきい値を越えない磁気データが所定個数連続入力されると、過去に入力された磁気データを母集団要素データとして用いずに破棄した。第二の実施形態は、同様の目的を達成するため、過去に入力された磁気データとの距離がしきい値を越えない磁気データが所定期間連続入力されると、過去に入力された磁気データを母集団要素データとして用いずに破棄する。すなわち、第二の実施形態では、格納開始処理のステップS110及び追加格納処理のステップS124において所定のタイマがタイムアップしているときに処理がステップS100に戻る。
B. Second Embodiment In the first embodiment, magnetic data input in the past is used so that the magnetic data is not stored in the buffer because the magnetic field gradually changes as the mobile phone 3 moves without changing its posture. When a predetermined number of magnetic data whose distance to the threshold does not exceed the threshold value is continuously input, the magnetic data input in the past is discarded without being used as population element data. In the second embodiment, in order to achieve the same object, when magnetic data whose distance from the magnetic data input in the past does not exceed the threshold is continuously input for a predetermined period, the magnetic data input in the past is used. Is discarded without being used as population element data. That is, in the second embodiment, when the predetermined timer is up in step S110 of the storage start process and step S124 of the additional storage process, the process returns to step S100.

C.第三の実施形態
第一の実施形態では、追加格納処理において、バッファに最後に格納された磁気データと最後に入力された磁気データとの距離がしきい値Bを越えない限り、最後に入力された磁気データはバッファに格納されないアルゴリズムを説明した。この場合、最後に入力された磁気データとの距離が近い磁気データが既にバッファに蓄積されているにもかかわらず、最後に入力された磁気データがバッファに追加格納されることがあるため、母集団データ群の分布が偏る可能性がある。そこで、第三の実施形態では、バッファに格納されている全ての磁気データと最後に入力された磁気データとの距離がしきい値Bを越えない限り、最後に入力された磁気データがバッファに格納されないアルゴリズムが採用される。具体的には、ステップS122の処理において、最後に入力された磁気データqとの比較対象をPk(k=1、2,・・・n)とし、全てのkについて次式(3)が満たされない場合に処理はステップS124に移る。
|q−Pk|>B・・・(3)
第三の実施形態によると、互いの距離が近い磁気データを含む母集団データ群に基づいてオフセットが導出されることがないため、高い精度でオフセットを導出することができる。
C. Third Embodiment In the first embodiment, in the additional storage process, unless the distance between the magnetic data last stored in the buffer and the last input magnetic data exceeds the threshold value B, the last input is performed. An algorithm is described in which the stored magnetic data is not stored in the buffer. In this case, even though magnetic data that is close to the last input magnetic data is already stored in the buffer, the last input magnetic data may be additionally stored in the buffer. There is a possibility that the distribution of the group data group is biased. Therefore, in the third embodiment, unless the distance between all the magnetic data stored in the buffer and the last input magnetic data exceeds the threshold value B, the last input magnetic data is stored in the buffer. An algorithm that is not stored is employed. Specifically, in the process of step S122, the comparison target with the last input magnetic data q is P k (k = 1, 2,... N), and the following equation (3) is obtained for all k. If not satisfied, the process proceeds to step S124.
| Q-P k |> B (3)
According to the third embodiment, since the offset is not derived based on the population data group including the magnetic data that are close to each other, the offset can be derived with high accuracy.

D.他の実施形態
本発明は、上記実施形態に限定されるものではなく、その要旨を逸脱しない範囲で種々の形態で実施可能である。例えば、本発明がPDAに搭載される磁気センサや車両に搭載される磁気センサにも適用できることは当然である。また、本発明が2次元磁気センサに適用できることも当然である。
D. Other Embodiments The present invention is not limited to the above-described embodiment, and can be implemented in various forms without departing from the gist thereof. For example, the present invention is naturally applicable to a magnetic sensor mounted on a PDA or a magnetic sensor mounted on a vehicle. Of course, the present invention can be applied to a two-dimensional magnetic sensor.

本発明の実施形態に係る模式図。The schematic diagram which concerns on embodiment of this invention. 本発明の実施形態に係る模式図。The schematic diagram which concerns on embodiment of this invention. 本発明の実施形態に係るブロック図。The block diagram which concerns on embodiment of this invention. 本発明の実施形態に係るブロック図。The block diagram which concerns on embodiment of this invention. 本発明の第一実施形態に係るフローチャート。The flowchart which concerns on 1st embodiment of this invention. 本発明の第一実施形態に係るフローチャート。The flowchart which concerns on 1st embodiment of this invention.

符号の説明Explanation of symbols

1:磁気データ処理装置、3:携帯型電話機(移動体)、4:3次元磁気センサ、44:RAM(蓄積手段)、90:磁気データ処理プログラム、92:バッファ管理モジュール(蓄積開始手段、蓄積継続手段)、94:オフセット導出モジュール(導出手段) 1: Magnetic data processing device, 3: Mobile phone (mobile), 4: Three-dimensional magnetic sensor, 44: RAM (storage means), 90: Magnetic data processing program, 92: Buffer management module (storage start means, storage) (Continuation means), 94: offset derivation module (derivation means)

Claims (10)

移動体に搭載された磁気センサから磁気データを順次入力し、
入力された2個の前記磁気データ間の距離が第一しきい値を越えることを必要条件として、前記磁気データの蓄積手段への格納を、入力された2個の前記磁気データから開始し、
前記蓄積手段に格納されている前記磁気データとの距離が前記第一しきい値より小さい第二しきい値を越える前記磁気データが入力されたことを必要条件として、入力された前記磁気データを前記蓄積手段に追加格納し、
前記蓄積手段に格納されている前記磁気データに基づいて前記磁気データのオフセットを導出する、
ことを含む磁気データ処理方法。
Magnetic data is sequentially input from the magnetic sensor mounted on the moving body,
Storage of the magnetic data in the storage means is started from the two input magnetic data, on condition that the distance between the two input magnetic data exceeds the first threshold value,
On the condition that the magnetic data having a distance from the magnetic data stored in the storage means exceeding a second threshold value smaller than the first threshold value is input, the inputted magnetic data is Additionally stored in the storage means;
Deriving an offset of the magnetic data based on the magnetic data stored in the storage means;
Magnetic data processing method.
入力された前記磁気データを前記蓄積手段に追加格納するとき、前記蓄積手段に最後に格納された前記磁気データとの距離が前記第二しきい値を越える前記磁気データが入力されたことを必要条件として、入力された前記磁気データを前記蓄積手段に追加格納する、
請求項1に記載の磁気データ処理方法。
When additionally storing the inputted magnetic data in the storage means, it is necessary that the magnetic data whose distance from the last stored magnetic data in the storage means exceeds the second threshold value is input As a condition, the input magnetic data is additionally stored in the storage means.
The magnetic data processing method according to claim 1.
入力された前記磁気データを前記蓄積手段に追加格納するとき、前記蓄積手段に格納されている全ての前記磁気データとの距離が前記第二しきい値を越える前記磁気データが入力されたことを必要条件として、入力された前記磁気データを前記蓄積手段に追加格納する、
請求項1に記載の磁気データ処理方法。
When the input magnetic data is additionally stored in the storage means, the magnetic data whose distance from all the magnetic data stored in the storage means exceeds the second threshold is input. As a necessary condition, the input magnetic data is additionally stored in the storage means.
The magnetic data processing method according to claim 1.
入力された前記磁気データを前記蓄積手段に格納する前に1個保持し、
保持されている前記磁気データとの距離が前記第一しきい値以下の前記磁気データが、保持されている前記磁気データに続いて所定個数連続入力されたことを必要条件として、保持されている前記磁気データを破棄し、
保持されている前記磁気データとの距離が前記第一しきい値を越える前記磁気データが入力されたことを必要条件として、保持されている前記磁気データと保持されている前記磁気データより後に入力された前記磁気データとから、入力された前記磁気データの前記蓄積手段への格納を開始する、
請求項1〜3のいずれか一項に記載の磁気データ処理方法。
Hold one of the input magnetic data before storing in the storage means,
Retained on condition that a predetermined number of magnetic data whose distance from the retained magnetic data is less than or equal to the first threshold value is continuously input following the retained magnetic data Discard the magnetic data;
Input after the stored magnetic data and the stored magnetic data, on condition that the magnetic data whose distance from the stored magnetic data exceeds the first threshold is input. Starting storage of the input magnetic data in the storage means from the magnetic data
The magnetic data processing method as described in any one of Claims 1-3.
入力された前記磁気データを前記蓄積手段に格納する前に1個保持し、
保持されている前記磁気データとの距離が前記第一しきい値以下の前記磁気データが保持されている前記磁気データに続いて所定期間連続入力されたことを必要条件として、保持されている前記磁気データを破棄し、
保持されている前記磁気データとの距離が前記第一しきい値を越える前記磁気データが入力されたことを必要条件として、保持されている前記磁気データと保持されている前記磁気データより後に入力された前記磁気データとから、入力された前記磁気データの前記蓄積手段への格納を開始する、
請求項1〜3のいずれか一項に記載の磁気データ処理方法。
Hold one of the input magnetic data before storing in the storage means,
The stored data is stored on condition that the distance from the stored magnetic data is continuously input for a predetermined period following the magnetic data in which the magnetic data having the first threshold value or less is stored. Discard magnetic data,
Input after the stored magnetic data and the stored magnetic data, on condition that the magnetic data whose distance from the stored magnetic data exceeds the first threshold is input. Starting storage of the input magnetic data in the storage means from the magnetic data
The magnetic data processing method as described in any one of Claims 1-3.
前記蓄積手段に格納されている前記磁気データとの距離が前記第二しきい値以下の前記磁気データが所定個数連続入力されたことを必要条件として、前記蓄積手段に格納されている全ての前記磁気データを破棄した後に前記蓄積手段への前記磁気データの格納を再開する、
請求項1〜5のいずれか一項に記載の磁気データ処理方法。
All the data stored in the storage means are provided on the condition that a predetermined number of the magnetic data whose distance from the magnetic data stored in the storage means is less than or equal to the second threshold value are continuously input. Resuming storage of the magnetic data in the storage means after discarding the magnetic data;
The magnetic data processing method as described in any one of Claims 1-5.
前記蓄積手段に格納されている前記磁気データとの距離が前記第二しきい値以下の前記磁気データが所定期間連続入力されたことを必要条件として、前記蓄積手段に格納されている全ての前記磁気データを破棄した後に前記蓄積手段への前記磁気データの格納を再開する、
請求項1〜5のいずれか一項に記載の磁気データ処理方法。
All the above-mentioned stored in the storage means on the condition that the magnetic data whose distance to the magnetic data stored in the storage means is continuously input for a predetermined period of time is less than the second threshold value Resuming storage of the magnetic data in the storage means after discarding the magnetic data;
The magnetic data processing method as described in any one of Claims 1-5.
所定個数の前記磁気データが前記蓄積手段に格納されたことを必要条件として、前記蓄積手段に格納されている前記磁気データに基づいて前記磁気データのオフセットを導出する、
請求項1〜7のいずれか一項に記載の磁気データ処理方法。
Deriving an offset of the magnetic data based on the magnetic data stored in the storage means on the condition that a predetermined number of the magnetic data is stored in the storage means;
The magnetic data processing method as described in any one of Claims 1-7.
移動体に搭載された磁気センサから出力される磁気データを順次入力する入力手段と、
入力された前記磁気データを蓄積するための蓄積手段と、
入力された2個の前記磁気データ間の距離が第一しきい値を越えることを必要条件として、前記磁気データの前記蓄積手段への格納を入力された2個の前記磁気データから開始する蓄積開始手段と、
前記蓄積手段に格納されている前記磁気データとの距離が前記第一しきい値より小さい第二しきい値を越える前記磁気データが入力されたことを必要条件として、入力された前記磁気データを前記蓄積手段に追加格納する蓄積継続手段と、
前記蓄積手段に格納されている前記磁気データに基づいて前記磁気データのオフセットを導出する導出手段と、
を備える磁気データ処理装置。
Input means for sequentially inputting magnetic data output from a magnetic sensor mounted on a moving body;
Storage means for storing the inputted magnetic data;
Accumulation starting from the two input magnetic data, storing the magnetic data in the storage means, provided that the distance between the two input magnetic data exceeds a first threshold. Starting means;
On the condition that the magnetic data having a distance from the magnetic data stored in the storage means exceeding a second threshold value smaller than the first threshold value is input, the inputted magnetic data is Accumulation continuation means for additionally storing in the accumulation means;
Derivation means for deriving an offset of the magnetic data based on the magnetic data stored in the storage means;
A magnetic data processing apparatus comprising:
移動体に搭載された磁気センサから出力される磁気データを順次入力する入力手段と、
入力された前記磁気データを蓄積するための蓄積手段と、
入力された2個の前記磁気データ間の距離が第一しきい値を越えることを必要条件として、前記磁気データの前記蓄積手段への格納を入力された2個の前記磁気データから開始する蓄積開始手段と、
前記蓄積手段に格納されている前記磁気データとの距離が前記第一しきい値より小さい第二しきい値を越える前記磁気データが入力されたことを必要条件として、入力された前記磁気データを前記蓄積手段に追加格納する蓄積継続手段と、
前記蓄積手段に格納されている前記磁気データに基づいて前記磁気データのオフセットを導出する導出手段と、
してコンピュータを機能させる磁気データ処理プログラム。





Input means for sequentially inputting magnetic data output from a magnetic sensor mounted on a moving body;
Storage means for storing the inputted magnetic data;
Accumulation starting from the two input magnetic data, storing the magnetic data in the storage means, provided that the distance between the two input magnetic data exceeds a first threshold. Starting means;
On the condition that the magnetic data having a distance from the magnetic data stored in the storage means exceeding a second threshold value smaller than the first threshold value is input, the inputted magnetic data is Accumulation continuation means for additionally storing in the accumulation means;
Derivation means for deriving an offset of the magnetic data based on the magnetic data stored in the storage means;
A magnetic data processing program that causes a computer to function.





JP2006096522A 2006-03-31 2006-03-31 Magnetic data processing method, apparatus and program Expired - Fee Related JP4761142B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006096522A JP4761142B2 (en) 2006-03-31 2006-03-31 Magnetic data processing method, apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006096522A JP4761142B2 (en) 2006-03-31 2006-03-31 Magnetic data processing method, apparatus and program

Publications (2)

Publication Number Publication Date
JP2007271414A JP2007271414A (en) 2007-10-18
JP4761142B2 true JP4761142B2 (en) 2011-08-31

Family

ID=38674371

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006096522A Expired - Fee Related JP4761142B2 (en) 2006-03-31 2006-03-31 Magnetic data processing method, apparatus and program

Country Status (1)

Country Link
JP (1) JP4761142B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05215553A (en) * 1992-02-03 1993-08-24 Nec Home Electron Ltd Navigation apparatus
CN100535593C (en) * 2002-07-01 2009-09-02 旭化成电子材料元件株式会社 Azimuth measuring device and azimuth measuring method
JP4644126B2 (en) * 2003-07-03 2011-03-02 旭化成エレクトロニクス株式会社 Azimuth angle measuring apparatus and azimuth angle measuring method
WO2006011238A1 (en) * 2004-07-29 2006-02-02 Yamaha Corporation Azimuth data arithmetic method, azimuth sensor unit, and mobile electronic device

Also Published As

Publication number Publication date
JP2007271414A (en) 2007-10-18

Similar Documents

Publication Publication Date Title
JP4908637B2 (en) Physical quantity measuring apparatus and physical quantity measuring method
US8185309B2 (en) Enhanced inertial system performance
EP1832889B1 (en) Magnetic data processing device
JP4899525B2 (en) Magnetic sensor control device, magnetic measurement device, offset setting method and program
JP2009098125A (en) System and method for gyrocompass alignment using dynamically calibrated sensor data and iterative extended kalman filter within navigation system
JP5067155B2 (en) Magnetic data processing device, navigation device, magnetic data processing method, and magnetic data processing program
WO2022183665A1 (en) Initialization method and apparatus, electronic device, storage medium, and program product
JP2009002915A (en) Device, method and program for magnetic data processor
CN114485641A (en) Attitude calculation method and device based on inertial navigation and satellite navigation azimuth fusion
CN116718153B (en) Deformation monitoring method and system based on GNSS and INS
JP2019082328A (en) Position estimation device
JP2005195376A (en) Azimuth measuring method, and azimuth measuring instrument
JP4761142B2 (en) Magnetic data processing method, apparatus and program
KR101752724B1 (en) Alignment method for inertial navigation system
JP2011022025A (en) Magnetic data processing device, magnetic data processing method, and magnetic data processing program
JP4893021B2 (en) Magnetic sensor control device, magnetic measurement device, offset setting method and program
JP4947669B2 (en) Azimuth angle measuring method and azimuth angle measuring apparatus
JP5571027B2 (en) Portable device, program and method for correcting gravity vector used for autonomous positioning
JP2006071473A (en) Zero point error detection device for angular velocity sensor and method for the same
JP2011180097A (en) Processing unit, method, program for magnetic data, and magnetic measuring device
JP6653151B2 (en) Heading direction estimation system
US20180087906A1 (en) Device orientation systems and methods
JP5453969B2 (en) Magnetic data processing apparatus, magnetic data processing method, and magnetic data processing program
JP4899524B2 (en) Magnetic sensor control device, magnetic measurement device, offset setting method and program
KR20200022814A (en) Method for estimating indoor position using smartphone, system and computer readable medium for performing the method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090120

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

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

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

Free format text: PAYMENT UNTIL: 20140617

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4761142

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees