JP6146962B2 - Magnetic data processing device - Google Patents
Magnetic data processing device Download PDFInfo
- Publication number
- JP6146962B2 JP6146962B2 JP2012138446A JP2012138446A JP6146962B2 JP 6146962 B2 JP6146962 B2 JP 6146962B2 JP 2012138446 A JP2012138446 A JP 2012138446A JP 2012138446 A JP2012138446 A JP 2012138446A JP 6146962 B2 JP6146962 B2 JP 6146962B2
- Authority
- JP
- Japan
- Prior art keywords
- axis
- rotation
- data processing
- circle
- magnetic data
- 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
Links
Images
Landscapes
- Measuring Magnetic Variables (AREA)
Description
本発明は、3軸磁気センサを備えた磁気データ処理装置に関する。 The present invention relates to a magnetic data processing apparatus including a three-axis magnetic sensor.
従来から、携帯電話等の携帯機器に搭載した3軸磁気センサを用いて地磁気ベクトルを検出し、その検出値を使って、携帯機器の向く方位や、携帯機器の姿勢を算出する磁気データ処理装置が知られている。 Conventionally, a magnetic data processing device that detects a geomagnetic vector using a three-axis magnetic sensor mounted on a mobile device such as a mobile phone, and calculates the orientation of the mobile device and the orientation of the mobile device using the detected value It has been known.
携帯機器は、3軸磁気センサの他にも様々な電子部品を搭載している。そのため、これらの電子部品から発生した磁界(内部磁界)によって3軸磁気センサが影響を受け、地磁気ベクトルを正確に測定できないことがある。この問題を解決するため、内部磁界による影響を補正して、地磁気ベクトルを正確に測定できるようにし、その結果を利用した方位角計測装置や電子コンパスが知られている(下記特許文献1、2参照)。
Mobile devices are equipped with various electronic components in addition to the three-axis magnetic sensor. Therefore, the triaxial magnetic sensor is affected by the magnetic field (internal magnetic field) generated from these electronic components, and the geomagnetic vector may not be measured accurately. In order to solve this problem, an azimuth measuring device and an electronic compass are known that correct the influence of an internal magnetic field so that the geomagnetic vector can be accurately measured and use the result (
内部磁界の影響を補正するためには、図14に示すごとく、携帯機器の姿勢変化に伴って地磁気ベクトルMが描く方位球sの中心点O’を算出する。そして、3軸磁気センサの原点Oと、方位球sの中心点O’とのずれ(オフセット)を補正する。すなわち、検出した磁気ベクトルOMと、補正ベクトルOO’とを用いて、下記の式から、中心点O’を始点とするベクトルO’Mを算出する。
O’M=OM−OO’ ・・・(1)
In order to correct the influence of the internal magnetic field, as shown in FIG. 14, the center point O ′ of the azimuth sphere s drawn by the geomagnetic vector M is calculated in accordance with the attitude change of the portable device. Then, a deviation (offset) between the origin O of the three-axis magnetic sensor and the center point O ′ of the azimuth sphere s is corrected. That is, using the detected magnetic vector OM and the correction vector OO ′, a vector O′M starting from the center point O ′ is calculated from the following equation.
O'M = OM-OO '(1)
中心点O’を算出する方法としては、例えば、特許文献2に記載されているように、図14に示すごとく、地磁気ベクトルMの検出値を複数個、取得し、例えば最小二乗法により、各々の検出値からの距離のばらつきが最も小さくなる点を算出する。この点が図14における中心点O’となる。
As a method of calculating the center point O ′, for example, as described in
このように中心点O’を算出する場合、地磁気ベクトルMの複数の検出値が方位球s上において偏っていないことが望ましい。検出値が偏っていると、方位球sを正確に算出できなくなり、中心点O’の算出精度が低下しやすくなる。したがって、この方法により中心点O’の算出精度を向上するためには、ユーザに携帯機器を様々な方位に向けさせ、地磁気ベクトルMの検出値を方位球s上において万遍なく取得する必要がある。 When the center point O ′ is calculated in this way, it is desirable that the plurality of detected values of the geomagnetic vector M are not biased on the azimuth s. If the detected value is biased, the azimuth sphere s cannot be accurately calculated, and the calculation accuracy of the center point O ′ tends to be lowered. Therefore, in order to improve the calculation accuracy of the center point O ′ by this method, it is necessary to cause the user to point the mobile device in various directions and to acquire the detected value of the geomagnetic vector M uniformly on the azimuth sphere s. is there.
また、別の中心点O’を算出する方法として、下記特許文献1には、得られた検出値の中から方位球s上で予め定めた条件を満足する互いにできるだけ離れた4点を選択し、その4点から中心点O’を算出する方法が開示されている。
Further, as another method for calculating the center point O ′, in
しかしながら特許文献2のような、得られた複数の検出値群から統計的に中心点O’を算出する方法では、算出精度を向上しようとすると、ユーザに、携帯機器を様々な方向に向けさせる必要があり、算出精度向上のため操作を強制させると、ユーザの負担が大きくなるという問題がある。
However, in the method of statistically calculating the center point O ′ from a plurality of obtained detection value groups as in
その一方で、ユーザの負担を小さくするために、ユーザが携帯機器を自然に使用している間に、地磁気ベクトルMの検出値を複数個取得し、これを使って中心点O’を求める方法も考えられる。しかしながら、この場合、ユーザは携帯機器を意識的に様々な方角に向けるわけではないので、検出値が方位球s上において偏りやすくなる。そのため、中心点O’の算出精度が低下しやすくなるという問題がある。さらに、特許文献2では、偏った検出値しか得られていないような、算出精度を充分に確保できない場合は、求めた基準点を破棄するとしており、破棄して精度の良い基準点が求められるわけではなく、問題の解決になっていない。
On the other hand, in order to reduce the burden on the user, a method of obtaining a plurality of detected values of the geomagnetic vector M and obtaining the center point O ′ using the detected values while using the mobile device naturally. Is also possible. However, in this case, since the user does not consciously point the mobile device in various directions, the detected values tend to be biased on the azimuth s. Therefore, there is a problem that the calculation accuracy of the center point O ′ tends to be lowered. Further, in
また、特許文献1のような、所定の条件を満足する互いにできるだけ離れた検出値を選択して、中心点O’を求める方法では、ユーザに操作を強制することなく、得られた検出値の中から、精度良くオフセット算出できる検出値を選択することができるが、所定の条件を満足する検出値が得られるまで時間がかかる可能性があるという問題がある。
Further, in the method of obtaining the center point O ′ by selecting detection values that are as far as possible from each other and satisfying a predetermined condition as in
本発明は、かかる背景に鑑みてなされたもので、ユーザに回転操作を強制させず、仮に検出値が偏った値でしか得られていない場合であっても、方位球の中心点を精度よく算出できる磁気データ処理装置を提供しようとするものである。 The present invention has been made in view of such a background, and does not force the user to perform a rotation operation, and even if the detected value is obtained only with a biased value, the center point of the azimuth sphere can be accurately determined. A magnetic data processing device capable of calculation is to be provided.
本発明の一態様は、携帯機器に固定された3軸直交座標系における磁気ベクトルとして地磁気を検出する3軸磁気センサを備え、上記携帯機器の姿勢変化に伴って上記磁気ベクトルが描く方位球の中心点を算出することにより、上記携帯機器の内部磁界による上記3軸磁気センサへの影響を補正する磁気データ処理装置であって、
上記携帯機器の姿勢が変化している姿勢変化期間に得られる、上記磁気ベクトルの複数の検出値を記憶するメモリと、
一つの上記姿勢変化期間における上記磁気ベクトルの複数の検出値からなる検出値群が、上記携帯機器の姿勢を一軸周りに回転させている間に得られたものか否かを判断する回転運動判断手段と、
該回転運動判断手段により、上記検出値群が、上記携帯機器の姿勢を一軸周りに回転させている間に得られたものであると判断された場合に、その回転の回転軸を算出する回転軸算出手段と、
異なる複数の上記姿勢変化期間に取得した上記検出値群から、それぞれ、上記回転運動判断手段及び上記回転軸算出手段によって求めた複数の上記回転軸の交点もしくは近似交点を、上記方位球の中心点として算出する中心点算出手段と、
上記3軸直交座標系の原点と上記方位球の中心点とのずれであるオフセットを補正するオフセット補正手段と、
を備えることを特徴とする磁気データ処理装置にある(請求項1)。
One aspect of the present invention includes a three-axis magnetic sensor that detects geomagnetism as a magnetic vector in a three-axis orthogonal coordinate system fixed to a portable device, and an azimuth sphere drawn by the magnetic vector as the posture of the portable device changes A magnetic data processing device that corrects the influence of the internal magnetic field of the portable device on the three-axis magnetic sensor by calculating a center point,
A memory for storing a plurality of detected values of the magnetic vector obtained during a posture change period in which the posture of the portable device is changing;
Rotation motion determination that determines whether or not a detection value group consisting of a plurality of detection values of the magnetic vector in one posture change period is obtained while rotating the posture of the portable device around one axis Means,
Rotation for calculating the rotation axis of the rotation when the rotation value determination means determines that the detected value group is obtained while rotating the attitude of the portable device around one axis. An axis calculation means;
From the detected value groups acquired during a plurality of different posture change periods, the intersections or approximate intersections of the plurality of rotation axes obtained by the rotational motion determination means and the rotation axis calculation means respectively are the center points of the azimuth sphere. A center point calculating means for calculating as
Offset correcting means for correcting an offset which is a deviation between the origin of the three-axis orthogonal coordinate system and the center point of the azimuth sphere;
A magnetic data processing apparatus comprising: (Claim 1).
上記磁気データ処理装置においては、上記検出値群を用いて、携帯機器の上記回転軸を算出する。そして、この回転軸を使って、方位球の中心点を算出する。
このようにすると、ユーザの負担を低減しやすくなる。すなわち、発明者らの研究によると、ユーザが携帯機器を自然に使用する場合、例えば、携帯機器をポケットに入れた状態で歩きながら向きを変えたり、携帯機器をポケットから取り出したり、画面を見やすい位置に持ってきたりする場合等には、その動作は、携帯機器の姿勢を一軸周りに回転する動作になることが多い。勿論、回転を強制させるわけではないので、180°以上の回転動作になることは稀であるが、90°程度の回転動作になることは十分に期待できる。したがって、複数の検出値群を用いて上記回転軸を複数算出し、これらの複数の回転軸の交点もしくは近似交点を求めることにより、方位球の中心点を算出すれば、得られている検出値が方位球全体から見ると偏っていて、従来の方法では精度良くオフセットを求められないような場合であっても、ユーザに強制的な回転操作をさせることなく、精度良くオフセットを算出することが可能となる。
In the magnetic data processing device, the rotation axis of the portable device is calculated using the detection value group. Then, using this rotation axis, the center point of the azimuth sphere is calculated.
If it does in this way, it will become easy to reduce a user's burden. That is, according to research by the inventors, when a user naturally uses a mobile device, for example, the user can change the direction while walking with the mobile device in a pocket, take out the mobile device from the pocket, or view the screen. In many cases, the movement of the mobile device is to rotate the posture of the portable device around one axis. Of course, since the rotation is not forced, it is rare that the rotation operation is 180 ° or more, but it can be sufficiently expected that the rotation operation is about 90 °. Therefore, if the center point of the azimuth sphere is calculated by calculating a plurality of the rotation axes using a plurality of detection value groups and obtaining the intersection or approximate intersection of the plurality of rotation axes, the detection value obtained is obtained. Even if the offset is biased when viewed from the whole azimuth and the conventional method cannot obtain the offset with high accuracy, the offset can be calculated with high accuracy without forcing the user to perform a rotating operation. It becomes possible.
また、本例の磁気データ検出装置は、検出値群が、携帯機器の姿勢を一軸周りに回転させている間に得られたものであるか否かを判断する回転運動判断手段を備える。
このようにすると、検出値群が、携帯機器の姿勢を一軸周りに回転させている間に得られたものであると判断された場合のみ、その検出値群を方位球の中心点の算出に用いることができる。そのため、方位球の中心点を、精度よく算出することが可能になる。
In addition, the magnetic data detection device of this example includes rotational motion determination means for determining whether or not the detected value group is obtained while rotating the posture of the mobile device around one axis.
In this way, only when it is determined that the detected value group is obtained while rotating the posture of the mobile device around one axis, the detected value group is used for calculating the center point of the azimuth sphere. Can be used. Therefore, the center point of the azimuth sphere can be calculated with high accuracy.
また、本例では、複数の上記回転軸を算出し、この複数の回転軸から2本の回転軸の組み合わせを選択し、その交点もしくは近似交点を、方位球の中心点として算出する。
選択した2本の回転軸が交差する場合は、その交点が、方位球の中心点となる。また、算出した回転軸には誤差が含まれているため、2本の回転軸が互いに交差しない場合があるが、この場合でも、2本の回転軸の近似交点を方位球の中心点として算出すれば、中心点を確実に算出することが可能になる。ここで近似交点とは、例えば、2本の回転軸が互いに最も近づいた箇所の中点とすることができる。
In this example, a plurality of rotation axes are calculated, a combination of two rotation axes is selected from the plurality of rotation axes, and the intersection or approximate intersection is calculated as the center point of the azimuth sphere.
When the two selected rotation axes intersect, the intersection is the center point of the azimuth sphere. In addition, since the calculated rotation axis includes an error, the two rotation axes may not intersect each other, but even in this case, the approximate intersection of the two rotation axes is calculated as the center point of the azimuth sphere. This makes it possible to calculate the center point with certainty. Here, the approximate intersection can be, for example, the midpoint of the place where the two rotation axes are closest to each other.
以上のごとく、本例によれば、ユーザに回転操作を強制させなくても、方位球の中心点を精度よく算出できる磁気データ処理装置を提供することができる。 As described above, according to this example, it is possible to provide a magnetic data processing device that can accurately calculate the center point of the azimuth sphere without forcing the user to perform a rotation operation.
上記磁気データ処理装置は、例えば、磁気ベクトルの検出値を使って携帯機器の向く方位を算出する電子コンパスや、携帯機器の回転角速度を算出する磁気ジャイロ、携帯機器の向く方位を地図情報と共に表示するナビゲーション装置等、地磁気ベクトルをオフセットにより補正した値を利用する全ての機器に対し、用いることができる。 The magnetic data processing device displays, for example, an electronic compass that calculates the orientation of the portable device using the detected magnetic vector value, a magnetic gyro that calculates the rotational angular velocity of the portable device, and the orientation of the portable device together with map information It can be used for all devices that use a value obtained by correcting the geomagnetic vector with an offset, such as a navigation device.
上記磁気データ処理装置において、上記回転運動判断手段は、一つの上記検出値群に含まれる複数の上記検出値が、円の周上又はその近傍に集まるか否かを判断することにより、上記検出値群が、上記携帯機器の姿勢を一軸周りに回転させている間に得られたものか否かを判断することが好ましい(請求項2)。
この場合には、上記検出値群が、上記携帯機器の姿勢を一軸周りに回転させている間に得られたものか否かを容易に判断することができる。すなわち、携帯機器の姿勢を一軸周りに回転させると、磁気ベクトルは方位球上に円を描く。そのため、検出値群が円周上またはその近傍に集まっているか否かを判断することにより、検出値群が、上記携帯機器の姿勢を一軸周りに回転させている間に取得されたものか否かを容易に判断することができる。
In the magnetic data processing device, the rotational motion determination means determines whether the plurality of detection values included in one detection value group are collected on or around a circle. It is preferable to determine whether or not the value group is obtained while rotating the attitude of the portable device around one axis (claim 2).
In this case, it can be easily determined whether or not the detected value group is obtained while rotating the posture of the portable device around one axis. That is, when the attitude of the mobile device is rotated around one axis, the magnetic vector draws a circle on the azimuth sphere. Therefore, whether or not the detected value group is acquired while rotating the attitude of the portable device around one axis by determining whether or not the detected value group is gathered on or around the circumference. Can be easily determined.
また、上記回転運動判断手段は、一つの上記検出値群に含まれる個々の上記検出値から、最小二乗法により上記円の方程式を算出し、上記複数の検出値が、算出した上記円の周上またはその近傍に集まっているか否かを判断することが好ましい(請求項3)。
この場合には、最小二乗法を用いるため、上記円を精度よく算出できる。そのため、上記検出値群が、上記携帯機器の姿勢を一軸周りに回転させている間に取得したものか否かを正確に判断することができる。また、上記円を含む平面に直交し上記円の中心を通る直線が、上記回転軸となるため、上記円を最小二乗法によって正確に求めることにより、回転軸を正確に算出できる。そのため、方位球の中心点を正確に算出できる。
Further, the rotational motion determination means calculates an equation of the circle from each of the detected values included in one detected value group by a least square method, and the plurality of detected values are calculated based on the calculated circumference of the circle. It is preferable to determine whether or not they are gathered at or near the top (claim 3).
In this case, since the least square method is used, the circle can be calculated with high accuracy. Therefore, it can be accurately determined whether or not the detected value group is acquired while the posture of the mobile device is rotated around one axis. Further, since a straight line passing through the center of the circle perpendicular to the plane including the circle becomes the rotation axis, the rotation axis can be accurately calculated by accurately obtaining the circle by the least square method. Therefore, the center point of the azimuth sphere can be calculated accurately.
また、上記回転運動判断手段は、上記円を含む平面から個々の上記検出値までの距離のばらつきが所定値以下であり、かつ、上記円の中心から個々の上記検出値までの距離のばらつきが所定値以下である場合に、上記検出値群が、上記携帯機器を一軸周りに回転させている間に得られたものであると判断することが好ましい(請求項4)。
この場合には、検出値群が、携帯機器の姿勢を一軸周りに回転させている間に得られたものか否かを、正確に判断することが可能になる。すなわち、検出値群が、携帯機器を一軸周りに回転させている間に得られたものである場合には、検出値群に含まれる個々の検出値は全て上記平面の近くに存在し、かつ上記円の近くに存在する。そのため、上記平面から個々の検出値までの距離のばらつきや、上記円の中心から個々の検出値までの距離のばらつきは小さくなる。また、検出値群が、携帯機器を一軸周りに回転させている間に得られたものでない場合は、検出値群に含まれる個々の検出値は平面や円の近くに存在しなくなり、上記ばらつきは大きくなる。そのため、上記ばらつきが所定値よりも大きいか否かを判断することにより、検出値群が、携帯機器を一軸周りに回転させている間に得られたものか否かを正確に判断することが可能となる。
なお、上記ばらつきは、例えば標準偏差σとすることができる。
Further, the rotational motion determination means has a variation in distance from a plane including the circle to each of the detected values not more than a predetermined value, and a variation in distance from the center of the circle to each of the detected values. When the value is equal to or less than a predetermined value, it is preferable to determine that the detected value group is obtained while the portable device is rotated about one axis (claim 4).
In this case, it is possible to accurately determine whether or not the detected value group is obtained while rotating the posture of the mobile device around one axis. That is, when the detection value group is obtained while rotating the mobile device around one axis, all of the individual detection values included in the detection value group exist near the plane, and It exists near the above circle. Therefore, the variation in distance from the plane to the individual detection values and the variation in distance from the center of the circle to the individual detection values are reduced. In addition, when the detection value group is not obtained while rotating the mobile device around one axis, the individual detection values included in the detection value group do not exist near the plane or circle, and the above variation Becomes bigger. Therefore, it is possible to accurately determine whether or not the detected value group is obtained while rotating the portable device around one axis by determining whether or not the variation is larger than a predetermined value. It becomes possible.
The variation can be, for example, the standard deviation σ.
また、上記回転軸算出手段は、上記円の半径が所定値以下の場合にのみ、上記回転軸を算出するよう構成されていることが好ましい(請求項5)。
この場合には、方位球の中心点を正確に求めることが可能になる。すなわち、上記円の半径が大きすぎる場合は、3軸磁気センサが外部磁場の影響を受けている可能性があり、方位球の中心点を正確に算出できないおそれがある。したがって、円の半径が所定値以下の場合にのみ回転軸を算出することにより、外部磁場の影響を排除し、方位球の中心点を正確に求めることが可能になる。所定値としては、例えば、携帯機器を用いる場所における地磁気の大きさに誤差相当分を加えた値とすることができる。
Further, it is preferable that the rotation axis calculation means is configured to calculate the rotation axis only when the radius of the circle is equal to or less than a predetermined value.
In this case, the center point of the azimuth sphere can be accurately obtained. That is, if the radius of the circle is too large, the triaxial magnetic sensor may be affected by an external magnetic field, and the center point of the azimuth sphere may not be accurately calculated. Therefore, by calculating the rotation axis only when the radius of the circle is equal to or less than a predetermined value, it becomes possible to eliminate the influence of the external magnetic field and accurately determine the center point of the azimuth sphere. The predetermined value can be, for example, a value obtained by adding an amount corresponding to an error to the magnitude of geomagnetism in a place where the mobile device is used.
また、上記回転軸算出手段は、一つの上記姿勢変化期間における上記携帯機器の姿勢の回転角度が、所定値以上の場合にのみ、上記回転軸を算出するよう構成されていることが好ましい(請求項6)。
この場合には、方位球の中心点の算出精度を、より高めることができる。すなわち、上記回転角度が小さい場合は、円を正確に算出しにくくなり、ひいては回転軸を正確に算出しにくくなる。そのため、方位球の中心点の算出精度が低下しやすくなる。したがって、上記回転角度が所定値以上の場合にのみ、回転軸を算出するようにすれば、中心点の算出精度を高めることが可能になる。回転角度は、回転軸を算出可能な程度に大きければ良いので、ユーザーに回転操作を強制させる場合のような180°以上の回転は要求されず、所定値は例えば60°とすることができる。
Further, it is preferable that the rotation axis calculation unit is configured to calculate the rotation axis only when the rotation angle of the attitude of the mobile device in one attitude change period is a predetermined value or more (claim). Item 6).
In this case, the calculation accuracy of the center point of the azimuth sphere can be further increased. That is, when the rotation angle is small, it is difficult to accurately calculate the circle, and thus it is difficult to accurately calculate the rotation axis. Therefore, the calculation accuracy of the center point of the azimuth sphere tends to be lowered. Therefore, if the rotation axis is calculated only when the rotation angle is greater than or equal to a predetermined value, the calculation accuracy of the center point can be improved. Since the rotation angle only needs to be large enough to calculate the rotation axis, the rotation of 180 ° or more as in the case of forcing the user to perform the rotation operation is not required, and the predetermined value can be set to 60 °, for example.
(実施例1)
上記磁気データ処理装置に係る実施例について、図1〜図13を用いて説明する。図1に示すごとく、本例の磁気データ処理装置1は、3軸磁気センサ2と、メモリ3と、回転運動判断手段4と、回転軸算出手段5と、中心点算出手段6と、オフセット補正手段7とを備える。3軸磁気センサ2は、携帯機器10(図2参照)に固定された3軸直交座標系における磁気ベクトルMとして地磁気を検出する。磁気データ処理装置1は、携帯機器10の姿勢変化に伴って磁気ベクトルMが描く方位球s(図4参照)の中心点O’を算出することにより、携帯機器10の内部磁界による3軸磁気センサ2への影響を補正する。
Example 1
An embodiment relating to the magnetic data processing apparatus will be described with reference to FIGS. As shown in FIG. 1, the magnetic
メモリ3は、携帯機器10の姿勢が変化している姿勢変化期間に得られる、磁気ベクトルMの複数の検出値を記憶する。
回転運動判断手段4は、一つの姿勢変化期間における磁気ベクトルMの複数の検出値からなる検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものか否かを判断する。
回転軸算出手段5は、回転運動判断手段4により、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものであると判断された場合に、その回転の回転軸A(図4参照)を算出する。
The
The rotational
The rotation axis calculation means 5 rotates when the rotation value determination means 4 determines that the detected value group d is obtained while rotating the attitude of the
中心点算出手段6は、異なる複数の姿勢変化期間に取得した検出値群dから、それぞれ、回転運動判断手段4及び回転軸算出手段5によって求めた複数の回転軸Aのうち2本の回転軸の組み合わせを選択し、その交点もしくは近似交点を、方位球sの中心点O’として算出する。
オフセット補正手段7は、3軸直交座標系の原点O(図4参照)と方位球sの中心点O’とのずれであるオフセットを補正する。
The center point calculation means 6 includes two rotation axes out of the plurality of rotation axes A obtained by the rotation motion determination means 4 and the rotation axis calculation means 5 from the detection value groups d acquired during a plurality of different posture change periods. And the intersection or approximate intersection is calculated as the center point O ′ of the bearing sphere s.
The offset correction means 7 corrects an offset that is a deviation between the origin O (see FIG. 4) of the three-axis orthogonal coordinate system and the center point O ′ of the azimuth sphere s.
本例では、磁気データ処理装置1を電子コンパスとして用いている。図2に示すごとく、携帯機器10には、3軸磁気センサ2の他に、マイコン8やマイクロフォン12等の各種電子部品が搭載されている。これらの電子部品によって内部磁界が発生し、3軸磁気センサ2が影響を受ける。磁気データ処理装置1は、内部磁界による3軸磁気センサ2への影響を補正し、地磁気ベクトルMの正確な値を求める。この値を使って、携帯機器10の向く正確な方位を算出し、表示部11に表示する。
In this example, the magnetic
図3に示すごとく、マイコン8は、CPU80、ROM81、RAM(メモリ3)、I/O82、これらを繋ぐライン83を備える。ROM81にはプログラム81pが記憶されている。CPU80がこのプログラム81pを読み出して実行することにより、上記回転運動判断手段4、回転軸算出手段5、中心点算出手段6、オフセット補正手段7が実現される。
As shown in FIG. 3, the
地磁気(磁気ベクトルM)は、地球上で大きく位置を変えない場合には、携帯機器10の姿勢に関わらず常に向き、大きさ共に一定と考えて良いため、携帯機器10の姿勢を変化させると、図4に示すごとく、地磁気ベクトルMの終点は3軸直交座標系上に球(方位球s)を描く。3軸磁気センサ2は携帯機器10の内部磁界の影響を受けているため、方位球sの中心O’は、3軸磁気センサ2の原点Oからずれている。本例の磁気データ処理装置1は、この中心点O’を算出することにより、内部磁界による3軸磁気センサ2への影響を補正する。
If the position of the geomagnetism (magnetic vector M) does not change greatly on the earth, it can be considered that the orientation and the magnitude are always constant regardless of the orientation of the
3軸磁気センサ2は、携帯機器10の姿勢が変化している間(姿勢変化期間)に、磁気ベクトルMの複数の検出値(検出値群d)を取得する。また、3軸磁気センサ2は、異なる姿勢変化期間に、複数の検出値群dを取得する。本例では、この複数の検出値群dを使って、方位球sの中心点O’を算出する。
The triaxial
中心点O’の算出方法を説明する。まず、図5に示すごとく、回転運動判断手段4を用いて、一つの検出値群dに含まれる個々の検出値から、最小二乗法を使って、円Cを算出する。すなわち、個々の検出値からの距離のばらつきが最も小さくなる中心点Bと半径を最小二乗法により求めると共に、円Cを含む平面から個々の上記検出値までの距離の2乗和が最小となるように円Cを算出する。そして、この円Cの周上またはその近傍に個々の検出値が集まるか否かを判断することにより、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものか否かを判断する。
A method for calculating the center point O ′ will be described. First, as shown in FIG. 5, the rotational motion determination means 4 is used to calculate a circle C from individual detection values included in one detection value group d using the least square method. That is, the center point B and the radius where the variation in distance from each detected value becomes the smallest are obtained by the least square method, and the sum of squares of the distance from the plane including the circle C to each detected value is minimized. The circle C is calculated as follows. Then, by determining whether or not individual detection values are gathered on or around the circle C, the detection value group d is obtained while rotating the posture of the
この判断は、次のように行う。まず図6に示すごとく、円Cを含む平面Pから個々の検出値までの距離xのばらつき(σ)が所定値以下であるか否かを判断する。ここで、距離xのばらつきが所定値を越える場合には、検出値群dは、携帯機器10の姿勢を一軸周りに回転させている間に得られたものでないと判断し、この検出値群dを用いた中心点O’の算出を中止する。そして、別の検出値群dを取得する。
また、距離xのばらつきが所定値以下である場合は、図7に示すごとく、円Cの中心Bから個々の検出値までの距離rのばらつき(σ)が所定値以下であるか否かを判断する。ここで、距離rのばらつきが所定値を越える場合は、検出値群dが、携帯機器10を一軸周りに回転させている間に得られたものでないと判断し、この検出値群dを用いた中心点O’の算出を中止する。そして、別の検出値群dを取得する。
This determination is made as follows. First, as shown in FIG. 6, it is determined whether or not the variation (σ) of the distance x from the plane P including the circle C to each detected value is equal to or less than a predetermined value. Here, when the variation in the distance x exceeds a predetermined value, it is determined that the detected value group d is not obtained while the attitude of the
When the variation in the distance x is equal to or smaller than the predetermined value, as shown in FIG. 7, it is determined whether or not the variation (σ) in the distance r from the center B of the circle C to each detected value is equal to or smaller than the predetermined value. to decide. Here, when the variation in the distance r exceeds a predetermined value, it is determined that the detected value group d is not obtained while the
また、本例では、算出した円Cの半径Rが所定値以下であるか否かを確認する。半径Rが所定値よりも大きい場合は、3軸磁気センサ2が外部磁場の影響を受けている可能性がある。そのため、この場合には、この検出値群dを用いた中心点O’の算出を中止し、別の検出値群dを取得する。
外部磁場の影響を受けていない場合は、半径Rの最大値は、地磁気ベクトルの測定誤差を考えなければ、方位球s(図4参照)の半径、すなわち地磁気ベクトルMの大きさ|M|に等しい。地磁気ベクトルMの大きさ|M|は、検出値群dを取得中に測定場所が大きく移動しない限り略一定であると考えて良いため、半径Rが|M|に測定誤差相当分を加えた値よりも大きい場合は、3軸磁気センサ2が外部磁場の影響を受けている可能性があると判断できる。なお、|M|は、地域により異なるため、本発明を適用する機器の使用予定地域に合わせて、適切な値を設定することが好ましい。
In this example, it is checked whether or not the calculated radius R of the circle C is equal to or smaller than a predetermined value. When the radius R is larger than a predetermined value, the triaxial
When not influenced by the external magnetic field, the maximum value of the radius R is set to the radius of the azimuth s (see FIG. 4), that is, the magnitude | M | equal. Since the magnitude | M | of the geomagnetic vector M can be considered to be substantially constant unless the measurement location moves greatly during acquisition of the detection value group d, the radius R is equal to | M | When the value is larger than the value, it can be determined that the triaxial
また、本例では図8に示すごとく、一つの姿勢変化期間における、携帯機器10の姿勢の回転角度θを算出し、この回転角度θが所定値以上であるか否かを判断する。携帯機器10の姿勢が充分に回転しておらず、回転角度θが小さい場合は、円Cを正確に算出できず、中心点O’の算出精度が低くなる可能性がある。そのため、この場合には、この検出値群dを用いた中心点O’の算出を終了し、別の検出値群dを取得する。
In this example, as shown in FIG. 8, the rotation angle θ of the posture of the
なお、回転角度θは、ユーザに強制的に回転操作をさせないことが前提の本発明の場合、180°以下となることがほとんどであるため、最後に得られた磁気ベクトルM(n)の終点は、最初に得られた磁気ベクトルM(1)の終点から最も遠いと考えて良く、所定値よりも大きいか否かの判断は、次のように簡略化することもできる。例えば、検出値群dに含まれる複数の検出値のうち、最初に得られた磁気ベクトルM(1)の終点から、最後に得られた磁気ベクトルM(n)の終点までの距離hを算出する。そして、距離hを円Cの半径Rで割った値h/Rが、所定値よりも大きいか否かを判断する。
また、円Cが方位球sの中心点O’から大きく離れている場合には、その半径Rが小さくなり、回転角度θが同じ値であっても回転軸Aの算出精度が低下することから、前記の距離hが|M(n)−M(1)|≧hを満足するかどうかをチェックし、円Cの半径Rが小さいことによる算出精度低下を防止することもできる。
Note that the rotation angle θ is almost 180 ° or less in the case of the present invention on the assumption that the user is not forced to perform the rotation operation, and therefore the end point of the magnetic vector M (n) obtained at the end. May be considered to be farthest from the end point of the magnetic vector M (1) obtained first, and the determination of whether or not it is larger than the predetermined value can be simplified as follows. For example, among a plurality of detection values included in the detection value group d, the distance h from the end point of the magnetic vector M (1) obtained first to the end point of the magnetic vector M (n) obtained last is calculated. To do. Then, it is determined whether or not a value h / R obtained by dividing the distance h by the radius R of the circle C is larger than a predetermined value.
Further, when the circle C is far away from the center point O ′ of the azimuth s, the radius R becomes small, and the calculation accuracy of the rotation axis A is lowered even if the rotation angle θ is the same value. It is also possible to check whether the distance h satisfies | M (n) −M (1) | ≧ h, and to prevent a reduction in calculation accuracy due to the small radius R of the circle C.
以上説明した処理を行うことにより、回転運動判断手段4によって、検出値群dが、携帯機器10の姿勢を一軸周りに回転している間に得られたものであり、かつ、3軸磁気センサ2が外部磁場の影響を受けておらず、かつ、上記回転角度θが回転軸Aを精度良く算出可能な程度に充分大きいことを確認できる。そして、この確認を終了した後、図4に示すごとく、円Cを含む平面Pに直交し円Cの中心を通る直線を算出する。この直線が、携帯機器10の回転運動の回転軸Aである。
By performing the processing described above, the detected value group d is obtained by the rotational motion determination means 4 while the attitude of the
そして、異なる複数の姿勢変化期間に複数の検出値群d(d1,d2,・・・)を取得し、個々の検出値群dを使って複数の回転軸A(A1,A2,・・・)を算出する。この複数の回転軸Aの中から2本の回転軸の組み合わせを選択し、その交点または近似交点を、方位球sの中心点O’として算出する。 Then, a plurality of detection value groups d (d1, d2,...) Are acquired during a plurality of different posture change periods, and a plurality of rotation axes A (A1, A2,. ) Is calculated. A combination of two rotation axes is selected from the plurality of rotation axes A, and the intersection or approximate intersection is calculated as the center point O 'of the azimuth s.
図9に示すごとく、中心点O’を算出した後、3軸直交座標系の原点Oと、中心点O’とのずれを補正する。すなわち、3軸磁気センサ2によって検出した磁気ベクトルOMと、補正ベクトルOO’から、以下の式を用いて、中心点O’を始点とするベクトルO’Mを算出する。
O’M=OM−OO’ ・・・(2)
そして、補正後のベクトルO’Mを用いて、携帯機器10の向く正確な方位を算出し、表示部11(図2参照)に表示する。
As shown in FIG. 9, after calculating the center point O ′, the deviation between the origin O of the three-axis orthogonal coordinate system and the center point O ′ is corrected. That is, from the magnetic vector OM detected by the three-axis
O'M = OM-OO '(2)
Then, using the corrected vector O′M, an accurate orientation toward the
次に、図10〜図13を用いて、磁気データ処理装置1のフローチャートの説明をする。本例では図10に示すごとく、まず、3軸磁気センサ2による、磁気ベクトルM(n)の検出値を取得する(ステップS1)。そして、ステップS2において、最初に記憶する検出値か、又は|M(n)−M(n−1)|>aを満足するか否かを判断する。ここでM(n−1)とは、M(n)の検出値を取得した時点において、後述のステップS3で最後に記憶した地磁気ベクトルの検出値であって、必ずしも1ステップ前における検出値とは限らない。また、aは所定の定数である。ステップS2は、新たに検出した磁気ベクトルM(n)の終点が、直前に後述のステップS3で記憶した磁気ベクトルM(n−1)の終点に近すぎる場合には記憶せず、円Cを求めるために新たに記憶する必要があると判断できる程度に離れている場合にのみ記憶するために設けてある。ほとんど終点が同じ位置となる検出値を多数記憶しても、後の計算に役立たないためである。ステップS2においてYesと判断された場合はステップS3に移り、地磁気ベクトルM(n)の検出値と検出時刻を記憶する。その後、ステップS1に戻る。また、ステップS2においてNoと判断された場合は磁気ベクトルM(n)を記憶せず、回転が終了しているかどうかを判定するためのステップS4に移る。
Next, a flowchart of the magnetic
ステップS4では、ステップS3で最後に記憶した検出値の検出時刻と最新の検出時刻との差が所定値以上かどうかを判断し、所定値以上であった場合は、ステップS5に移って、検出中の姿勢変化期間における姿勢変化が終了したと判断する。所定値未満であった場合は、姿勢変化が終了していないと判断し、ステップS1に戻る。 In step S4, it is determined whether or not the difference between the detection time of the detection value last stored in step S3 and the latest detection time is equal to or greater than a predetermined value. It is determined that the posture change in the middle posture change period has ended. If it is less than the predetermined value, it is determined that the posture change has not ended, and the process returns to step S1.
ステップS5の後、ステップS6に移る。ステップS6では、最後に記憶した地磁気ベクトルM(n)と、最初に検出した地磁気ベクトルM(1)とが次の式を満たすか否かを判断する。
|M(n)−M(1)|>ε ・・(3)
上記数式(3)は、検出した姿勢変化期間における姿勢変化量が、回転軸Aを精度良く求めることができる程度に大きいかを仮判断するための式である。正確に判断するには、円Cの半径Rを求めて回転角度を求めた後に判断する必要があり、ここでは仮判断を行うために設けている。但し、回転角度が大きくても円Cが方位球sの中心点O’から大きく離れていて、半径Rが小さく|M(n)−M(1)|が所定値より小さい場合には、精度良く回転軸Aを求めることができないため、上記数式(3)は、そのような場合は回転軸Aを求めないとする点で有用である。
After step S5, the process proceeds to step S6. In step S6, it is determined whether or not the last stored geomagnetic vector M (n) and the first detected geomagnetic vector M (1) satisfy the following equation.
| M (n) -M (1) |> ε (3)
The above formula (3) is a formula for tentatively determining whether or not the detected posture change amount in the posture change period is large enough to obtain the rotation axis A with high accuracy. To make an accurate determination, it is necessary to determine the radius R of the circle C and then determine the rotation angle, which is provided here for provisional determination. However, if the circle C is far away from the center point O ′ of the azimuth s and the radius R is small and | M (n) −M (1) | Since the rotation axis A cannot be obtained well, the above formula (3) is useful in that the rotation axis A is not obtained in such a case.
また、数式(3)におけるεは、所定の定数である。ステップS6は、最後に記憶した磁気ベクトルM(n)が、最初に記憶した磁気ベクトルM(1)から充分に離れているか否かを判断するために設けてある。ステップS6においてYesと判断された場合はステップS7に移り、Noと判断された場合は、精度良く回転軸Aを算出できないと判断し、検出したデータを消去(ステップS11)した後、再度データを取得し直す。ステップS1〜S6を繰り返すことにより、複数の検出値(検出値群d)を記憶する。 Further, ε in Equation (3) is a predetermined constant. Step S6 is provided to determine whether or not the last stored magnetic vector M (n) is sufficiently away from the first stored magnetic vector M (1). If it is determined Yes in step S6, the process proceeds to step S7. If it is determined No, it is determined that the rotation axis A cannot be calculated with high accuracy, and the detected data is erased (step S11), and then the data is again stored. Get it again. By repeating steps S1 to S6, a plurality of detection values (detection value group d) are stored.
ステップS7では、検出値群dに含まれる個々の検出値から、最小二乗法を用いて、円Cを算出する。すなわち、個々の検出値からの距離のばらつきが最小となる中心点と半径を求め、さらに円Cを含む平面から個々の検出値までの距離の二乗和が最小となる円C(図5参照)を算出する。また、この円Cを含む平面Pを算出する。 In step S7, a circle C is calculated from the individual detection values included in the detection value group d using the least square method. That is, a center point and a radius at which the variation in distance from each detected value is minimized are obtained, and a circle C in which the sum of squares of the distance from the plane including the circle C to each detected value is minimized (see FIG. 5). Is calculated. Also, a plane P including this circle C is calculated.
ステップS7を処理した後、ステップS8を行う。ここでは、個々の検出値から平面Pまでの距離x(図6参照)のばらつきσ(x)が、所定値εx以下か否かを判断する。ステップS8においてYesと判断された場合はステップS9に移る。ステップS8でNoと判断される場合は、記憶した検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものでない場合である。そのため、ステップS8でNoと判断される場合はステップS11に移り、記憶した検出値群dを消去する。そしてステップS1に戻り、検出値群dを記憶し直す。
After step S7 is processed, step S8 is performed. Here, the variation of the distance from the individual detection values to the plane P x (see FIG. 6) σ (x) determines whether more than a predetermined value epsilon x. If YES is determined in step S8, the process proceeds to step S9. When it is determined No in step S8, the stored detection value group d is not obtained while rotating the attitude of the
ステップS9では、円C(図7参照)の中心Bから個々の検出値までの距離rのばらつきσ(r)が、所定値εr以下か否かを判断する。ステップS9においてYesと判断された場合はステップS10に移る。ステップS9でNoと判断される場合は、記憶した検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものでない場合である。そのため、ステップS9でNoと判断される場合はステップS11に移り、記憶した検出値群dを消去する。そしてステップS1に戻り、検出値群dを記憶し直す。
In step S9, the circle C variation in the distance r from the center B (see FIG. 7) to the individual detection values sigma (r) determines whether more than a predetermined value epsilon r. If YES is determined in step S9, the process proceeds to step S10. When it is determined No in step S9, the stored detection value group d is not obtained while rotating the posture of the
ステップS10では、円C(図7参照)の半径Rが所定値εR以下か否かを判断する。ステップS10でYesと判断された場合は、ステップS12に移る。ステップS10でNoと判断される場合は、記憶した検出値群dが、外部磁場の影響を受けている可能性が高い場合である。そのため、ステップS10でNoと判断された場合はステップS11に移り、記憶した検出値群dを消去する。そしてステップS1に戻り、検出値群dを記憶し直す。 In step S10, a circle radius R of the C (see FIG. 7) is equal to or less than the predetermined value epsilon R. If it is determined Yes in step S10, the process proceeds to step S12. When it is determined No in step S10, the stored detection value group d is highly likely to be affected by the external magnetic field. Therefore, if it is determined No in step S10, the process proceeds to step S11, and the stored detection value group d is deleted. Then, returning to step S1, the detection value group d is stored again.
ステップS12では、1つの姿勢変化期間における、携帯機器10の姿勢の回転角度θ(図8参照)を算出する。このステップS12を処理した後、ステップS13に移る。ステップS13では、回転角度θが所定値εθ以上であるか否かを判断する。ステップS13でYesと判断された場合はステップS14に移る。ステップS13でNoと判断される場合は、姿勢変化期間において、携帯機器10の姿勢が充分に回転しなかった場合である。そのため、ステップS13でNoと判断された場合はステップS11に戻り、記憶した検出値群dを消去する。そしてステップS1に戻り、検出値群dを記憶し直す。
In step S12, the rotation angle θ (see FIG. 8) of the posture of the
なお、ステップS8,S9,S10,S12及びS13は、順番を入れ替えてもよい。また、上記εxは例えば1.3μT程度であり、εrは例えば0.45μT程度である。また、上記εRは例えば52μT程度であり、εθは例えば60°程度である。 Steps S8, S9, S10, S12, and S13 may be switched in order. The ε x is about 1.3 μT, for example, and ε r is about 0.45 μT, for example. Further, the epsilon R is, for example, about 52MyuT, the epsilon theta, for example, about 60 °.
ステップS14では、円Cの中心Bを通り平面Pに直交する直線を、回転軸Aとして算出する。その後、ステップS15に移る。ステップS15では、回転軸Aを複数本、算出したか否かを判断する。ここでYesと判断した場合にはステップS16に移る。また、ステップS15でNoと判断した場合はステップS1に戻り、別の検出値群dを記憶して、別の回転軸Aを算出する。ここで求める回転軸Aの本数は少なくとも2本であって、3本以上であっても構わない。また、オフセット算出時の状況に応じて本数の設定を変化させることもできる。 In step S14, a straight line passing through the center B of the circle C and orthogonal to the plane P is calculated as the rotation axis A. Thereafter, the process proceeds to step S15. In step S15, it is determined whether or not a plurality of rotation axes A have been calculated. If it is determined YES, the process proceeds to step S16. If NO is determined in step S15, the process returns to step S1, stores another detection value group d, and calculates another rotation axis A. Here, the number of rotation axes A to be obtained is at least two, and may be three or more. Also, the number setting can be changed according to the situation at the time of offset calculation.
ステップS16では、既に求めた複数本の回転軸Aのうち、交差角度φが最も大きい2本の回転軸Aの組み合わせを選び、その交差角度φが、所定値cより大きいか否かを判断する。このステップS16は、交差角度φが所定値Cより小さい2本の回転軸Aを使っても中心点O’の算出精度が低いため、この場合は中心点O’を算出しないようにするステップである。ステップS16においてYesと判断した場合はステップS17に移り、Noと判断した場合はステップS1に戻る。なお、本実施例では、交差角度φが最も大きい2本の回転軸を選択しているが、所定値Cより大きければ、交差角度φが最も大きい組み合わせ以外の2本の回転軸Aを選択することも勿論可能である。すなわち、所定値以上の交差角度からなる2本の回転軸の組み合わせを複数選択することもできる。 In step S16, a combination of the two rotation axes A having the largest intersection angle φ is selected from the plurality of rotation axes A that have already been obtained, and it is determined whether or not the intersection angle φ is greater than a predetermined value c. . This step S16 is a step in which the center point O ′ is not calculated in this case because the calculation accuracy of the center point O ′ is low even when the two rotation axes A having the intersection angle φ smaller than the predetermined value C are used. is there. If it is determined Yes in step S16, the process proceeds to step S17. If it is determined No, the process returns to step S1. In this embodiment, the two rotation axes having the largest intersection angle φ are selected. If the rotation axes are larger than the predetermined value C, the two rotation axes A other than the combination having the largest intersection angle φ are selected. Of course it is also possible. That is, it is possible to select a plurality of combinations of two rotation axes each having an intersection angle equal to or greater than a predetermined value.
なお、回転軸Aには誤差が含まれるため、ステップS16において、2本の回転軸Aが交差しない場合があるが、この場合は、一方の回転軸Aを平行移動し、他方の回転軸Aに交わらせた状態での、交差角度φを算出する。 Since the rotation axis A includes an error, the two rotation axes A may not intersect at step S16. In this case, one rotation axis A is translated and the other rotation axis A is translated. The crossing angle φ in the state of crossing with is calculated.
ステップS17では、ステップS16で選んだ2本の回転軸Aの交点を算出する。ここで、2本の回転軸Aが交差しない場合は、近似交点を算出する。近似交点は、例えば、2本の回転軸Aの最接近点の中点と定義することができる。2本の回転軸Aの組み合わせを複数選択した場合は、それぞれの2本の組み合わせから求めた近似交点の平均値を算出することにより、オフセットを求める。 In step S17, the intersection of the two rotation axes A selected in step S16 is calculated. Here, when the two rotation axes A do not intersect, an approximate intersection is calculated. The approximate intersection can be defined as the midpoint of the closest points of the two rotation axes A, for example. When a plurality of combinations of two rotation axes A are selected, an offset is obtained by calculating an average value of approximate intersections obtained from each of the two combinations.
ステップS17を処理した後、ステップS18に移る。ステップS18では、算出した交点又は近似交点を、方位球sの中心点O’として設定する。 After step S17 is processed, the process proceeds to step S18. In step S18, the calculated intersection or approximate intersection is set as the center point O 'of the azimuth sphere s.
ステップS18を処理した後、ステップS19に移る。ここでは、3軸磁気センサ2によって検出した地磁気ベクトルOM(図9参照)を補正し、中心点O’を始点としたベクトルO’Mを算出する。
After processing step S18, the process proceeds to step S19. Here, the geomagnetic vector OM (see FIG. 9) detected by the three-axis
本例の作用効果について説明する。本例の磁気データ処理装置1は、図4に示すごとく、検出値群dを用いて、携帯機器10の回転軸Aを算出する。そして、この回転軸Aを使って、方位球sの中心点O’を算出する。
このようにすると、ユーザの負担を低減しやすくなる。すなわち、発明者らの研究によると、ユーザが携帯機器10を自然に使用する場合、例えば、携帯機器10をポケット内に入れたまま、ユーザが歩行中に向きを変えたり、ポケットから取り出したり、画面を見やすい位置に持ってきたりする場合、その動作は、携帯機器10の姿勢を一軸周りに回転する動作になることが多い。そのため、検出値群dは、携帯機器10の姿勢を一軸周りに回転させている間に得られたものであることが多い。したがって、検出値群dを用いて回転軸Aを算出し、この回転軸Aを使って方位球sの中心点O’を算出すれば、ユーザの自然な動作を、方位球sの中心点O’の算出に利用しやすくなる。
The effect of this example will be described. The magnetic
If it does in this way, it will become easy to reduce a user's burden. That is, according to the inventors' research, when the user uses the
本発明では、以下の3つの点が重要となる。1つめは、上記回転動作は一軸回転ではあるが、その回転角度は自然な動作を利用するものであるため、ほとんどが例えば60〜90°程度の、180°未満の回転となる点である。2つめは、60〜90°程度の回転では、前記した特許文献1の発明では選択の条件を満足する4点を選べない可能性があり、特許文献2の発明では、検出値が方位球s上の偏った位置に存在していること自体は何ら変わりはないため、精度の良いオフセットを求めることはできない点である。3つめは、上述の通り従来の方法では精度の良いオフセット算出は難しいものの、回転軸をある程度精度良く求めることは可能なため、その近似交点を求めることによるオフセット算出は、従来の算出法に比べ精度向上を期待できることを新たに見出したことである。
In the present invention, the following three points are important. The first is that although the rotation operation is a uniaxial rotation, the rotation angle uses a natural operation, and most of the rotation is, for example, about 60 to 90 ° and less than 180 °. Secondly, in the rotation of about 60 to 90 °, there is a possibility that the four points satisfying the selection condition cannot be selected in the invention of
しかしながら、精度の良いオフセット算出を可能にするには、検出値が1軸周りに回転している間に得られたものかどうかを正確にチェックした上で回転軸を算出する必要がある。そこで、本発明では以下の通り、そのチェックを行うこととしている。従って、正確なチェックが前提で方位球s上で偏ったデータしか得られていなくても精度の良いオフセット算出が可能となる。
すなわち、図1、図11に示すごとく、本例の磁気データ処理装置1は、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものであるか否かを判断する回転運動判断手段4を備える。そして、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものであると判断された場合にのみ、その検出値群dを、方位球sの中心点O’の算出に用いる。そのため、方位球sの中心点O’を、精度よく算出することができる。
However, in order to enable accurate offset calculation, it is necessary to calculate the rotation axis after accurately checking whether the detected value is obtained while rotating around one axis. Therefore, in the present invention, the check is performed as follows. Therefore, accurate offset calculation can be performed even if only biased data on the orientation sphere s is obtained on the premise of an accurate check.
That is, as shown in FIGS. 1 and 11, in the magnetic
また、図5〜図7に示すごとく、本例の回転運動判断手段4は、一つの検出値群dに含まれる複数の検出値が、円Cの周上又はその近傍に集まるか否かを判断することにより、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものか否かを判断する。
このようにすると、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものか否かを容易に判断することができる。すなわち、携帯機器10の姿勢を一軸周りに回転させると、磁気ベクトルMは方位球s上に円Cを描く。そのため、磁気ベクトルMの検出値が、円Cの周上またはその近傍に集まっているか否かを判断することにより、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に取得されたものか否かを容易に判断することができる。
Further, as shown in FIGS. 5 to 7, the rotational motion determination means 4 of this example determines whether or not a plurality of detection values included in one detection value group d gather on or around the circle C. By determining, it is determined whether or not the detected value group d is obtained while rotating the posture of the
In this way, it is possible to easily determine whether or not the detected value group d is obtained while rotating the posture of the
また、本例の回転運動判断手段4は、図5〜図7に示すごとく、一つの検出値群dに含まれる個々の検出値から、最小二乗法を用いて円Cの方程式を算出し、複数の検出値が、算出した円Cの周上またはその近傍に集まっているか否かを判断する。
このようにすると、最小二乗法を用いるため、円Cを精度よく算出できる。そのため、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に取得したものか否かを正確に判断することができる。また、円Cを含む平面Pに直交し円Cの中心を通る直線が、上記回転軸Aとなるため、円Cを最小二乗法によって正確に求めることにより、回転軸Aを正確に算出できる。そのため、方位球sの中心点O’を正確に算出できる。
Further, as shown in FIGS. 5 to 7, the rotational
In this way, since the least square method is used, the circle C can be calculated with high accuracy. Therefore, it can be accurately determined whether or not the detected value group d is acquired while rotating the posture of the
また、本例の回転運動判断手段4は、平面P(図6参照)から個々の検出値までの距離xのばらつきが所定値以下であり、かつ、円C(図7参照)の中心Bから個々の検出値までの距離rのばらつきが所定値以下である場合に、検出値群dが、携帯機器10を一軸周りに回転させている間に得られたものであると判断する。
このようにすると、検出値群dが、携帯機器10の姿勢を一軸周りに回転させている間に得られたものか否かを、正確に判断することが可能になる。すなわち、検出値群dが、携帯機器10を一軸周りに回転させている間に得られたものである場合には、検出値群dに含まれる個々の検出値は全て平面Pの近くに存在し、かつ円Cの近くに存在する。そのため、平面Pから個々の検出値までの距離xのばらつきや、円Cの中心Bから個々の検出値までの距離rのばらつきは小さくなる。また、検出値群dが、携帯機器10を一軸周りに回転させている間に得られたものでない場合は、検出値群dに含まれる個々の検出値は平面Pや円Cの近くに存在しなくなり、ばらつきは大きくなる。そのため、上記ばらつきが所定値よりも大きいか否かを判断することにより、検出値群dが、携帯機器10を一軸周りに回転させている間に得られたものか否かを正確に判断することが可能となる。
Further, the rotational motion determination means 4 of the present example has a variation in the distance x from the plane P (see FIG. 6) to each detected value that is not more than a predetermined value, and from the center B of the circle C (see FIG. 7). When the variation in the distance r to each detection value is equal to or less than a predetermined value, it is determined that the detection value group d is obtained while the
In this way, it is possible to accurately determine whether or not the detected value group d is obtained while rotating the attitude of the
また、図11に示すごとく、本例の回転軸算出手段5は、円Cの半径Rが所定値以下の場合にのみ、回転軸Aを算出するよう構成されている。
このようにすると、方位球sの中心点O’を正確に求めることが可能になる。すなわち、円Cの半径Rが大きすぎる場合は、3軸磁気センサ2が外部磁場の影響を受けている可能性があり、方位球sの中心点O’を正確に算出できないおそれがある。したがって、円Cの半径Rが所定値以下の場合にのみ回転軸Aを算出すれば、外部磁場の影響を排除でき、方位球sの中心点O’を正確に求めることが可能になる。
Further, as shown in FIG. 11, the rotation axis calculation means 5 of this example is configured to calculate the rotation axis A only when the radius R of the circle C is equal to or less than a predetermined value.
In this way, the center point O ′ of the azimuth sphere s can be accurately obtained. That is, when the radius R of the circle C is too large, the triaxial
また、本例の回転軸算出手段5は、図12に示すごとく、一つの姿勢変化期間における携帯機器10の姿勢の回転角度θが、所定値以上の場合にのみ、回転軸Aを算出するよう構成されている。
前記した通り、本発明はユーザが意識せずに自然に行う携帯機器の姿勢変化を利用する発明であり、回転操作を強制する場合のように回転角度が180°以上となることは稀である。しかしながら、回転軸Aの高い算出精度を確保するには、ある程度の値の回転角度を確保する必要があるため、上記条件を満足する場合のみ回転軸Aを算出するよう構成されている。
このようにすると、方位球sの中心点O’の算出精度を、より高めることができる。すなわち、回転角度θが小さい場合は、円Cを正確に算出しにくくなり、ひいては回転軸Aを正確に算出しにくくなる。そのため、方位球sの中心点O’の算出精度が低下しやすくなる。したがって、回転角度θが所定値以上の場合のみ、回転軸Aを算出するようにすれば、中心点O’の算出精度を高めることが可能になる。
Further, as shown in FIG. 12, the rotation axis calculation means 5 of this example calculates the rotation axis A only when the rotation angle θ of the posture of the
As described above, the present invention is an invention that uses a posture change of a mobile device that is naturally performed without the user's awareness, and it is rare that the rotation angle is 180 ° or more as in the case of forcing a rotation operation. . However, in order to ensure high calculation accuracy of the rotation axis A, it is necessary to ensure a certain degree of rotation angle, and therefore the rotation axis A is calculated only when the above condition is satisfied.
In this way, the calculation accuracy of the center point O ′ of the azimuth sphere s can be further increased. That is, when the rotation angle θ is small, it is difficult to accurately calculate the circle C, and thus it is difficult to accurately calculate the rotation axis A. Therefore, the calculation accuracy of the center point O ′ of the azimuth sphere s tends to be lowered. Therefore, if the rotation axis A is calculated only when the rotation angle θ is greater than or equal to a predetermined value, the calculation accuracy of the center point O ′ can be increased.
図4に示すごとく、本発明では、上述の条件をチェックし、その条件を満たす場合に限り、2本の回転軸A1,A2の組み合わせを算出し、この2本の回転軸A1,A2の交点もしくは近似交点を、方位球sの中心点O’として算出する。そしてこの2本の回転軸Aが交差する場合は、その交点が、方位球sの中心点となる。また、算出した2本の回転軸Aには誤差が含まれているため、複数の回転軸Aが互いに交差しない場合は、近似交点を方位球sの中心点O’として算出する。そして、前記条件を満たしたことを条件に交点を求めていることから、方位球s上で偏った検出値しか得られていない状態で、従来の方法ではオフセットを精度良く求めることができない場合であっても、本発明の適用により、精度良くオフセットを求めることができる。 As shown in FIG. 4, in the present invention, the above condition is checked, and only when the condition is satisfied, the combination of the two rotation axes A1 and A2 is calculated, and the intersection of the two rotation axes A1 and A2 is calculated. Alternatively, the approximate intersection is calculated as the center point O ′ of the orientation sphere s. When these two rotation axes A intersect, the intersection is the center point of the azimuth sphere s. Further, since the calculated two rotation axes A include an error, when the plurality of rotation axes A do not intersect with each other, the approximate intersection is calculated as the center point O ′ of the azimuth sphere s. Since the intersection is obtained on the condition that the above condition is satisfied, the offset cannot be accurately obtained by the conventional method in a state where only the detected value biased on the azimuth sphere s is obtained. Even if it exists, an offset can be calculated | required with sufficient precision by application of this invention.
次に本発明の効果を実験例により説明する。
3軸磁気センサを備える携帯機器を用意し、本発明の条件を満足するオフセット算出ソフトを搭載した携帯機器Aと前記した特許文献1に記載の通り磁気センサの検出値からオフセット算出に用いる4点の検出値を選択し、オフセット算出を行うソフトを搭載した携帯機器Bを準備した。
そして、携帯機器A、携帯機器Bのそれぞれについて、水平回転75°、ピッチ回転75°の回転操作を複数回意図的に行い、オフセットを複数回求め、求めたオフセット値を使って方位を算出し、その方位算出のばらつきを調査した。
Next, the effect of the present invention will be described using experimental examples.
4 points used for offset calculation from the detection value of the magnetic sensor as described in the portable device A equipped with the offset calculation software that satisfies the conditions of the present invention, and the above-mentioned
Then, for each of the portable device A and the portable device B, the rotation operation of horizontal rotation 75 ° and pitch rotation 75 ° is intentionally performed a plurality of times, the offset is obtained a plurality of times, and the direction is calculated using the obtained offset value. The variability of the orientation calculation was investigated.
その結果、携帯機器Aでは、方位を±5°の精度で求めることが可能なことを確認した。一方、携帯機器Bでは、上記回転操作が小さく、4点の検出を選択する条件を満足しなかったため、方位算出ができなかった。 As a result, it was confirmed that the portable device A can determine the orientation with an accuracy of ± 5 °. On the other hand, in the portable device B, the rotation operation is small, and the condition for selecting the detection of four points is not satisfied, and thus the direction cannot be calculated.
そこで、携帯機器Bについて、水平回転とピッチ回転の角度を120°として、再度回転操作を複数回意図的に行い、オフセットを複数回求め、方位算出のばらつきを調査した。その結果、この条件では、オフセットを算出することができ、方位を算出することは可能であったが、そのばらつきは±10°と、回転操作の角度を大きくしているにもかかわらず、前記した携帯機器Aの実験結果に及ばない算出精度しか得られなかった。なお、携帯機器Bに搭載するソフトは、4点を選択する条件の変更により、より小さい回転角度でも選択条件を満足するように設定することも可能であるが、選択条件を緩和するほど精度が低下することが明らかであることを考えれば、本発明は、自然な回転操作で得られる磁気データのみで、オフセット値を算出する精度を大幅に向上する効果を有すると言うことができる。 Therefore, for the portable device B, the horizontal rotation and pitch rotation angles were set to 120 °, and the rotation operation was intentionally performed a plurality of times again to obtain the offset a plurality of times, and the variation in the direction calculation was investigated. As a result, under this condition, it was possible to calculate the offset and calculate the azimuth, but the variation was ± 10 °, despite the fact that the angle of the rotation operation was increased. Only the calculation accuracy which does not reach the experimental result of the portable device A was obtained. The software installed in the mobile device B can be set so as to satisfy the selection condition even at a smaller rotation angle by changing the condition for selecting the four points, but the accuracy is improved as the selection condition is relaxed. In view of the fact that it is clearly reduced, it can be said that the present invention has the effect of greatly improving the accuracy of calculating the offset value using only magnetic data obtained by natural rotation operation.
1 磁気データ処理装置
2 3軸磁気センサ
3 メモリ
4 回転運動算出手段
5 回転軸算出手段
6 中心点算出手段
7 オフセット補正手段
A 回転軸
B 円の中心
C 円
M 磁気ベクトル
O’ 方位球の中心点
s 方位球
DESCRIPTION OF
Claims (7)
上記携帯機器の姿勢が変化している姿勢変化期間に得られる、上記磁気ベクトルの複数の検出値を記憶するメモリと、
一つの上記姿勢変化期間における上記磁気ベクトルの複数の検出値からなる検出値群が、上記携帯機器の姿勢を一軸周りに回転させている間に得られたものか否かを判断する回転運動判断手段と、
該回転運動判断手段により、上記検出値群が、上記携帯機器の姿勢を一軸周りに回転させている間に得られたものであると判断された場合に、その回転の回転軸を算出する回転軸算出手段と、
異なる複数の上記姿勢変化期間に取得した上記検出値群から、それぞれ、上記回転運動判断手段及び上記回転軸算出手段によって求めた複数の上記回転軸の交点もしくは近似交点を、上記方位球の中心点として算出する中心点算出手段と、
上記3軸直交座標系の原点と上記方位球の中心点とのずれであるオフセットを補正するオフセット補正手段と、
を備えることを特徴とする磁気データ処理装置。 A three-axis magnetic sensor for detecting geomagnetism as a magnetic vector in a three-axis orthogonal coordinate system fixed to the portable device, and calculating a center point of an azimuth sphere drawn by the magnetic vector with a change in the posture of the portable device; A magnetic data processing device for correcting the influence of the internal magnetic field of the portable device on the three-axis magnetic sensor,
A memory for storing a plurality of detected values of the magnetic vector obtained during a posture change period in which the posture of the portable device is changing;
Rotation motion determination that determines whether or not a detection value group consisting of a plurality of detection values of the magnetic vector in one posture change period is obtained while rotating the posture of the portable device around one axis Means,
Rotation for calculating the rotation axis of the rotation when the rotation value determination means determines that the detected value group is obtained while rotating the attitude of the portable device around one axis. An axis calculation means;
From the detected value groups acquired during a plurality of different posture change periods, the intersections or approximate intersections of the plurality of rotation axes obtained by the rotational motion determination means and the rotation axis calculation means respectively are the center points of the azimuth sphere. A center point calculating means for calculating as
Offset correcting means for correcting an offset which is a deviation between the origin of the three-axis orthogonal coordinate system and the center point of the azimuth sphere;
A magnetic data processing apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012138446A JP6146962B2 (en) | 2012-06-20 | 2012-06-20 | Magnetic data processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012138446A JP6146962B2 (en) | 2012-06-20 | 2012-06-20 | Magnetic data processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014002089A JP2014002089A (en) | 2014-01-09 |
JP6146962B2 true JP6146962B2 (en) | 2017-06-14 |
Family
ID=50035382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012138446A Expired - Fee Related JP6146962B2 (en) | 2012-06-20 | 2012-06-20 | Magnetic data processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6146962B2 (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4638670B2 (en) * | 2003-12-26 | 2011-02-23 | 旭化成エレクトロニクス株式会社 | Azimuth angle measuring method and azimuth angle measuring apparatus |
CN101438131B (en) * | 2006-05-09 | 2012-07-18 | 阿尔卑斯电气株式会社 | Calibration method and electronic compass |
KR101210394B1 (en) * | 2009-03-10 | 2012-12-11 | 알프스 덴키 가부시키가이샤 | geomagnetism detection device |
JP5375394B2 (en) * | 2009-07-16 | 2013-12-25 | ヤマハ株式会社 | Magnetic data processing apparatus, magnetic data processing method, and magnetic data processing program |
CN102510997B (en) * | 2009-09-26 | 2015-01-21 | 阿尔卑斯电气株式会社 | Geomagnetism sensing device |
JP5374422B2 (en) * | 2010-03-10 | 2013-12-25 | アルプス電気株式会社 | Magnetic field detector |
JP5309373B2 (en) * | 2010-11-26 | 2013-10-09 | アイチ・マイクロ・インテリジェント株式会社 | Electronic compass |
-
2012
- 2012-06-20 JP JP2012138446A patent/JP6146962B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2014002089A (en) | 2014-01-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5017539B1 (en) | Applied equipment for measuring and using geomagnetism | |
US8554504B2 (en) | Positioning apparatus, positioning method and storage medium for positioning of pedestrian by autonomous navigation | |
JP5927776B2 (en) | Portable device | |
US9506754B2 (en) | Magnetometer accuracy and use | |
US20100312513A1 (en) | Restoring and Storing Magnetometer Calibration Data | |
JP5469670B2 (en) | Geomagnetic detector | |
JP2012242267A5 (en) | ||
KR101485142B1 (en) | Method and system for a self-calibrated multi-magnetometer platform | |
CN108458714B (en) | Euler angle solving method without gravity acceleration in attitude detection system | |
JP2004286732A5 (en) | ||
RU2499223C1 (en) | Method of determining heading by turning inertial device | |
JP4590511B2 (en) | Electronic compass | |
JP5186645B2 (en) | Electronic compass | |
JP5678357B2 (en) | Rotation information calculation method, rotation information calculation program, magnetic gyroscope and moving body | |
CN108088431B (en) | Self-correcting electronic compass and correcting method thereof | |
CN108507567A (en) | Attitude quaternion determines method, apparatus and user towards determining method, apparatus | |
JP6146962B2 (en) | Magnetic data processing device | |
EP3372955B1 (en) | Method and apparatus for indicating direction | |
JP2011185868A (en) | Azimuth detector | |
JP5309373B2 (en) | Electronic compass | |
JP2008020296A (en) | Azimuth sensor | |
JP5571027B2 (en) | Portable device, program and method for correcting gravity vector used for autonomous positioning | |
JP4955115B2 (en) | Azimuth measuring apparatus and azimuth measuring method | |
JP2015175746A (en) | Origin correction method for reference magnetic field measurement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20140227 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20140227 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150407 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160315 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160512 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20161025 |
|
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: 20170516 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170516 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6146962 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |