WO2014125809A1 - Attitude calculating apparatus, attitude calculating method, portable apparatus, and program - Google Patents

Attitude calculating apparatus, attitude calculating method, portable apparatus, and program Download PDF

Info

Publication number
WO2014125809A1
WO2014125809A1 PCT/JP2014/000704 JP2014000704W WO2014125809A1 WO 2014125809 A1 WO2014125809 A1 WO 2014125809A1 JP 2014000704 W JP2014000704 W JP 2014000704W WO 2014125809 A1 WO2014125809 A1 WO 2014125809A1
Authority
WO
WIPO (PCT)
Prior art keywords
posture
attitude
calculation
unit
calculation unit
Prior art date
Application number
PCT/JP2014/000704
Other languages
French (fr)
Japanese (ja)
Inventor
淑正 鈴木
剛志 舛田
崇弘 北浦
北村 徹
Original Assignee
旭化成エレクトロニクス株式会社
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 旭化成エレクトロニクス株式会社 filed Critical 旭化成エレクトロニクス株式会社
Priority to JP2015500143A priority Critical patent/JP6209581B2/en
Publication of WO2014125809A1 publication Critical patent/WO2014125809A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B21/00Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
    • G01B21/22Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring angles or tapers; for testing the alignment of axes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1684Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675
    • G06F1/1694Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675 the I/O peripheral being a single or a set of motion sensors for pointer control or gesture input obtained by sensing movements of the portable computer
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C19/00Gyroscopes; Turn-sensitive devices using vibrating masses; Turn-sensitive devices without moving masses; Measuring angular rate using gyroscopic effects

Definitions

  • the present invention relates to an attitude calculation device, an attitude calculation method, a portable device, and a program.
  • a motion angle calculation device that calculates a movement angle per unit time based on an output of an angular velocity sensor
  • a static angle calculation device that calculates a static angle based on outputs of an acceleration sensor and a geomagnetic sensor
  • a discriminating device that discriminates the truth of the calculation result by the static angle calculation device
  • an attitude angle calculation that calculates an attitude angle from the calculation results of the motion angle calculation device and the static angle calculation device according to the calculation result of the discrimination device.
  • the posture angle calculation device of Patent Document 1 calculates the posture angle from the motion angle when it is estimated that the calculation result by the stationary angle calculation device is incorrect.
  • the posture angle calculation device of Patent Document 1 preliminarily calculates the motion angle obtained from the motion angle calculation device and the static angle obtained from the static angle calculation device when the calculation result by the static angle calculation device is estimated to be correct.
  • the posture angle is calculated by adding together at a predetermined ratio. That is, the posture angle calculation device of Patent Document 1 calculates a posture obtained by adding the motion angle and the stationary angle at a ratio of k: 1-k (k is a predetermined constant) as the posture angle.
  • the posture angle detection device of Patent Document 1 reduces the uncomfortable feeling given to the user of the device, and allows the posture angle to quickly follow the stationary angle when the output of the acceleration sensor or the geomagnetic sensor is estimated to be correct. There is a problem that the two cannot be made compatible. The reason will be described below.
  • the posture angle detection device of Patent Document 1 reduces the uncomfortable feeling given to the user of the device and quickly follows the posture angle when the output of the acceleration sensor or the geomagnetic sensor is estimated to be correct. There is a problem that it is impossible to achieve both of the two.
  • a first attitude calculation unit that calculates the first attitude of the device based on the output of the angular velocity detection unit that is mounted on the device and detects the angular velocity of the device, and the first attitude
  • the third posture is calculated based on the second posture calculation unit that calculates the second posture of the device by means different from the calculation unit, the first posture, the second posture, and the rotation information of the device.
  • a posture calculation device including the third posture calculation unit, and a posture calculation method according to the device.
  • a portable device provided with the posture detection device in the first aspect.
  • a program for causing a computer to function as the posture calculation device in the first aspect is provided.
  • FIG. 1 is a diagram showing an outline of a portable device 200 according to an embodiment of the present invention.
  • the portable device 200 refers to a portable device such as a mobile phone, a tablet-type terminal, a portable personal computer, a camera, a wristwatch, a head-mounted display, and a game machine.
  • the mobile device 200 includes an attitude calculation device 100.
  • the attitude calculation device 100 detects the attitude of the mobile device 200 in a reference coordinate system having orthogonal axes X, Y, and Z.
  • the posture of the device can be defined using Euler angles or quaternions.
  • the posture calculation device 100 calculates a first posture in which the rotation of the mobile device 200 from the past to the current time is accumulated and a second posture based on information on the mobile device 200 at the current time.
  • FIG. 2 is a diagram illustrating a configuration example of the posture calculation apparatus 100.
  • the posture calculation device 100 of this example includes a geomagnetism detection unit 10, an acceleration detection unit 12, an angular velocity detection unit 14, an offset removal unit 16, a stillness determination unit 18, and a posture calculation unit 20.
  • the angular velocity detection unit 14 detects the angular velocity of the mobile device 200.
  • the angular velocity detection unit 14 is provided for each of three orthogonal axes (roll, pitch, yaw), and detects the rotation of the mobile device 200 by separating it into rotation components centered on each axis.
  • the stationary determination unit 18 determines whether or not the mobile device 200 is stationary.
  • the stationary determination unit 18 determines the stationary state based on the data detected by each detection unit. For example, the stillness determination unit 18 determines that the state is still when the angular velocity detected by the angular velocity detection unit 14 is equal to or less than a predetermined threshold.
  • the offset removal unit 16 detects an offset component in the output of the angular velocity detection unit 14.
  • the offset component refers to an angular velocity component that appears in the output of the angular velocity detector 14 even though the mobile device 200 is actually stationary, for example.
  • the offset removal unit 16 may detect the offset component by averaging the outputs of the angular velocity detection unit 14 while the stationary determination unit 18 determines that the stationary state.
  • the offset removing unit 16 removes the offset component from the angular velocity data output from the angular velocity detecting unit 14.
  • the offset removal unit 16 preferably detects the offset component periodically.
  • the posture calculation unit 20 calculates the first posture of the mobile device 200 based on the angular velocity data from which the offset component has been removed.
  • the posture calculation unit 20 calculates the first posture of the mobile device 200 by accumulating posture changes according to the angular velocity data detected sequentially.
  • the posture calculation unit 20 calculates rotation information of the mobile device 200 based on the angular velocity data from which the offset component has been removed.
  • the rotation information is not particularly limited as long as it is information indicating the rotation state of the mobile device 200. Examples of the rotation information include a rotation amount of the mobile device 200 per unit time and an angular velocity of the mobile device 200 at a predetermined time.
  • the geomagnetism detection unit 10 is provided for each of three orthogonal axes (roll, pitch, yaw) and detects a magnetic component parallel to each axis. Thereby, the direction of geomagnetism with respect to the mobile device 200 is detected.
  • the acceleration detection unit 12 is provided for each of three orthogonal axes (roll, pitch, yaw) and detects an acceleration component parallel to each axis. Thereby, the direction of the gravitational acceleration with respect to the portable device 200 is detected.
  • the posture calculation unit 20 detects the second posture of the mobile device 200 based on the magnetic data and acceleration data output from the geomagnetism detection unit 10 and the acceleration detection unit 12. Since the first posture is calculated by accumulating data from the past to the present time, an error is accumulated, whereas the second posture is detected from the current data without using the past data. Errors are not accumulated.
  • the magnetic data and acceleration data include magnetic and acceleration components due to other factors of geomagnetism and gravitational acceleration.
  • the posture calculation unit 20 calculates the second posture from the magnetic data and the acceleration data only when a predetermined condition is satisfied.
  • the frequency with which the posture calculation unit 20 can calculate the second posture is less than the frequency with which the first posture is calculated.
  • the angular velocity detector 14 generally has a drift in offset due to the influence of temperature or the like. Therefore, if angular velocity data is accumulated for a long time, errors are accumulated, and the first posture is not correct.
  • the attitude calculating unit 20 calculates a new third attitude based on the first attitude, the second attitude, and the rotation information of the device obtained from the output of the angular velocity detection unit. To do.
  • the posture calculation unit 20 may use the third posture as the first posture at the present time and accumulate subsequent rotations of the mobile device 200. By regularly calculating the third posture and outputting it as the posture of the device, it is possible to prevent errors from being accumulated in the first posture.
  • FIG. 3 is a diagram illustrating a configuration example of the posture calculation unit 20 according to the embodiment of the present invention.
  • the posture calculation unit 20 of this example includes a second posture calculation unit 22, a first posture calculation unit 24, a difference calculation unit 26, a coefficient calculation unit 28, a third posture calculation unit 30, and a determination unit 32.
  • the second attitude calculation unit 22 calculates the second attitude of the mobile device 200 based on the magnetic data and acceleration data detected by the geomagnetism detection unit 10 and the acceleration detection unit 12.
  • the parameters used for calculating the second posture are not limited to the geomagnetic direction and the gravitational direction.
  • the second attitude calculation unit 22 can calculate the second attitude based on various parameters whose directions are known (for example, the direction of the sun, the direction of an external known marker, GPS, and network positioning). .
  • the second posture calculation unit 22 calculates how much the mobile device 200 is tilted with respect to the direction of gravity based on the acceleration data. And based on the said inclination and geomagnetic data, the azimuth
  • the second posture of the mobile device 200 at the current time t is determined based on the roll angle R (t), pitch angle P (t), and yaw angle Y (t ).
  • the second posture calculation unit 22 compares the magnitude of the vector obtained by combining the accelerations in the three-axis directions detected by the acceleration detection unit 12 with the magnitude corresponding to 1G that is the gravitational acceleration, and the difference is predetermined. The second posture is calculated when it is equal to or less than the threshold value.
  • the first attitude calculation unit 24 calculates the first attitude of the mobile device 200 based on the angular velocity data detected by the angular velocity detection unit 14.
  • the first posture calculation unit 24 of this example calculates the first posture based on the angular velocity data from which the offset component has been removed by the offset removal unit 16.
  • the first posture of the mobile device 200 at time t is represented by a roll angle r (t), a pitch angle p (t), and a yaw angle y (t) at time t.
  • the roll angle r (t), pitch angle p (t), and yaw angle y (t) are given by the following equations.
  • t ⁇ 1 indicates a time one unit time before the time t.
  • ⁇ r (t), ⁇ p (t), and ⁇ y (t) indicate the amount of rotation of the mobile device 200 during the period from time t ⁇ 1 to time t.
  • the rotation amount may be referred to as a current rotation amount.
  • the amount of rotation is calculated, for example, by multiplying the angular velocity at time t by one unit time.
  • One unit time may be the same as the angular velocity detection interval in the angular velocity detector 14.
  • the difference calculation unit 26 calculates the difference between the first posture and the second posture.
  • the difference calculation unit 26 of this example uses the differences r (t) ⁇ R (t), p (t) ⁇ P (t), y (t) ⁇ Y (t) for the roll angle, pitch angle, and yaw angle. Is calculated.
  • the determination unit 32 dynamically determines a ratio of combining the first posture and the second posture based on the rotation information of the mobile device 200. Dynamically determining the ratio does not mean that the ratio is always constant, but means that the ratio is changed according to the situation. For example, every time the second attitude calculation unit 22 calculates the second attitude. The operation of determining the ratio based on the rotation information of the mobile device 200 at the time point.
  • the determination unit 32 of this example dynamically calculates a proportional constant to be multiplied by the above-described difference based on the angular velocity at the time t of the mobile device 200. The determination unit 32 generates a proportional constant k that is larger as the angular velocity is larger and smaller as the angular velocity is smaller.
  • the determination unit 32 may generate a common proportionality constant k for the roll angle, the pitch angle, and the yaw angle based on the square sum of the angular velocity of the roll angle, the pitch angle, and the yaw angle.
  • the determination unit 32 may generate proportional constants kr, kp, and ky for the roll angle, the pitch angle, and the yaw angle based on the absolute values of the angular velocity of the roll angle, the pitch angle, and the yaw angle. .
  • the proportionality constant is greater than 0 and less than 1.
  • the coefficient calculation unit 28 calculates a difference coefficient obtained by multiplying the difference calculated by the difference calculation unit 26 by the proportionality constant calculated by the determination unit 32.
  • the coefficient calculation unit 28 of this example calculates the following difference coefficient.
  • the third posture calculation unit 30 calculates a new third posture based on the first posture, the second posture, and the rotation information of the mobile device 200. That is, the third posture calculation unit 30 further uses the rotation information of the mobile device 200 in addition to the rotation information used to calculate the first posture and the second posture. Further, the rotation information used may be a content partially or entirely overlapped with the rotation information used to calculate the first posture or the second posture.
  • the third posture calculation unit 30 of this example is based on at least one of the first posture and the second posture, the difference between the first posture and the second posture, and the ratio determined by the determination unit 32.
  • the third posture is calculated.
  • the third posture calculation unit 30 calculates the first posture (r (t), p (t), y (t)) calculated by the first posture calculation unit 24, and coefficient calculation.
  • a new third posture is calculated using the difference coefficient calculated by the unit 28.
  • the difference coefficient includes at least the information on the second posture and the proportionality constant according to the rotation information of the mobile device 200.
  • the third posture calculation unit 30 in this example calculates the third posture as in the following equation.
  • the coefficient calculation unit 28 may determine the difference coefficient so that the difference coefficient is equal to or smaller than the current rotation amount of the mobile device 200. For example, in the range where the calculated difference coefficient is larger than the rotation amount, the coefficient calculation unit 28 matches the magnitude of the difference coefficient with the rotation amount.
  • the attitude calculation unit 20 may divide the difference detected at time t into a plurality of timings such as times t, t + 1,... And use them for calculating the third attitude at each timing. .
  • the determination unit 32 calculates a proportionality constant at each timing according to the angular velocity of the mobile device 200 at each timing.
  • the posture calculation unit 20 may calculate, for example, the third posture at time t + 1 using the difference at time t as follows.
  • the posture calculation unit 20 newly uses the difference detected at time t until the sum of proportional constants for each axis at each timing (for example, kr (t) + kr (t + 1) +...) Is substantially equal to 1.
  • the third posture may be calculated. Accordingly, the third posture can be calculated so that the detected difference is almost eliminated.
  • the second posture is newly calculated. It is preferable to calculate the third posture by using the difference between the new second posture and the first posture. Thereby, even when the interval for calculating the second posture is long, the third posture can be calculated so that the difference between the second posture and the first posture is eliminated.
  • the third attitude calculation method that can be used in the present invention can use a method such as linear spherical interpolation using quaternions, linear interpolation, or the like in addition to the method using the Euler angle difference described above.
  • the posture calculation unit 20 of this example since the third posture is calculated based on the first posture, the second posture, and the rotation information of the mobile device 200, it is possible to reduce discomfort given to the user. it can.
  • the posture information close to the first posture is calculated to reduce a sense of incongruity when the posture changes, and when the mobile device 200 moves greatly, the second By calculating posture information close to the posture, posture tracking can be performed efficiently. That is, the posture calculation unit 20 calculates the third posture such that the difference with respect to the first posture is smaller as the amount of rotation of the mobile device 200 per unit time is smaller.
  • the third posture is calculated such that the difference with respect to the second posture becomes smaller as the amount of rotation of the portable device per unit time is larger.
  • the difference in posture may be the sum of the absolute value of the difference in the roll angle, the absolute value of the difference in the pitch angle, and the absolute value of the difference in the yaw angle.
  • FIG. 4 is a diagram for explaining the outline of the operation of the posture calculation unit 20.
  • FIG. 4 shows an example of the first posture and the second posture at time t.
  • the posture calculation unit 20 calculates a difference coefficient obtained by multiplying the difference between the first posture and the second posture by a proportional constant according to the angular velocity at time t.
  • FIG. 5 is a flowchart showing an operation example of the posture calculation apparatus 100.
  • the posture calculation apparatus 100 detects the angular velocity of the portable device 200 at a predetermined cycle by the angular velocity detector 14 (S300).
  • the first posture calculation unit 24 accumulates the posture changes according to the angular velocity data sequentially detected, and calculates the first posture of the mobile device 200 (S302).
  • the posture calculation apparatus 100 calculates the first posture at a predetermined cycle by repeating the processes of S300 and S302.
  • the second posture calculation unit 22 calculates the second posture of the mobile device 200 in parallel with the first posture calculation unit 24 (S304).
  • the second posture calculation unit 22 calculates the second posture when the detection results of the geomagnetism detection unit 10 and the acceleration detection unit 12 satisfy a predetermined condition. For example, the second posture calculation unit 22 compares the magnitude of the vector obtained by combining the accelerations in the three-axis directions detected by the acceleration detection unit 12 with the magnitude corresponding to 1G that is the gravitational acceleration, and the difference is a predetermined threshold value.
  • the second posture is calculated when:
  • the first posture calculation unit 24 calculates the first posture is shorter than the cycle in which the second posture calculation unit 22 calculates the second posture.
  • the posture calculation unit 20 calculates a third posture when the second posture calculation unit 22 calculates the second posture.
  • the difference calculation unit 26 calculates the difference between the first posture and the second posture at the current time (S306).
  • the determination unit 32 and the coefficient calculation unit 28 calculate a difference coefficient according to the current angular velocity (S308).
  • the third posture calculation unit 30 calculates the current third posture based on the difference coefficient (S310).
  • the first posture calculation unit 24 calculates the subsequent first posture using the third posture calculated by the third posture calculation unit 30.
  • the first posture calculation unit 24 adds the rotation amounts ⁇ r (t + 1), ⁇ p (t + 1), ⁇ y at the next time t + 1 to the third posture at the time t calculated by the third posture calculation unit 30.
  • (T + 1) is added to calculate the first posture at time t + 1.
  • FIG. 6 is a diagram illustrating a configuration example of the posture calculation unit 20 according to the embodiment of the present invention.
  • the posture calculation unit 20 of this example includes a second posture calculation unit 22, a rotation axis calculation unit 34, a rotation amount calculation unit 36, a first posture calculation unit 38, and a third posture calculation unit 40.
  • the second posture calculation unit 22 has the same function as the second posture calculation unit 22 described with reference to FIGS. 3 to 5.
  • the first posture calculation unit 38 calculates the first posture described with reference to FIGS. 1 to 5.
  • the third posture calculation unit 40 calculates the third posture described with reference to FIGS. 1 to 5.
  • the first posture calculation unit 38 may have the same function as the first posture calculation unit 24.
  • the rotation amount calculation unit 36 calculates the current rotation amount of the mobile device 200 based on the angular velocity data.
  • the current rotation amount may be calculated by multiplying the current angular velocity by one unit time.
  • the rotation amount calculation unit 36 of this example calculates the rotation amount for each axis.
  • the rotation axis calculation unit 34 calculates the rotation axis from the first posture one unit time before the current time to the second posture at the current time.
  • the rotation axis calculation unit 34 converts the first posture one unit time ago through the origin of the orthogonal axes X, Y, and Z into the second posture at the present time when rotating around the rotation axis. The possible rotation axis is calculated.
  • rotation between two postures can be expressed using a quaternion, a rotation matrix, or Euler angles.
  • rotation between two postures when using a quaternion is described as an example, but rotation between the two postures in the present invention uses a rotation matrix, Euler angles, etc. as described above. Methods can also be used.
  • the rotation axis calculation unit 34 of this example calculates a quaternion indicating the rotation based on the first posture one unit time ago and the second posture at the present time.
  • P R (t) qP r (t ⁇ 1) q ⁇ 1
  • P R (t) is a vector indicating the current second attitude
  • P r (t ⁇ 1) is a vector indicating the first attitude one unit time ago
  • q is a quaternion indicating rotation.
  • P R (t) and P r (t ⁇ 1) may be obtained by converting the expression of the attitude angle by the Euler angle described in relation to FIGS. 3 to 5 into the expression of the quaternion.
  • P R (t) may be a position vector indicating the position of a certain point A of the mobile device 200 in the second posture.
  • P r (t ⁇ 1) may be a position vector indicating the position of the same point A in the mobile device 200 in the first posture. If the rotation between the second posture and the first posture is calculated for one specific point, the rotation of the entire posture can be specified.
  • the third posture calculation unit 40 uses the rotation axes ( ⁇ , ⁇ , ⁇ ) calculated by the rotation axis calculation unit 34 with respect to the first posture one unit time before calculated by the first posture calculation unit 38.
  • the current rotation amount ⁇ ′ detected by the rotation amount calculation unit 36 is applied.
  • the rotation amount ⁇ ′ indicates the magnitude of rotation and does not have information on the rotation axis. That is, the first posture one unit time before is rotated around the rotation axis by the rotation amount ⁇ ′.
  • the third posture calculation unit 40 calculates the current third posture. Specifically, the current first posture P r (t) is calculated based on the following equation.
  • the first posture calculation unit 38 may use the third posture calculated by the third posture calculation unit 40 as the first posture at the current time and accumulate subsequent rotations of the mobile device 200.
  • an appropriate posture can be calculated according to the amount of rotation of the mobile device 200. For this reason, the error accumulated in the first posture can be corrected without causing the user to feel uncomfortable. Specifically, since accumulation of errors in the first posture can be prevented, for example, the calculated posture gradually changes even though the mobile device 200 is actually stationary, This can be prevented without giving the user a sense of incongruity. In addition, since the rotation axis from the first attitude to the second attitude is calculated, and the rotation amount of the mobile device 200 is applied to the calculated rotation axis, the third attitude is calculated for the first attitude. The third posture can be prevented from drifting due to the drift of the first posture. This effect is significant when stationary.
  • the rotation amount in the present invention for example, a physical quantity relating to rotation obtained by angular velocity, acceleration, geomagnetism, image data, or a combination thereof can be used.
  • acceleration when acceleration is used, the rotation amount for each axis can be obtained from the rotation amount of the pitch angle and roll angle per unit time.
  • geomagnetism when geomagnetism is used, the rotation amount for each axis can be obtained from the rotation amount of the yaw angle per unit time.
  • image data the rotation amount for each axis can be obtained from the amount of change per unit time.
  • the posture calculation unit 20 uses the rotation axis to perform the third posture when the angular velocity is equal to or less than a predetermined threshold. May be calculated. For example, the posture calculation unit 20 calculates the third posture using the rotation axis when the angular velocity is small enough to determine that the mobile device 200 is stationary by the stillness determination unit 18. In addition, when the current angular velocity is larger than the above-described threshold, the posture calculation unit 20 may calculate the third posture as described with reference to FIGS.
  • FIG. 7 is a diagram for explaining the outline of the operation of the posture calculation unit 20 shown in FIG.
  • FIG. 7 shows an example of the first posture one unit time ago and the current second posture. Since errors are accumulated in the first posture, for example, even if the mobile device 200 is stationary for a long time, a difference between the first posture one unit time ago and the current second posture is obtained. May occur.
  • the rotation axis calculation unit 34 calculates a rotation axis that changes to the current second attitude when the first attitude one unit time ago is rotated around a predetermined rotation axis. That is, a rotation axis is calculated such that any attitude obtained when the first attitude is rotated around the rotation axis coincides with the second attitude.
  • the rotation axis calculation unit 34 may calculate the rotation axis from the current first posture to the current second posture.
  • the third posture calculation unit 40 uses the rotation axis calculated by the rotation axis calculation unit 34 to rotate the first posture one unit time ago with the current rotation amount of the mobile device 200, and Calculate the posture. Thereby, the error accumulated in the first posture can be corrected according to the rotation amount of the mobile device 200.
  • FIG. 8 is a flowchart showing an operation example of the posture calculation apparatus 100 using the posture calculation unit 20 of FIG.
  • the processing from S300 to S304 is the same as the flowchart shown in FIG.
  • the rotation axis calculation unit 34 calculates the rotation axis from the first posture one unit time ago to the current second posture (S312). ).
  • the rotation amount calculation unit 36 calculates the current rotation amount of the mobile device 200 from the current angular velocity data (S314).
  • the processes of S312 and S314 may be performed in parallel.
  • the third attitude calculation unit 40 calculates the current third attitude by applying the rotation amount calculated in S314 to the rotation axis calculated in S312 (S316).
  • the first attitude calculation unit 38 calculates the subsequent first attitude using the third attitude calculated by the third attitude calculation unit 40 in S316.
  • FIG. 9 shows an example of a hardware configuration of a computer 1900 according to the present embodiment.
  • a computer 1900 according to this embodiment is connected to a CPU peripheral unit having a CPU 2000, a RAM 2020, a graphic controller 2075, and a display device 2080 that are connected to each other by a host controller 2082, and to the host controller 2082 by an input / output controller 2084.
  • Input / output unit having communication interface 2030, hard disk drive 2040, and CD-ROM drive 2060, and legacy input / output unit having ROM 2010, flexible disk drive 2050, and input / output chip 2070 connected to input / output controller 2084 With.
  • the host controller 2082 connects the RAM 2020 to the CPU 2000 and the graphic controller 2075 that access the RAM 2020 at a high transfer rate.
  • the CPU 2000 operates based on programs stored in the ROM 2010 and the RAM 2020 and controls each unit.
  • the graphic controller 2075 acquires image data generated by the CPU 2000 or the like on a frame buffer provided in the RAM 2020 and displays it on the display device 2080.
  • the graphic controller 2075 may include a frame buffer for storing image data generated by the CPU 2000 or the like.
  • the input / output controller 2084 connects the host controller 2082 to the communication interface 2030, the hard disk drive 2040, and the CD-ROM drive 2060, which are relatively high-speed input / output devices.
  • the communication interface 2030 communicates with other devices via a network.
  • the hard disk drive 2040 stores programs and data used by the CPU 2000 in the computer 1900.
  • the CD-ROM drive 2060 reads a program or data from the CD-ROM 2095 and provides it to the hard disk drive 2040 via the RAM 2020.
  • the ROM 2010, the flexible disk drive 2050, and the relatively low-speed input / output device of the input / output chip 2070 are connected to the input / output controller 2084.
  • the ROM 2010 stores a boot program that the computer 1900 executes at startup and / or a program that depends on the hardware of the computer 1900.
  • the flexible disk drive 2050 reads a program or data from the flexible disk 2090 and provides it to the hard disk drive 2040 via the RAM 2020.
  • the input / output chip 2070 connects the flexible disk drive 2050 to the input / output controller 2084 and inputs / outputs various input / output devices via, for example, a parallel port, a serial port, a keyboard port, a mouse port, and the like. Connect to controller 2084.
  • the program provided to the hard disk drive 2040 via the RAM 2020 is stored in a recording medium such as the flexible disk 2090, the CD-ROM 2095, or an IC card and provided by the user.
  • the program is read from the recording medium, installed in the hard disk drive 2040 in the computer 1900 via the RAM 2020, and executed by the CPU 2000.
  • a program installed in the computer 1900 and causing the computer 1900 to function as an attitude calculation device includes a first attitude calculation module, a second attitude calculation module, a third attitude calculation module, a determination module, a difference calculation module, and a rotation axis calculation module. And a rotation amount calculation module. These programs or modules work on the CPU 2000 or the like to cause the computer 1900 to function as an attitude calculation device.
  • the information processing described in these programs is read into the computer 1900, whereby the first posture calculation unit 24, the second posture, which are specific means in which the software and the various hardware resources described above cooperate.
  • the posture calculation unit 22, the third posture calculation unit 30, the first posture calculation unit 38, the third posture calculation unit 40, the determination unit 32, the difference calculation unit 26, the rotation axis calculation unit 34, and the rotation amount calculation unit 36 Function.
  • the calculation or processing of information according to the purpose of use of the computer 1900 in the present embodiment is realized, so that a unique stillness determination device according to the purpose of use is constructed.
  • the CPU 2000 executes a communication program loaded on the RAM 2020 and executes a communication interface based on the processing content described in the communication program.
  • a communication process is instructed to 2030.
  • the communication interface 2030 reads transmission data stored in a transmission buffer area or the like provided on a storage device such as the RAM 2020, the hard disk drive 2040, the flexible disk 2090, or the CD-ROM 2095, and sends it to the network.
  • the reception data transmitted or received from the network is written into a reception buffer area or the like provided on the storage device.
  • the communication interface 2030 may transfer transmission / reception data to / from the storage device by a DMA (direct memory access) method. Instead, the CPU 2000 transfers the storage device or the communication interface 2030 as a transfer source.
  • the transmission / reception data may be transferred by reading the data from the data and writing the data to the communication interface 2030 or the storage device of the transfer destination.
  • the CPU 2000 is all or necessary from among files or databases stored in an external storage device such as a hard disk drive 2040, a CD-ROM drive 2060 (CD-ROM 2095), and a flexible disk drive 2050 (flexible disk 2090).
  • This portion is read into the RAM 2020 by DMA transfer or the like, and various processes are performed on the data on the RAM 2020. Then, CPU 2000 writes the processed data back to the external storage device by DMA transfer or the like.
  • the RAM 2020 and the external storage device are collectively referred to as a memory, a storage unit, or a storage device.
  • the CPU 2000 can also store a part of the RAM 2020 in the cache memory and perform reading and writing on the cache memory. Even in such a form, the cache memory bears a part of the function of the RAM 2020. Therefore, in the present embodiment, the cache memory is also included in the RAM 2020, the memory, and / or the storage device unless otherwise indicated. To do.
  • the CPU 2000 performs various operations, such as various operations, information processing, condition determination, information search / replacement, etc., described in the present embodiment, specified for the data read from the RAM 2020 by the instruction sequence of the program. Is written back to the RAM 2020.
  • the CPU 2000 determines whether or not the various variables shown in the present embodiment satisfy the conditions such as large, small, above, below, equal, etc., compared to other variables or constants.
  • the program branches to a different instruction sequence or calls a subroutine.
  • the CPU 2000 can search for information stored in a file or database in the storage device. For example, in the case where a plurality of entries in which the attribute value of the second attribute is associated with the attribute value of the first attribute are stored in the storage device, the CPU 2000 displays the plurality of entries stored in the storage device. The entry that matches the condition in which the attribute value of the first attribute is specified is retrieved, and the attribute value of the second attribute that is stored in the entry is read, thereby associating with the first attribute that satisfies the predetermined condition The attribute value of the specified second attribute can be obtained.
  • the program or module shown above may be stored in an external recording medium.
  • an optical recording medium such as DVD or CD
  • a magneto-optical recording medium such as MO
  • a tape medium such as an IC card, and the like
  • a storage device such as a hard disk or RAM provided in a server system connected to a dedicated communication network or the Internet may be used as a recording medium, and the program may be provided to the computer 1900 via the network.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • User Interface Of Digital Computer (AREA)
  • Navigation (AREA)

Abstract

Provided is an attitude calculating apparatus that is provided with: a first attitude calculating section, which is mounted in an apparatus, and which calculates first attitude of the apparatus on the basis of an output from an angular velocity detecting section that detects an angular velocity of the apparatus; a second attitude calculating section that calculates second attitude of the apparatus using a means different from the first attitude calculating section; and a third attitude calculating section that calculates third attitude on the basis of the first attitude, the second attitude, and rotation information of the apparatus.

Description

姿勢算出装置、姿勢算出方法、携帯機器およびプログラムAttitude calculation device, attitude calculation method, portable device, and program
 本発明は、姿勢算出装置、姿勢算出方法、携帯機器およびプログラムに関する。 The present invention relates to an attitude calculation device, an attitude calculation method, a portable device, and a program.
 従来、機器の姿勢を検出する装置として、角速度センサ、加速度センサおよび地磁気センサを用いた装置が知られている。当該装置の一例として、角速度センサの出力に基づいて単位時間あたりの移動角度を演算する運動角演算装置と、加速度センサ及び地磁気センサの出力に基づいて、静止角を演算する静止角演算装置と、該静止角演算装置による演算結果の真偽を判別する判別装置と、該判別装置の演算結果に応じて、前記運動角演算装置及び静止角演算装置の演算結果から姿勢角を演算する姿勢角演算装置とから構成される姿勢角検出装置が知られている(例えば特許文献1参照)。
 [特許文献1] 特開平11-211479号公報
Conventionally, devices using an angular velocity sensor, an acceleration sensor, and a geomagnetic sensor are known as devices for detecting the attitude of an apparatus. As an example of the device, a motion angle calculation device that calculates a movement angle per unit time based on an output of an angular velocity sensor, a static angle calculation device that calculates a static angle based on outputs of an acceleration sensor and a geomagnetic sensor, A discriminating device that discriminates the truth of the calculation result by the static angle calculation device, and an attitude angle calculation that calculates an attitude angle from the calculation results of the motion angle calculation device and the static angle calculation device according to the calculation result of the discrimination device 2. Description of the Related Art An attitude angle detection device configured with a device is known (see, for example, Patent Document 1).
[Patent Document 1] Japanese Patent Application Laid-Open No. 11-211479
 特許文献1の姿勢角演算装置は、静止角演算装置による演算結果が正しくないと推定される場合に、運動角から姿勢角を算出する。また、特許文献1の姿勢角演算装置は、静止角演算装置による演算結果が正しいと推定される場合に、運動角演算装置から得られる運動角と、静止角演算装置から得られる静止角を予め定められた割合で足し合わせて姿勢角を算出する。即ち、特許文献1の姿勢角演算装置は、運動角と静止角をk:1-k(kは予め定められた定数)の割合で足し合わせた姿勢を姿勢角として算出している。 The posture angle calculation device of Patent Document 1 calculates the posture angle from the motion angle when it is estimated that the calculation result by the stationary angle calculation device is incorrect. In addition, the posture angle calculation device of Patent Document 1 preliminarily calculates the motion angle obtained from the motion angle calculation device and the static angle obtained from the static angle calculation device when the calculation result by the static angle calculation device is estimated to be correct. The posture angle is calculated by adding together at a predetermined ratio. That is, the posture angle calculation device of Patent Document 1 calculates a posture obtained by adding the motion angle and the stationary angle at a ratio of k: 1-k (k is a predetermined constant) as the posture angle.
 しかし、特許文献1の姿勢角検出装置は、機器の使用者に与える違和感を少なくすることと、加速度センサや地磁気センサの出力が正しいと推定される場合に姿勢角を素早く静止角に追従させることの二つを両立させることができないという問題がある。以下、その理由について説明する。 However, the posture angle detection device of Patent Document 1 reduces the uncomfortable feeling given to the user of the device, and allows the posture angle to quickly follow the stationary angle when the output of the acceleration sensor or the geomagnetic sensor is estimated to be correct. There is a problem that the two cannot be made compatible. The reason will be described below.
 多くの場面で、姿勢角演算装置を搭載する機器は大きな加速度をもって運動していたり、姿勢角演算装置の周囲には大きな外乱磁場が発生している。そのため、加速度センサや地磁気センサの出力が正しいと推定される場面は少ない。従って、特許文献1の姿勢角検出装置では、大半は運動角に基づいて姿勢角が算出され、静止角と運動角に基づいて姿勢角が算出される場面は少ない。特許文献1において、kの値が小さい場合、運動角の影響が小さく、静止角の影響が大きくなるので、加速度センサや地磁気センサの出力が正しいと推定される場合に姿勢が大きく変化することとなる。機器が静止に近い状態で姿勢が大きく変化すると、機器の使用者に違和感を与えてしまう。一方、kの値が大きい場合、運動角の影響が大きく、静止角の影響が小さくなるので、機器の使用者に与える違和感は少なくなるが、静止角に素早く追従することができない。このように、特許文献1の姿勢角検出装置は、機器の使用者に与える違和感を少なくすることと、加速度センサや地磁気センサの出力が正しいと推定される場合に姿勢角を素早く静止角に追従させることの二つを両立させることできないという問題がある。 In many scenes, devices equipped with posture angle calculation devices are moving with large accelerations, and large disturbance magnetic fields are generated around the posture angle calculation devices. For this reason, there are few scenes where the output of the acceleration sensor or the geomagnetic sensor is estimated to be correct. Therefore, in the posture angle detection device of Patent Document 1, in most cases, the posture angle is calculated based on the motion angle, and the posture angle is calculated based on the stationary angle and the motion angle. In Patent Document 1, when the value of k is small, the influence of the motion angle is small and the influence of the stationary angle is large. Therefore, when the output of the acceleration sensor or the geomagnetic sensor is estimated to be correct, the posture changes greatly. Become. If the posture changes greatly while the device is almost stationary, the user of the device will feel uncomfortable. On the other hand, when the value of k is large, the influence of the motion angle is large and the influence of the static angle is small, so that the feeling of discomfort given to the user of the device is reduced, but the static angle cannot be quickly followed. As described above, the posture angle detection device of Patent Document 1 reduces the uncomfortable feeling given to the user of the device and quickly follows the posture angle when the output of the acceleration sensor or the geomagnetic sensor is estimated to be correct. There is a problem that it is impossible to achieve both of the two.
 本発明の第1の態様においては、機器に搭載され、機器の角速度を検出する角速度検出部の出力に基づいて機器の第1の姿勢を算出する第1の姿勢算出部と、第1の姿勢算出部と異なる手段で機器の第2の姿勢を算出する第2の姿勢算出部と、第1の姿勢と、第2の姿勢と、機器の回転情報と、に基づき、第3の姿勢を算出する第3の姿勢算出部と、を備える姿勢算出装置、ならびに、当該装置に係る姿勢算出方法を提供する。 In the first aspect of the present invention, a first attitude calculation unit that calculates the first attitude of the device based on the output of the angular velocity detection unit that is mounted on the device and detects the angular velocity of the device, and the first attitude The third posture is calculated based on the second posture calculation unit that calculates the second posture of the device by means different from the calculation unit, the first posture, the second posture, and the rotation information of the device. A posture calculation device including the third posture calculation unit, and a posture calculation method according to the device.
 本発明の第2の態様においては、第1の態様における姿勢検出装置を備える携帯機器を提供する。本発明の第3の態様においては、コンピュータを、第1の態様における姿勢算出装置として機能させるプログラムを提供する。 In the second aspect of the present invention, there is provided a portable device provided with the posture detection device in the first aspect. In a third aspect of the present invention, there is provided a program for causing a computer to function as the posture calculation device in the first aspect.
 なお、上記の発明の概要は、本発明の必要な特徴の全てを列挙したものではない。また、これらの特徴群のサブコンビネーションもまた、発明となりうる。 Note that the above summary of the invention does not enumerate all the necessary features of the present invention. In addition, a sub-combination of these feature groups can also be an invention.
本発明の実施形態に係る携帯機器の概要を示す図である。It is a figure which shows the outline | summary of the portable apparatus which concerns on embodiment of this invention. 姿勢算出装置の構成例を示す図である。It is a figure which shows the structural example of an attitude | position calculation apparatus. 姿勢算出部の構成例を示す図である。It is a figure which shows the structural example of an attitude | position calculation part. 姿勢算出部の動作の概要を説明する図である。It is a figure explaining the outline | summary of operation | movement of an attitude | position calculation part. 姿勢算出装置の動作例を示すフローチャートである。It is a flowchart which shows the operation example of an attitude | position calculation apparatus. 姿勢算出部の他の構成例を示す図である。It is a figure which shows the other structural example of an attitude | position calculation part. 図6に示した姿勢算出部の動作の概要を説明する図である。It is a figure explaining the outline | summary of operation | movement of the attitude | position calculation part shown in FIG. 図6の姿勢算出部を用いた姿勢算出装置の動作例を示すフローチャートである。It is a flowchart which shows the operation example of the attitude | position calculation apparatus using the attitude | position calculation part of FIG. 本実施形態に係るコンピュータ1900のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the computer 1900 which concerns on this embodiment.
 以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。 Hereinafter, the present invention will be described through embodiments of the invention. However, the following embodiments do not limit the invention according to the claims. In addition, not all the combinations of features described in the embodiments are essential for the solving means of the invention.
 図1は、本発明の実施形態に係る携帯機器200の概要を示す図である。携帯機器200は、携帯電話、タブレット型端末、携帯型パソコン、カメラ、腕時計、ヘッドマウントディスプレイ、ゲーム機等のように、携帯可能な機器を指す。携帯機器200は、姿勢算出装置100を備える。姿勢算出装置100は、直交軸X、Y、Zを有する基準座標系における携帯機器200の姿勢を検出する。機器の姿勢は、オイラー角または四元数等を用いて定義することができる。 FIG. 1 is a diagram showing an outline of a portable device 200 according to an embodiment of the present invention. The portable device 200 refers to a portable device such as a mobile phone, a tablet-type terminal, a portable personal computer, a camera, a wristwatch, a head-mounted display, and a game machine. The mobile device 200 includes an attitude calculation device 100. The attitude calculation device 100 detects the attitude of the mobile device 200 in a reference coordinate system having orthogonal axes X, Y, and Z. The posture of the device can be defined using Euler angles or quaternions.
 姿勢算出装置100は、過去から現時点までの携帯機器200の回転を累積した第1の姿勢と、現時点における携帯機器200に関する情報に基づく第2の姿勢とを算出する。 The posture calculation device 100 calculates a first posture in which the rotation of the mobile device 200 from the past to the current time is accumulated and a second posture based on information on the mobile device 200 at the current time.
 図2は、姿勢算出装置100の構成例を示す図である。本例の姿勢算出装置100は、地磁気検出部10、加速度検出部12、角速度検出部14、オフセット除去部16、静止判定部18および姿勢算出部20を備える。 FIG. 2 is a diagram illustrating a configuration example of the posture calculation apparatus 100. The posture calculation device 100 of this example includes a geomagnetism detection unit 10, an acceleration detection unit 12, an angular velocity detection unit 14, an offset removal unit 16, a stillness determination unit 18, and a posture calculation unit 20.
 角速度検出部14は、携帯機器200の角速度を検出する。角速度検出部14は、直交する3軸(ロール、ピッチ、ヨー)のそれぞれに対して設けられ、携帯機器200の回転を、各軸を中心とする回転成分に分離して検出する。 The angular velocity detection unit 14 detects the angular velocity of the mobile device 200. The angular velocity detection unit 14 is provided for each of three orthogonal axes (roll, pitch, yaw), and detects the rotation of the mobile device 200 by separating it into rotation components centered on each axis.
 静止判定部18は、携帯機器200が静止状態か否かを判定する。静止判定部18は、各検出部が検出したデータに基づいて静止状態を判定する。例えば静止判定部18は、角速度検出部14が検出する角速度が、所定の閾値以下の場合に静止状態と判定する。 The stationary determination unit 18 determines whether or not the mobile device 200 is stationary. The stationary determination unit 18 determines the stationary state based on the data detected by each detection unit. For example, the stillness determination unit 18 determines that the state is still when the angular velocity detected by the angular velocity detection unit 14 is equal to or less than a predetermined threshold.
 オフセット除去部16は、角速度検出部14の出力におけるオフセット成分を検出する。オフセット成分とは、例えば携帯機器200が実際には静止しているにも関わらず、角速度検出部14の出力に現れる角速度成分を指す。オフセット除去部16は、静止判定部18が静止状態と判定している間の、角速度検出部14の出力を平均してオフセット成分を検出してよい。オフセット除去部16は、角速度検出部14が出力する角速度データから、当該オフセット成分を除去する。オフセット除去部16は、定期的にオフセット成分を検出することが好ましい。 The offset removal unit 16 detects an offset component in the output of the angular velocity detection unit 14. The offset component refers to an angular velocity component that appears in the output of the angular velocity detector 14 even though the mobile device 200 is actually stationary, for example. The offset removal unit 16 may detect the offset component by averaging the outputs of the angular velocity detection unit 14 while the stationary determination unit 18 determines that the stationary state. The offset removing unit 16 removes the offset component from the angular velocity data output from the angular velocity detecting unit 14. The offset removal unit 16 preferably detects the offset component periodically.
 姿勢算出部20は、オフセット成分が除去された角速度データに基づいて、携帯機器200の第1の姿勢を算出する。姿勢算出部20は、順次検出される角速度データに応じた姿勢の変化を累積することで、携帯機器200の第1の姿勢を算出する。また、姿勢算出部20は、オフセット成分が除去された角速度データに基づいて、携帯機器200の回転情報を算出する。回転情報としては、携帯機器200の回転状態を示す情報であれば特に限定は無く、例えば、単位時間当たりの携帯機器200の回転量や所定時刻における携帯機器200の角速度などが挙げられる。 The posture calculation unit 20 calculates the first posture of the mobile device 200 based on the angular velocity data from which the offset component has been removed. The posture calculation unit 20 calculates the first posture of the mobile device 200 by accumulating posture changes according to the angular velocity data detected sequentially. In addition, the posture calculation unit 20 calculates rotation information of the mobile device 200 based on the angular velocity data from which the offset component has been removed. The rotation information is not particularly limited as long as it is information indicating the rotation state of the mobile device 200. Examples of the rotation information include a rotation amount of the mobile device 200 per unit time and an angular velocity of the mobile device 200 at a predetermined time.
 地磁気検出部10は、直交する3軸(ロール、ピッチ、ヨー)のそれぞれに対して設けられ、各軸に平行な磁気成分を検出する。これにより、携帯機器200に対する地磁気の方向を検出する。加速度検出部12は、直交する3軸(ロール、ピッチ、ヨー)のそれぞれに対して設けられ、各軸に平行な加速度成分を検出する。これにより、携帯機器200に対する重力加速度の方向を検出する。 The geomagnetism detection unit 10 is provided for each of three orthogonal axes (roll, pitch, yaw) and detects a magnetic component parallel to each axis. Thereby, the direction of geomagnetism with respect to the mobile device 200 is detected. The acceleration detection unit 12 is provided for each of three orthogonal axes (roll, pitch, yaw) and detects an acceleration component parallel to each axis. Thereby, the direction of the gravitational acceleration with respect to the portable device 200 is detected.
 姿勢算出部20は、地磁気検出部10および加速度検出部12が出力する磁気データおよび加速度データに基づいて、携帯機器200の第2の姿勢を検出する。第1の姿勢が、過去から現時点までのデータの累積で算出されるので誤差が蓄積されるのに対して、第2の姿勢は、過去のデータを用いずに現時点におけるデータから検出されるので誤差が蓄積されない。 The posture calculation unit 20 detects the second posture of the mobile device 200 based on the magnetic data and acceleration data output from the geomagnetism detection unit 10 and the acceleration detection unit 12. Since the first posture is calculated by accumulating data from the past to the present time, an error is accumulated, whereas the second posture is detected from the current data without using the past data. Errors are not accumulated.
 なお、磁気データおよび加速度データには、地磁気および重力加速度の他の要因による磁気および加速度の成分が含まれてしまう。このため、姿勢算出部20は、所定の条件を満たしたときだけ、磁気データおよび加速度データから第2の姿勢を算出する。一般に、姿勢算出部20が第2の姿勢を算出できる頻度は、第1の姿勢を算出する頻度より少ない。ところで、角速度検出部14は温度等の影響により一般にオフセットにドリフトが生じる。その為、角速度データを長時間累積すると誤差が蓄積されてしまい、第1の姿勢が正しい姿勢ではなくなってしまう。 Note that the magnetic data and acceleration data include magnetic and acceleration components due to other factors of geomagnetism and gravitational acceleration. For this reason, the posture calculation unit 20 calculates the second posture from the magnetic data and the acceleration data only when a predetermined condition is satisfied. In general, the frequency with which the posture calculation unit 20 can calculate the second posture is less than the frequency with which the first posture is calculated. By the way, the angular velocity detector 14 generally has a drift in offset due to the influence of temperature or the like. Therefore, if angular velocity data is accumulated for a long time, errors are accumulated, and the first posture is not correct.
 姿勢算出部20は、第2の姿勢を算出した場合に、第1の姿勢と第2の姿勢と角速度検出部の出力から得られる機器の回転情報とに基づいて新たな第3の姿勢を算出する。姿勢算出部20は、第3の姿勢を現時点における第1の姿勢として用い、以降の携帯機器200の回転を累積してよい。定期的に第3の姿勢を算出して機器の姿勢として出力することで、第1の姿勢において誤差が蓄積されることを防ぐことができる。 When calculating the second attitude, the attitude calculating unit 20 calculates a new third attitude based on the first attitude, the second attitude, and the rotation information of the device obtained from the output of the angular velocity detection unit. To do. The posture calculation unit 20 may use the third posture as the first posture at the present time and accumulate subsequent rotations of the mobile device 200. By regularly calculating the third posture and outputting it as the posture of the device, it is possible to prevent errors from being accumulated in the first posture.
 図3は、本発明の実施形態に係る姿勢算出部20の構成例を示す図である。本例の姿勢算出部20は、第2の姿勢算出部22、第1の姿勢算出部24、差分算出部26、係数算出部28、第3の姿勢算出部30および決定部32を有する。 FIG. 3 is a diagram illustrating a configuration example of the posture calculation unit 20 according to the embodiment of the present invention. The posture calculation unit 20 of this example includes a second posture calculation unit 22, a first posture calculation unit 24, a difference calculation unit 26, a coefficient calculation unit 28, a third posture calculation unit 30, and a determination unit 32.
 第2の姿勢算出部22は、地磁気検出部10および加速度検出部12が検出した磁気データおよび加速度データに基づいて、携帯機器200の第2の姿勢を算出する。なお、第2の姿勢を算出するのに用いるパラメータは、地磁気の方向および重力方向に限定されない。第2の姿勢算出部22は、方向が既知の多様なパラメータ(例えば、太陽の方向、外部の既知のマーカーの方向、GPS、ネットワーク測位)に基づいて、第2の姿勢を算出することができる。 The second attitude calculation unit 22 calculates the second attitude of the mobile device 200 based on the magnetic data and acceleration data detected by the geomagnetism detection unit 10 and the acceleration detection unit 12. The parameters used for calculating the second posture are not limited to the geomagnetic direction and the gravitational direction. The second attitude calculation unit 22 can calculate the second attitude based on various parameters whose directions are known (for example, the direction of the sun, the direction of an external known marker, GPS, and network positioning). .
 例えば第2の姿勢算出部22は、加速度データに基づいて、重力方向に対して携帯機器200がどれだけ傾いているかを算出する。そして、当該傾きと、地磁気データとに基づいて、水平面において携帯機器200が向いている方位を算出する。これにより、携帯機器200の第2の姿勢を算出することができる。本例では、現時点の時刻tにおける携帯機器200の第2の姿勢を、時刻tにおける加速度データおよび磁気データにより算出されるロール角R(t)、ピッチ角P(t)、ヨー角Y(t)で表す。 For example, the second posture calculation unit 22 calculates how much the mobile device 200 is tilted with respect to the direction of gravity based on the acceleration data. And based on the said inclination and geomagnetic data, the azimuth | direction which the portable apparatus 200 faces in a horizontal surface is calculated. Thereby, the 2nd attitude | position of the portable apparatus 200 is computable. In the present example, the second posture of the mobile device 200 at the current time t is determined based on the roll angle R (t), pitch angle P (t), and yaw angle Y (t ).
 なお、携帯機器200に運動加速度が生じている場合、加速度データからは重力方向を精度よく算出することができない。このため、第2の姿勢算出部22は、加速度検出部12が検出する3軸方向の加速度を合成したベクトルの大きさと、重力加速度である1Gに相当する大きさとを比較して、差分が所定の閾値以下である場合に第2の姿勢を算出する。 Note that when motion acceleration occurs in the mobile device 200, the direction of gravity cannot be calculated accurately from the acceleration data. Therefore, the second posture calculation unit 22 compares the magnitude of the vector obtained by combining the accelerations in the three-axis directions detected by the acceleration detection unit 12 with the magnitude corresponding to 1G that is the gravitational acceleration, and the difference is predetermined. The second posture is calculated when it is equal to or less than the threshold value.
 第1の姿勢算出部24は、角速度検出部14が検出した角速度データに基づいて、携帯機器200の第1の姿勢を算出する。本例の第1の姿勢算出部24は、オフセット除去部16によりオフセット成分が除去された角速度データに基づいて、第1の姿勢を算出する。本例では、時刻tにおける携帯機器200の第1の姿勢を、時刻tにおけるロール角r(t)、ピッチ角p(t)、ヨー角y(t)で表す。ロール角r(t)、ピッチ角p(t)、ヨー角y(t)は、下式で与えられる。
 r(t)=r(t-1)+Δr(t)
 p(t)=p(t-1)+Δp(t)
 y(t)=y(t-1)+Δy(t)
 ここで、t-1は、時刻tから1単位時間前の時刻を指す。また、Δr(t)、Δp(t)、Δy(t)は、時刻t-1から時刻tまでの期間における携帯機器200の回転量を示す。本明細書において、当該回転量を、現時点の回転量と称する場合がある。当該回転量は、例えば時刻tにおける角速度に1単位時間を乗じて算出される。1単位時間は、角速度検出部14における角速度の検出間隔と同一であってよい。
The first attitude calculation unit 24 calculates the first attitude of the mobile device 200 based on the angular velocity data detected by the angular velocity detection unit 14. The first posture calculation unit 24 of this example calculates the first posture based on the angular velocity data from which the offset component has been removed by the offset removal unit 16. In this example, the first posture of the mobile device 200 at time t is represented by a roll angle r (t), a pitch angle p (t), and a yaw angle y (t) at time t. The roll angle r (t), pitch angle p (t), and yaw angle y (t) are given by the following equations.
r (t) = r (t−1) + Δr (t)
p (t) = p (t−1) + Δp (t)
y (t) = y (t−1) + Δy (t)
Here, t−1 indicates a time one unit time before the time t. In addition, Δr (t), Δp (t), and Δy (t) indicate the amount of rotation of the mobile device 200 during the period from time t−1 to time t. In the present specification, the rotation amount may be referred to as a current rotation amount. The amount of rotation is calculated, for example, by multiplying the angular velocity at time t by one unit time. One unit time may be the same as the angular velocity detection interval in the angular velocity detector 14.
 差分算出部26は、第1の姿勢および第2の姿勢の差分を算出する。本例の差分算出部26は、ロール角、ピッチ角、ヨー角のそれぞれの差分r(t)-R(t)、p(t)-P(t)、y(t)-Y(t)を算出する。 The difference calculation unit 26 calculates the difference between the first posture and the second posture. The difference calculation unit 26 of this example uses the differences r (t) −R (t), p (t) −P (t), y (t) −Y (t) for the roll angle, pitch angle, and yaw angle. Is calculated.
 決定部32は、携帯機器200の回転情報に基づいて、第1の姿勢と第2の姿勢とを組み合わせる割合を動的に決定する。割合を動的に決定するとは、割合を常に一定にするのではなく、割合を状況に応じて変化させるという意味で、例えば、第2の姿勢算出部22が第2の姿勢を算出する毎に、当該時点での携帯機器200の回転情報に基づいて当該割合を決定する動作を指す。本例の決定部32は、携帯機器200の時刻tの角速度に基づいて、上述した差分に乗ずるべき比例定数を動的に算出する。決定部32は、角速度が大きいほど大きく、角速度が小さいほど小さい比例定数kを生成する。決定部32は、ロール角、ピッチ角、ヨー角の角速度の二乗和等に基づいて、ロール角、ピッチ角、ヨー角に対して共通の比例定数kを生成してよい。また、決定部32は、ロール角、ピッチ角、ヨー角の角速度のそれぞれの絶対値に基づいて、ロール角、ピッチ角、ヨー角のそれぞれに対する比例定数kr、kp、kyを生成してもよい。当該比例定数は、0より大きく、1未満とする。 The determination unit 32 dynamically determines a ratio of combining the first posture and the second posture based on the rotation information of the mobile device 200. Dynamically determining the ratio does not mean that the ratio is always constant, but means that the ratio is changed according to the situation. For example, every time the second attitude calculation unit 22 calculates the second attitude. The operation of determining the ratio based on the rotation information of the mobile device 200 at the time point. The determination unit 32 of this example dynamically calculates a proportional constant to be multiplied by the above-described difference based on the angular velocity at the time t of the mobile device 200. The determination unit 32 generates a proportional constant k that is larger as the angular velocity is larger and smaller as the angular velocity is smaller. The determination unit 32 may generate a common proportionality constant k for the roll angle, the pitch angle, and the yaw angle based on the square sum of the angular velocity of the roll angle, the pitch angle, and the yaw angle. The determination unit 32 may generate proportional constants kr, kp, and ky for the roll angle, the pitch angle, and the yaw angle based on the absolute values of the angular velocity of the roll angle, the pitch angle, and the yaw angle. . The proportionality constant is greater than 0 and less than 1.
 係数算出部28は、差分算出部26が算出した差分に、決定部32が算出した比例定数を乗じた差分係数を算出する。本例の係数算出部28は、以下の差分係数を算出する。
 ロール角:kr(r(t)-R(t))
 ピッチ角:kp(p(t)-P(t))
 ヨー角:ky(y(t)-Y(t))
The coefficient calculation unit 28 calculates a difference coefficient obtained by multiplying the difference calculated by the difference calculation unit 26 by the proportionality constant calculated by the determination unit 32. The coefficient calculation unit 28 of this example calculates the following difference coefficient.
Roll angle: kr (r (t) -R (t))
Pitch angle: kp (p (t) -P (t))
Yaw angle: ky (y (t) -Y (t))
 第3の姿勢算出部30は、第1の姿勢と、第2の姿勢と、携帯機器200の回転情報とに基づき、新たな第3の姿勢を算出する。つまり、第3の姿勢算出部30は、第1の姿勢および第2の姿勢を算出するのに用いた回転情報に加えて、携帯機器200の回転情報を更に用いる。更に用いる回転情報は、第1の姿勢または第2の姿勢を算出するのに用いた回転情報と一部または全部が重複する内容であってもよい。 The third posture calculation unit 30 calculates a new third posture based on the first posture, the second posture, and the rotation information of the mobile device 200. That is, the third posture calculation unit 30 further uses the rotation information of the mobile device 200 in addition to the rotation information used to calculate the first posture and the second posture. Further, the rotation information used may be a content partially or entirely overlapped with the rotation information used to calculate the first posture or the second posture.
 本例の第3の姿勢算出部30は、第1の姿勢および第2の姿勢の少なくとも一方と、第1の姿勢および第2の姿勢の差分と、決定部32が決定した割合とに基づいて、第3の姿勢を算出する。より具体的な例では、第3の姿勢算出部30は、第1の姿勢算出部24が算出した第1の姿勢(r(t)、p(t)、y(t))と、係数算出部28が算出した差分係数とを用いて新たな第3の姿勢を算出する。上述したように、差分係数には、少なくとも第2の姿勢の情報と、携帯機器200の回転情報に応じた比例定数とが含まれる。本例の第3の姿勢算出部30は、下式のように、第3の姿勢を算出する。
 ロール角:r(t)-kr(r(t)-R(t))
 ピッチ角:p(t)-kp(p(t)-P(t))
 ヨー角:y(t)-ky(y(t)-Y(t))
The third posture calculation unit 30 of this example is based on at least one of the first posture and the second posture, the difference between the first posture and the second posture, and the ratio determined by the determination unit 32. The third posture is calculated. In a more specific example, the third posture calculation unit 30 calculates the first posture (r (t), p (t), y (t)) calculated by the first posture calculation unit 24, and coefficient calculation. A new third posture is calculated using the difference coefficient calculated by the unit 28. As described above, the difference coefficient includes at least the information on the second posture and the proportionality constant according to the rotation information of the mobile device 200. The third posture calculation unit 30 in this example calculates the third posture as in the following equation.
Roll angle: r (t) -kr (r (t) -R (t))
Pitch angle: p (t) -kp (p (t) -P (t))
Yaw angle: y (t) -ky (y (t) -Y (t))
 なお、係数算出部28は、差分係数の大きさが、携帯機器200の現時点の回転量の大きさ以下となるように、差分係数を定めてよい。例えば係数算出部28は、算出した差分係数が、回転量より大きくなる範囲においては、差分係数の大きさを、回転量の大きさに一致させる。 The coefficient calculation unit 28 may determine the difference coefficient so that the difference coefficient is equal to or smaller than the current rotation amount of the mobile device 200. For example, in the range where the calculated difference coefficient is larger than the rotation amount, the coefficient calculation unit 28 matches the magnitude of the difference coefficient with the rotation amount.
 比例定数kが1より小さい場合、一度の算出処理では第2の姿勢と第1の姿勢との差分がゼロにはならない。このため姿勢算出部20は、時刻tにおいて検出された差分を、時刻t、t+1、・・・のように複数のタイミングに分割して、各タイミングにおける第3の姿勢の算出に用いてもよい。決定部32は、各タイミングにおける携帯機器200の角速度に応じて、各タイミングにおける比例定数を算出する。姿勢算出部20は、例えば時刻t+1における第3の姿勢を、時刻tにおける差分を用いて以下のように算出してよい。
 ロール角:r(t+1)-kr(t+1)・(r(t)-R(t))
 ピッチ角:p(t+1)-kp(t+1)・(p(t)-P(t))
 ヨー角:y(t+1)-ky(t+1)・(y(t)-Y(t))
When the proportionality constant k is smaller than 1, the difference between the second posture and the first posture does not become zero in one calculation process. Therefore, the attitude calculation unit 20 may divide the difference detected at time t into a plurality of timings such as times t, t + 1,... And use them for calculating the third attitude at each timing. . The determination unit 32 calculates a proportionality constant at each timing according to the angular velocity of the mobile device 200 at each timing. The posture calculation unit 20 may calculate, for example, the third posture at time t + 1 using the difference at time t as follows.
Roll angle: r (t + 1) −kr (t + 1) · (r (t) −R (t))
Pitch angle: p (t + 1) −kp (t + 1) · (p (t) −P (t))
Yaw angle: y (t + 1) −ky (t + 1) · (y (t) −Y (t))
 姿勢算出部20は、各タイミングにおける軸毎の比例定数の和(例えば、kr(t)+kr(t+1)+・・・)が1とほぼ等しくなるまで、時刻tにおいて検出した差分を用いて新たな第3の姿勢を算出してよい。これにより、検出した差分がほぼ無くなるように、第3の姿勢を算出することができる。ただし、時刻tにおいて検出した差分を複数のタイミングに分けて、各タイミングにおける第3の姿勢を算出している間に、新たに第2の姿勢が算出されたときは、姿勢算出部20は、新たな第2の姿勢と第1の姿勢との差分を用いて、第3の姿勢を算出することが好ましい。これにより、第2の姿勢を算出する間隔が長い場合であっても、第2の姿勢と第1の姿勢との差分が無くなるように、第3の姿勢を算出することができる。なお、本発明に用いることのできる第3の姿勢の算出方法は、上述したオイラー角の差分を用いる方法のほか、クォータニオンを用いた線形球面補間、線形補間等の手法も用いることができる。 The posture calculation unit 20 newly uses the difference detected at time t until the sum of proportional constants for each axis at each timing (for example, kr (t) + kr (t + 1) +...) Is substantially equal to 1. The third posture may be calculated. Accordingly, the third posture can be calculated so that the detected difference is almost eliminated. However, when the difference detected at time t is divided into a plurality of timings and the third posture at each timing is calculated, the second posture is newly calculated. It is preferable to calculate the third posture by using the difference between the new second posture and the first posture. Thereby, even when the interval for calculating the second posture is long, the third posture can be calculated so that the difference between the second posture and the first posture is eliminated. Note that the third attitude calculation method that can be used in the present invention can use a method such as linear spherical interpolation using quaternions, linear interpolation, or the like in addition to the method using the Euler angle difference described above.
 本例の姿勢算出部20によれば、第1の姿勢と第2の姿勢と携帯機器200の回転情報に基づいて第3の姿勢を算出しているので利用者に与える違和感を低減することができる。例えば、携帯機器200が静止状態に近い場合には第1の姿勢に近い姿勢情報を算出することで姿勢変化時の違和感を低減して、携帯機器200が大きく動いている場合には第2の姿勢に近い姿勢情報を算出することで、姿勢追従を効率よく行うことができる。つまり、姿勢算出部20は、単位時間当たりの携帯機器200の回転量が小さいほど、第1の姿勢に対する差分が小さくなるような第3の姿勢を算出する。また、単位時間当たりの携帯機器の回転量が大きいほど、第2の姿勢に対する差分が小さくなるような第3の姿勢を算出する。姿勢の差分とは、ロール角における差分の絶対値、ピッチ角における差分の絶対値、および、ヨー角における差分の絶対値の和であってよい。 According to the posture calculation unit 20 of this example, since the third posture is calculated based on the first posture, the second posture, and the rotation information of the mobile device 200, it is possible to reduce discomfort given to the user. it can. For example, when the mobile device 200 is close to a stationary state, the posture information close to the first posture is calculated to reduce a sense of incongruity when the posture changes, and when the mobile device 200 moves greatly, the second By calculating posture information close to the posture, posture tracking can be performed efficiently. That is, the posture calculation unit 20 calculates the third posture such that the difference with respect to the first posture is smaller as the amount of rotation of the mobile device 200 per unit time is smaller. Further, the third posture is calculated such that the difference with respect to the second posture becomes smaller as the amount of rotation of the portable device per unit time is larger. The difference in posture may be the sum of the absolute value of the difference in the roll angle, the absolute value of the difference in the pitch angle, and the absolute value of the difference in the yaw angle.
 図4は、姿勢算出部20の動作の概要を説明する図である。図4では、時刻tにおける第1の姿勢および第2の姿勢の例を示す。上述したように、第1の姿勢には誤差が蓄積されるので、第1の姿勢および第2の姿勢は必ずしも一致しない。姿勢算出部20は、第1の姿勢および第2の姿勢の差分に対して、時刻tにおける角速度に応じた比例定数を乗じた差分係数を算出する。 FIG. 4 is a diagram for explaining the outline of the operation of the posture calculation unit 20. FIG. 4 shows an example of the first posture and the second posture at time t. As described above, since errors are accumulated in the first posture, the first posture and the second posture do not necessarily match. The posture calculation unit 20 calculates a difference coefficient obtained by multiplying the difference between the first posture and the second posture by a proportional constant according to the angular velocity at time t.
 図5は、姿勢算出装置100の動作例を示すフローチャートを示す。姿勢算出装置100は、角速度検出部14により、所定の周期で、携帯機器200の角速度を検出する(S300)。第1の姿勢算出部24は、順次検出される角速度データに応じた姿勢の変化を累積して、携帯機器200の第1の姿勢を算出する(S302)。姿勢算出装置100は、S300およびS302の処理を繰り返すことで、所定の周期で第1の姿勢を算出する。 FIG. 5 is a flowchart showing an operation example of the posture calculation apparatus 100. The posture calculation apparatus 100 detects the angular velocity of the portable device 200 at a predetermined cycle by the angular velocity detector 14 (S300). The first posture calculation unit 24 accumulates the posture changes according to the angular velocity data sequentially detected, and calculates the first posture of the mobile device 200 (S302). The posture calculation apparatus 100 calculates the first posture at a predetermined cycle by repeating the processes of S300 and S302.
 第2の姿勢算出部22は、第1の姿勢算出部24と平行して、携帯機器200の第2の姿勢を算出する(S304)。第2の姿勢算出部22は、地磁気検出部10および加速度検出部12の検出結果が所定の条件を満たす場合に、第2の姿勢を算出する。例えば第2の姿勢算出部22は、加速度検出部12が検出する3軸方向の加速度を合成したベクトルの大きさと、重力加速度である1Gに相当する大きさとを比較して、差分が所定の閾値以下である場合に第2の姿勢を算出する。 The second posture calculation unit 22 calculates the second posture of the mobile device 200 in parallel with the first posture calculation unit 24 (S304). The second posture calculation unit 22 calculates the second posture when the detection results of the geomagnetism detection unit 10 and the acceleration detection unit 12 satisfy a predetermined condition. For example, the second posture calculation unit 22 compares the magnitude of the vector obtained by combining the accelerations in the three-axis directions detected by the acceleration detection unit 12 with the magnitude corresponding to 1G that is the gravitational acceleration, and the difference is a predetermined threshold value. The second posture is calculated when:
 また、第1の姿勢を算出する場合、その算出周期が短いほど、携帯機器200の姿勢の連続的な滑らかな動作を再現する精度が向上する等の利点もある。本例では、第1の姿勢算出部24が第1の姿勢を算出する周期は、第2の姿勢算出部22が第2の姿勢を算出する周期よりも短い。姿勢算出部20は、第2の姿勢算出部22が第2の姿勢を算出した場合に、第3の姿勢を算出する。 Further, when the first posture is calculated, there is an advantage that, as the calculation cycle is shorter, the accuracy of reproducing the continuous smooth motion of the posture of the mobile device 200 is improved. In this example, the cycle in which the first posture calculation unit 24 calculates the first posture is shorter than the cycle in which the second posture calculation unit 22 calculates the second posture. The posture calculation unit 20 calculates a third posture when the second posture calculation unit 22 calculates the second posture.
 第2の姿勢算出部22が第2の姿勢を算出した場合、差分算出部26が、現時点における第1の姿勢と第2の姿勢との差分を算出する(S306)。次に、決定部32および係数算出部28は、現時点における角速度に応じた差分係数を算出する(S308)。そして、第3の姿勢算出部30は、当該差分係数に基づいて、現時点における第3の姿勢を算出する(S310)。このような処理により、異なる方法で算出した姿勢を出力する時の違和感を低減し、且つ、効率よく姿勢を算出することができる。 When the second posture calculation unit 22 calculates the second posture, the difference calculation unit 26 calculates the difference between the first posture and the second posture at the current time (S306). Next, the determination unit 32 and the coefficient calculation unit 28 calculate a difference coefficient according to the current angular velocity (S308). Then, the third posture calculation unit 30 calculates the current third posture based on the difference coefficient (S310). By such processing, it is possible to reduce a sense of incongruity when outputting postures calculated by different methods, and to calculate postures efficiently.
 第1の姿勢算出部24は、第3の姿勢算出部30が算出した第3の姿勢を用いて、以降の第1の姿勢を算出する。本例では、第1の姿勢算出部24は、第3の姿勢算出部30が算出した時刻tの第3の姿勢に、次の時刻t+1における回転量Δr(t+1)、Δp(t+1)、Δy(t+1)を加算して、時刻t+1における第1の姿勢を算出する。 The first posture calculation unit 24 calculates the subsequent first posture using the third posture calculated by the third posture calculation unit 30. In this example, the first posture calculation unit 24 adds the rotation amounts Δr (t + 1), Δp (t + 1), Δy at the next time t + 1 to the third posture at the time t calculated by the third posture calculation unit 30. (T + 1) is added to calculate the first posture at time t + 1.
 図6は、本発明の実施形態に係る姿勢算出部20の構成例を示す図である。本例の姿勢算出部20は、第2の姿勢算出部22、回転軸算出部34、回転量算出部36、第1の姿勢算出部38、および、第3の姿勢算出部40を有する。第2の姿勢算出部22は、図3から図5に関連して説明した第2の姿勢算出部22と同様の機能を有する。第1の姿勢算出部38は、図1から図5に関連して説明した第1の姿勢を算出する。第3の姿勢算出部40は、図1から図5に関連して説明した第3の姿勢を算出する。第1の姿勢算出部38は、第1の姿勢算出部24と同一の機能を有してよい。回転量算出部36は、角速度データに基づいて、携帯機器200の現時点の回転量を算出する。現時点の回転量は、現時点の角速度に、1単位時間を乗じて算出してよい。本例の回転量算出部36は、軸毎の回転量を算出する。 FIG. 6 is a diagram illustrating a configuration example of the posture calculation unit 20 according to the embodiment of the present invention. The posture calculation unit 20 of this example includes a second posture calculation unit 22, a rotation axis calculation unit 34, a rotation amount calculation unit 36, a first posture calculation unit 38, and a third posture calculation unit 40. The second posture calculation unit 22 has the same function as the second posture calculation unit 22 described with reference to FIGS. 3 to 5. The first posture calculation unit 38 calculates the first posture described with reference to FIGS. 1 to 5. The third posture calculation unit 40 calculates the third posture described with reference to FIGS. 1 to 5. The first posture calculation unit 38 may have the same function as the first posture calculation unit 24. The rotation amount calculation unit 36 calculates the current rotation amount of the mobile device 200 based on the angular velocity data. The current rotation amount may be calculated by multiplying the current angular velocity by one unit time. The rotation amount calculation unit 36 of this example calculates the rotation amount for each axis.
 回転軸算出部34は、現時点に対して1単位時間前の第1の姿勢から、現時点における第2の姿勢への回転軸を算出する。回転軸算出部34は、直交軸X、Y、Zの原点を通り、且つ、1単位時間前の第1の姿勢を当該回転軸回りで回転させたときに、現時点における第2の姿勢に変換できる回転軸を算出する。 The rotation axis calculation unit 34 calculates the rotation axis from the first posture one unit time before the current time to the second posture at the current time. The rotation axis calculation unit 34 converts the first posture one unit time ago through the origin of the orthogonal axes X, Y, and Z into the second posture at the present time when rotating around the rotation axis. The possible rotation axis is calculated.
 一般に、2つの姿勢間の回転は、四元数(クォータニオン)、回転行列またはオイラー角を用いて表すことができる。本実施形態においては、一例として四元数を用いた場合の2つの姿勢間の回転について述べるが、本発明における2つの姿勢間の回転は、上述したように回転行列、オイラー角等を用いた方法も用いることができる。本例の回転軸算出部34は、1単位時間前の第1の姿勢と、現時点における第2の姿勢とに基づいて、当該回転を示す四元数を算出する。 Generally, rotation between two postures can be expressed using a quaternion, a rotation matrix, or Euler angles. In this embodiment, rotation between two postures when using a quaternion is described as an example, but rotation between the two postures in the present invention uses a rotation matrix, Euler angles, etc. as described above. Methods can also be used. The rotation axis calculation unit 34 of this example calculates a quaternion indicating the rotation based on the first posture one unit time ago and the second posture at the present time.
 ここで四元数は、q=w+xi+yj+zkの形式で表現される。また、i、j、kは、以下の関係を満たす基底ベクトルである。
 i・i=j・j=k・k=-1
 i・j=k、j・k=i、k・i=j
 j・i=-k、k・j=-i、i・k=-j
Here, the quaternion is expressed in the form of q = w + xi + yj + zk. I, j, and k are basis vectors that satisfy the following relationship.
i ・ i = j ・ j = k ・ k = -1
i · j = k, j · k = i, k · i = j
j · i = −k, k · j = −i, i · k = −j
 現時点における第2の姿勢と、1単位時間前の第1の姿勢との関係は、回転を示す四元数qを用いて表現される。
 P(t)=qP(t-1)q-1
 ただし、P(t)は現時点の第2の姿勢を示すベクトル、P(t-1)は、1単位時間前の第1の姿勢を示すベクトル、qは回転を示す四元数である。P(t)、P(t-1)は、図3から図5に関連して説明したオイラー角による姿勢角の表現を、四元数の表現に変換したものであってよい。また、P(t)は、第2の姿勢において、携帯機器200のある点Aの位置を示す位置ベクトルであってもよい。また、P(t-1)は、第1の姿勢において、携帯機器200における同一の点Aの位置を示す位置ベクトルであってもよい。特定の一点について第2の姿勢および第1の姿勢の間の回転を算出すれば、姿勢全体の回転を特定することができる。
The relationship between the second posture at the present time and the first posture one unit time ago is expressed using a quaternion q indicating rotation.
P R (t) = qP r (t−1) q −1
Where P R (t) is a vector indicating the current second attitude, P r (t−1) is a vector indicating the first attitude one unit time ago, and q is a quaternion indicating rotation. . P R (t) and P r (t−1) may be obtained by converting the expression of the attitude angle by the Euler angle described in relation to FIGS. 3 to 5 into the expression of the quaternion. Further, P R (t) may be a position vector indicating the position of a certain point A of the mobile device 200 in the second posture. In addition, P r (t−1) may be a position vector indicating the position of the same point A in the mobile device 200 in the first posture. If the rotation between the second posture and the first posture is calculated for one specific point, the rotation of the entire posture can be specified.
 ベクトル(α、β、γ)を回転軸とするθの回転を示す四元数qは、以下のように表現される。
 q=cos(θ/2)+αsin(θ/2)・i+βsin(θ/2)・j+γsin(θ/2)・k
 そして、1単位時間前の第1の姿勢から第2の姿勢への回転軸は、ベクトルの外積P×Pから下式のように算出できる。
 (α、β、γ)=(P×P)/(|P×P|)
 なお、1単位時間前の第1の姿勢から第2の姿勢への回転量は、ベクトルの内積P・Pから下式のように算出できる。
 cosθ=(P・P)/(|P|・|P|)
The quaternion q indicating the rotation of θ with the vector (α, β, γ) as the rotation axis is expressed as follows.
q = cos (θ / 2) + αsin (θ / 2) · i + βsin (θ / 2) · j + γsin (θ / 2) · k
Then, the rotation axis from the first posture to the second posture one unit time before can be calculated from the vector outer product P R × P r as follows.
(Α, β, γ) = (P R × P r ) / (| P R × P r |)
The rotation amount from the first position before one unit time to the second position can be calculated by the following equation from the inner product P R · P r of the vector.
cos θ = (P R · P r ) / (| P R | · | P r |)
 第3の姿勢算出部40は、第1の姿勢算出部38が算出した1単位時間前の第1の姿勢に対して、回転軸算出部34が算出した回転軸(α、β、γ)に、回転量算出部36が検出した現時点の回転量θ'を適用する。なお、回転量θ'は、回転の大きさを示しており、回転軸の情報を有さない。つまり、1単位時間前の第1の姿勢を、当該回転軸回りに、当該回転量θ'で回転させる。これにより、第3の姿勢算出部40は、現時点の第3の姿勢を算出する。具体的には、下式に基づいて現時点の第1の姿勢P(t)を算出する。
 P(t)=q'P(t-1)q'-1
 q'=cos(θ'/2)+αsin(θ'/2)・i+βsin(θ'/2)・j+γsin(θ'/2)・k
 第1の姿勢算出部38は、第3の姿勢算出部40が算出した第3の姿勢を現時点における第1の姿勢として用い、以降の携帯機器200の回転を累積してよい。
The third posture calculation unit 40 uses the rotation axes (α, β, γ) calculated by the rotation axis calculation unit 34 with respect to the first posture one unit time before calculated by the first posture calculation unit 38. The current rotation amount θ ′ detected by the rotation amount calculation unit 36 is applied. The rotation amount θ ′ indicates the magnitude of rotation and does not have information on the rotation axis. That is, the first posture one unit time before is rotated around the rotation axis by the rotation amount θ ′. Thereby, the third posture calculation unit 40 calculates the current third posture. Specifically, the current first posture P r (t) is calculated based on the following equation.
P r (t) = q′P r (t−1) q ′ −1
q ′ = cos (θ ′ / 2) + αsin (θ ′ / 2) · i + βsin (θ ′ / 2) · j + γsin (θ ′ / 2) · k
The first posture calculation unit 38 may use the third posture calculated by the third posture calculation unit 40 as the first posture at the current time and accumulate subsequent rotations of the mobile device 200.
 これにより、携帯機器200の回転量に応じて適切な姿勢を算出することができる。このため、利用者に違和感を与えずに、第1の姿勢に蓄積された誤差を補正することができる。詳細には、第1の姿勢における誤差の蓄積を防ぐことができるので、例えば、携帯機器200が実際には静止しているにも関わらず、算出する姿勢が徐々に変化してしまうことを、利用者に違和感を与えずに防止することができる。また、第1の姿勢から第2の姿勢への回転軸を算出し、第1の姿勢に対して、算出した回転軸に携帯機器200の回転量を適用して第3の姿勢を算出するので、第3の姿勢が第1の姿勢のドリフトにつられてドリフトしてしまうことを防ぐことができる。この効果は静止時に顕著である。 Thereby, an appropriate posture can be calculated according to the amount of rotation of the mobile device 200. For this reason, the error accumulated in the first posture can be corrected without causing the user to feel uncomfortable. Specifically, since accumulation of errors in the first posture can be prevented, for example, the calculated posture gradually changes even though the mobile device 200 is actually stationary, This can be prevented without giving the user a sense of incongruity. In addition, since the rotation axis from the first attitude to the second attitude is calculated, and the rotation amount of the mobile device 200 is applied to the calculated rotation axis, the third attitude is calculated for the first attitude. The third posture can be prevented from drifting due to the drift of the first posture. This effect is significant when stationary.
 携帯機器200がゆっくり回転している場合でも、回転に追従した第1の姿勢を瞬時に算出することができる。本発明における回転量としては、例えば角速度、加速度、地磁気、画像データ、またはこれらの組み合わせにより得られる回転に関する物理量を用いることができる。ここで、加速度を用いた場合は単位時間当たりのピッチ角、ロール角の回転量より各軸に対する回転量を得ることができる。同様に、地磁気を用いた場合は単位時間当たりのヨー角の回転量より、各軸に対する回転量を得ることができる。また、画像データを用いた場合は単位時間当たりの変化量より各軸に対する回転量を得ることができる。 Even when the mobile device 200 rotates slowly, the first posture following the rotation can be calculated instantaneously. As the rotation amount in the present invention, for example, a physical quantity relating to rotation obtained by angular velocity, acceleration, geomagnetism, image data, or a combination thereof can be used. Here, when acceleration is used, the rotation amount for each axis can be obtained from the rotation amount of the pitch angle and roll angle per unit time. Similarly, when geomagnetism is used, the rotation amount for each axis can be obtained from the rotation amount of the yaw angle per unit time. When image data is used, the rotation amount for each axis can be obtained from the amount of change per unit time.
 なお、姿勢算出部20は、角速度検出部14が検出する現時点の角速度が、予め定められた閾値以下の場合に、図6に関連して説明したように、回転軸を用いて第3の姿勢を算出してよい。例えば姿勢算出部20は、静止判定部18において携帯機器200が静止していると判断される程度に角速度が小さい場合に、回転軸を用いて第3の姿勢を算出する。また、姿勢算出部20は、現時点の角速度が上述した閾値より大きい場合には、図3から図5に関連して説明したように第3の姿勢を算出してよい。 Note that, when the current angular velocity detected by the angular velocity detection unit 14 is equal to or less than a predetermined threshold, the posture calculation unit 20 uses the rotation axis to perform the third posture when the angular velocity is equal to or less than a predetermined threshold. May be calculated. For example, the posture calculation unit 20 calculates the third posture using the rotation axis when the angular velocity is small enough to determine that the mobile device 200 is stationary by the stillness determination unit 18. In addition, when the current angular velocity is larger than the above-described threshold, the posture calculation unit 20 may calculate the third posture as described with reference to FIGS.
 図7は、図6に示した姿勢算出部20の動作の概要を説明する図である。図7では、1単位時間前の第1の姿勢および現時点の第2の姿勢の例を示す。第1の姿勢には誤差が累積されるので、例えば携帯機器200が長時間静止状態であったとしても、1単位時間前の第1の姿勢と、現時点の第2の姿勢との間に差が生じる場合がある。 FIG. 7 is a diagram for explaining the outline of the operation of the posture calculation unit 20 shown in FIG. FIG. 7 shows an example of the first posture one unit time ago and the current second posture. Since errors are accumulated in the first posture, for example, even if the mobile device 200 is stationary for a long time, a difference between the first posture one unit time ago and the current second posture is obtained. May occur.
 回転軸算出部34は、1単位時間前の第1の姿勢を所定の回転軸回りで回転させたときに、現時点の第2の姿勢に変化する回転軸を算出する。つまり、当該回転軸回りで第1の姿勢を回転させたときに得られるいずれかの姿勢が、第2の姿勢と一致するような回転軸を算出する。なお、回転軸算出部34は、現時点の第1の姿勢から、現時点の第2の姿勢への回転軸を算出してもよい。 The rotation axis calculation unit 34 calculates a rotation axis that changes to the current second attitude when the first attitude one unit time ago is rotated around a predetermined rotation axis. That is, a rotation axis is calculated such that any attitude obtained when the first attitude is rotated around the rotation axis coincides with the second attitude. The rotation axis calculation unit 34 may calculate the rotation axis from the current first posture to the current second posture.
 第3の姿勢算出部40は、回転軸算出部34が算出した回転軸を用いて、携帯機器200の現時点における回転量で、1単位時間前の第1の姿勢を回転させて、第3の姿勢を算出する。これにより、第1の姿勢に蓄積された誤差を、携帯機器200の回転量に応じて補正することができる。 The third posture calculation unit 40 uses the rotation axis calculated by the rotation axis calculation unit 34 to rotate the first posture one unit time ago with the current rotation amount of the mobile device 200, and Calculate the posture. Thereby, the error accumulated in the first posture can be corrected according to the rotation amount of the mobile device 200.
 図8は、図6の姿勢算出部20を用いた姿勢算出装置100の動作例を示すフローチャートを示す。S300からS304までの処理は、図5に示したフローチャートと同一である。 FIG. 8 is a flowchart showing an operation example of the posture calculation apparatus 100 using the posture calculation unit 20 of FIG. The processing from S300 to S304 is the same as the flowchart shown in FIG.
 第2の姿勢算出部22が第2の姿勢を算出した場合、回転軸算出部34が、一単位時間前の第1の姿勢から、現時点の第2の姿勢への回転軸を算出する(S312)。また、回転量算出部36は、現時点の角速度データから、現時点の携帯機器200の回転量を算出する(S314)。S312およびS314の処理は並行してよい。 When the second posture calculation unit 22 calculates the second posture, the rotation axis calculation unit 34 calculates the rotation axis from the first posture one unit time ago to the current second posture (S312). ). The rotation amount calculation unit 36 calculates the current rotation amount of the mobile device 200 from the current angular velocity data (S314). The processes of S312 and S314 may be performed in parallel.
 そして、第3の姿勢算出部40は、S312において算出した回転軸に、S314において算出した回転量を適用して、現時点の第3の姿勢を算出する(S316)。第1の姿勢算出部38は、S316において第3の姿勢算出部40が算出した第3の姿勢を用いて、以降の第1の姿勢を算出する。このような処理により、誤差補正時の違和感を低減することができる。また、端末が長時間静止しても、誤差の蓄積による姿勢の変化を防ぐことができる。 Then, the third attitude calculation unit 40 calculates the current third attitude by applying the rotation amount calculated in S314 to the rotation axis calculated in S312 (S316). The first attitude calculation unit 38 calculates the subsequent first attitude using the third attitude calculated by the third attitude calculation unit 40 in S316. By such processing, it is possible to reduce a sense of incongruity during error correction. Even if the terminal is stationary for a long time, it is possible to prevent a change in posture due to accumulation of errors.
 図9は、本実施形態に係るコンピュータ1900のハードウェア構成の一例を示す。本実施形態に係るコンピュータ1900は、ホスト・コントローラ2082により相互に接続されるCPU2000、RAM2020、グラフィック・コントローラ2075、及び表示装置2080を有するCPU周辺部と、入出力コントローラ2084によりホスト・コントローラ2082に接続される通信インターフェイス2030、ハードディスクドライブ2040、及びCD-ROMドライブ2060を有する入出力部と、入出力コントローラ2084に接続されるROM2010、フレキシブルディスク・ドライブ2050、及び入出力チップ2070を有するレガシー入出力部とを備える。 FIG. 9 shows an example of a hardware configuration of a computer 1900 according to the present embodiment. A computer 1900 according to this embodiment is connected to a CPU peripheral unit having a CPU 2000, a RAM 2020, a graphic controller 2075, and a display device 2080 that are connected to each other by a host controller 2082, and to the host controller 2082 by an input / output controller 2084. Input / output unit having communication interface 2030, hard disk drive 2040, and CD-ROM drive 2060, and legacy input / output unit having ROM 2010, flexible disk drive 2050, and input / output chip 2070 connected to input / output controller 2084 With.
 ホスト・コントローラ2082は、RAM2020と、高い転送レートでRAM2020をアクセスするCPU2000及びグラフィック・コントローラ2075とを接続する。CPU2000は、ROM2010及びRAM2020に格納されたプログラムに基づいて動作し、各部の制御を行う。グラフィック・コントローラ2075は、CPU2000等がRAM2020内に設けたフレーム・バッファ上に生成する画像データを取得し、表示装置2080上に表示させる。これに代えて、グラフィック・コントローラ2075は、CPU2000等が生成する画像データを格納するフレーム・バッファを、内部に含んでもよい。 The host controller 2082 connects the RAM 2020 to the CPU 2000 and the graphic controller 2075 that access the RAM 2020 at a high transfer rate. The CPU 2000 operates based on programs stored in the ROM 2010 and the RAM 2020 and controls each unit. The graphic controller 2075 acquires image data generated by the CPU 2000 or the like on a frame buffer provided in the RAM 2020 and displays it on the display device 2080. Instead of this, the graphic controller 2075 may include a frame buffer for storing image data generated by the CPU 2000 or the like.
 入出力コントローラ2084は、ホスト・コントローラ2082と、比較的高速な入出力装置である通信インターフェイス2030、ハードディスクドライブ2040、CD-ROMドライブ2060を接続する。通信インターフェイス2030は、ネットワークを介して他の装置と通信する。ハードディスクドライブ2040は、コンピュータ1900内のCPU2000が使用するプログラム及びデータを格納する。CD-ROMドライブ2060は、CD-ROM2095からプログラム又はデータを読み取り、RAM2020を介してハードディスクドライブ2040に提供する。 The input / output controller 2084 connects the host controller 2082 to the communication interface 2030, the hard disk drive 2040, and the CD-ROM drive 2060, which are relatively high-speed input / output devices. The communication interface 2030 communicates with other devices via a network. The hard disk drive 2040 stores programs and data used by the CPU 2000 in the computer 1900. The CD-ROM drive 2060 reads a program or data from the CD-ROM 2095 and provides it to the hard disk drive 2040 via the RAM 2020.
 また、入出力コントローラ2084には、ROM2010と、フレキシブルディスク・ドライブ2050、及び入出力チップ2070の比較的低速な入出力装置とが接続される。ROM2010は、コンピュータ1900が起動時に実行するブート・プログラム、及び/又は、コンピュータ1900のハードウェアに依存するプログラム等を格納する。フレキシブルディスク・ドライブ2050は、フレキシブルディスク2090からプログラム又はデータを読み取り、RAM2020を介してハードディスクドライブ2040に提供する。入出力チップ2070は、フレキシブルディスク・ドライブ2050を入出力コントローラ2084へと接続すると共に、例えばパラレル・ポート、シリアル・ポート、キーボード・ポート、マウス・ポート等を介して各種の入出力装置を入出力コントローラ2084へと接続する。 Also, the ROM 2010, the flexible disk drive 2050, and the relatively low-speed input / output device of the input / output chip 2070 are connected to the input / output controller 2084. The ROM 2010 stores a boot program that the computer 1900 executes at startup and / or a program that depends on the hardware of the computer 1900. The flexible disk drive 2050 reads a program or data from the flexible disk 2090 and provides it to the hard disk drive 2040 via the RAM 2020. The input / output chip 2070 connects the flexible disk drive 2050 to the input / output controller 2084 and inputs / outputs various input / output devices via, for example, a parallel port, a serial port, a keyboard port, a mouse port, and the like. Connect to controller 2084.
 RAM2020を介してハードディスクドライブ2040に提供されるプログラムは、フレキシブルディスク2090、CD-ROM2095、又はICカード等の記録媒体に格納されて利用者によって提供される。プログラムは、記録媒体から読み出され、RAM2020を介してコンピュータ1900内のハードディスクドライブ2040にインストールされ、CPU2000において実行される。 The program provided to the hard disk drive 2040 via the RAM 2020 is stored in a recording medium such as the flexible disk 2090, the CD-ROM 2095, or an IC card and provided by the user. The program is read from the recording medium, installed in the hard disk drive 2040 in the computer 1900 via the RAM 2020, and executed by the CPU 2000.
 コンピュータ1900にインストールされ、コンピュータ1900を姿勢算出装置として機能させるプログラムは、第1の姿勢算出モジュール、第2の姿勢算出モジュール、第3の姿勢算出モジュール、決定モジュール、差分算出モジュール、回転軸算出モジュールおよび回転量算出モジュールを備える。これらのプログラム又はモジュールは、CPU2000等に働きかけて、コンピュータ1900を、姿勢算出装置としてそれぞれ機能させる。 A program installed in the computer 1900 and causing the computer 1900 to function as an attitude calculation device includes a first attitude calculation module, a second attitude calculation module, a third attitude calculation module, a determination module, a difference calculation module, and a rotation axis calculation module. And a rotation amount calculation module. These programs or modules work on the CPU 2000 or the like to cause the computer 1900 to function as an attitude calculation device.
 これらのプログラムに記述された情報処理は、コンピュータ1900に読込まれることにより、ソフトウェアと上述した各種のハードウェア資源とが協働した具体的手段である第1の姿勢算出部24、第2の姿勢算出部22、第3の姿勢算出部30、第1の姿勢算出部38、第3の姿勢算出部40、決定部32、差分算出部26、回転軸算出部34および回転量算出部36として機能する。そして、これらの具体的手段によって、本実施形態におけるコンピュータ1900の使用目的に応じた情報の演算又は加工を実現することにより、使用目的に応じた特有の静止判定装置が構築される。 The information processing described in these programs is read into the computer 1900, whereby the first posture calculation unit 24, the second posture, which are specific means in which the software and the various hardware resources described above cooperate. As the posture calculation unit 22, the third posture calculation unit 30, the first posture calculation unit 38, the third posture calculation unit 40, the determination unit 32, the difference calculation unit 26, the rotation axis calculation unit 34, and the rotation amount calculation unit 36 Function. And by these specific means, the calculation or processing of information according to the purpose of use of the computer 1900 in the present embodiment is realized, so that a unique stillness determination device according to the purpose of use is constructed.
 一例として、コンピュータ1900と外部の装置等との間で通信を行う場合には、CPU2000は、RAM2020上にロードされた通信プログラムを実行し、通信プログラムに記述された処理内容に基づいて、通信インターフェイス2030に対して通信処理を指示する。通信インターフェイス2030は、CPU2000の制御を受けて、RAM2020、ハードディスクドライブ2040、フレキシブルディスク2090、又はCD-ROM2095等の記憶装置上に設けた送信バッファ領域等に記憶された送信データを読み出してネットワークへと送信し、もしくは、ネットワークから受信した受信データを記憶装置上に設けた受信バッファ領域等へと書き込む。このように、通信インターフェイス2030は、DMA(ダイレクト・メモリ・アクセス)方式により記憶装置との間で送受信データを転送してもよく、これに代えて、CPU2000が転送元の記憶装置又は通信インターフェイス2030からデータを読み出し、転送先の通信インターフェイス2030又は記憶装置へとデータを書き込むことにより送受信データを転送してもよい。 As an example, when communication is performed between the computer 1900 and an external device or the like, the CPU 2000 executes a communication program loaded on the RAM 2020 and executes a communication interface based on the processing content described in the communication program. A communication process is instructed to 2030. Under the control of the CPU 2000, the communication interface 2030 reads transmission data stored in a transmission buffer area or the like provided on a storage device such as the RAM 2020, the hard disk drive 2040, the flexible disk 2090, or the CD-ROM 2095, and sends it to the network. The reception data transmitted or received from the network is written into a reception buffer area or the like provided on the storage device. As described above, the communication interface 2030 may transfer transmission / reception data to / from the storage device by a DMA (direct memory access) method. Instead, the CPU 2000 transfers the storage device or the communication interface 2030 as a transfer source. The transmission / reception data may be transferred by reading the data from the data and writing the data to the communication interface 2030 or the storage device of the transfer destination.
 また、CPU2000は、ハードディスクドライブ2040、CD-ROMドライブ2060(CD-ROM2095)、フレキシブルディスク・ドライブ2050(フレキシブルディスク2090)等の外部記憶装置に格納されたファイルまたはデータベース等の中から、全部または必要な部分をDMA転送等によりRAM2020へと読み込ませ、RAM2020上のデータに対して各種の処理を行う。そして、CPU2000は、処理を終えたデータを、DMA転送等により外部記憶装置へと書き戻す。このような処理において、RAM2020は、外部記憶装置の内容を一時的に保持するものとみなせるから、本実施形態においてはRAM2020および外部記憶装置等をメモリ、記憶部、または記憶装置等と総称する。本実施形態における各種のプログラム、データ、テーブル、データベース等の各種の情報は、このような記憶装置上に格納されて、情報処理の対象となる。なお、CPU2000は、RAM2020の一部をキャッシュメモリに保持し、キャッシュメモリ上で読み書きを行うこともできる。このような形態においても、キャッシュメモリはRAM2020の機能の一部を担うから、本実施形態においては、区別して示す場合を除き、キャッシュメモリもRAM2020、メモリ、及び/又は記憶装置に含まれるものとする。 The CPU 2000 is all or necessary from among files or databases stored in an external storage device such as a hard disk drive 2040, a CD-ROM drive 2060 (CD-ROM 2095), and a flexible disk drive 2050 (flexible disk 2090). This portion is read into the RAM 2020 by DMA transfer or the like, and various processes are performed on the data on the RAM 2020. Then, CPU 2000 writes the processed data back to the external storage device by DMA transfer or the like. In such processing, since the RAM 2020 can be regarded as temporarily holding the contents of the external storage device, in the present embodiment, the RAM 2020 and the external storage device are collectively referred to as a memory, a storage unit, or a storage device. Various types of information such as various programs, data, tables, and databases in the present embodiment are stored on such a storage device and are subjected to information processing. Note that the CPU 2000 can also store a part of the RAM 2020 in the cache memory and perform reading and writing on the cache memory. Even in such a form, the cache memory bears a part of the function of the RAM 2020. Therefore, in the present embodiment, the cache memory is also included in the RAM 2020, the memory, and / or the storage device unless otherwise indicated. To do.
 また、CPU2000は、RAM2020から読み出したデータに対して、プログラムの命令列により指定された、本実施形態中に記載した各種の演算、情報の加工、条件判断、情報の検索・置換等を含む各種の処理を行い、RAM2020へと書き戻す。例えば、CPU2000は、条件判断を行う場合においては、本実施形態において示した各種の変数が、他の変数または定数と比較して、大きい、小さい、以上、以下、等しい等の条件を満たすかどうかを判断し、条件が成立した場合(又は不成立であった場合)に、異なる命令列へと分岐し、またはサブルーチンを呼び出す。 In addition, the CPU 2000 performs various operations, such as various operations, information processing, condition determination, information search / replacement, etc., described in the present embodiment, specified for the data read from the RAM 2020 by the instruction sequence of the program. Is written back to the RAM 2020. For example, when performing the condition determination, the CPU 2000 determines whether or not the various variables shown in the present embodiment satisfy the conditions such as large, small, above, below, equal, etc., compared to other variables or constants. When the condition is satisfied (or not satisfied), the program branches to a different instruction sequence or calls a subroutine.
 また、CPU2000は、記憶装置内のファイルまたはデータベース等に格納された情報を検索することができる。例えば、第1属性の属性値に対し第2属性の属性値がそれぞれ対応付けられた複数のエントリが記憶装置に格納されている場合において、CPU2000は、記憶装置に格納されている複数のエントリの中から第1属性の属性値が指定された条件と一致するエントリを検索し、そのエントリに格納されている第2属性の属性値を読み出すことにより、所定の条件を満たす第1属性に対応付けられた第2属性の属性値を得ることができる。 Further, the CPU 2000 can search for information stored in a file or database in the storage device. For example, in the case where a plurality of entries in which the attribute value of the second attribute is associated with the attribute value of the first attribute are stored in the storage device, the CPU 2000 displays the plurality of entries stored in the storage device. The entry that matches the condition in which the attribute value of the first attribute is specified is retrieved, and the attribute value of the second attribute that is stored in the entry is read, thereby associating with the first attribute that satisfies the predetermined condition The attribute value of the specified second attribute can be obtained.
 以上に示したプログラム又はモジュールは、外部の記録媒体に格納されてもよい。記録媒体としては、フレキシブルディスク2090、CD-ROM2095の他に、DVD又はCD等の光学記録媒体、MO等の光磁気記録媒体、テープ媒体、ICカード等の半導体メモリ等を用いることができる。また、専用通信ネットワーク又はインターネットに接続されたサーバシステムに設けたハードディスク又はRAM等の記憶装置を記録媒体として使用し、ネットワークを介してプログラムをコンピュータ1900に提供してもよい。 The program or module shown above may be stored in an external recording medium. As the recording medium, in addition to the flexible disk 2090 and the CD-ROM 2095, an optical recording medium such as DVD or CD, a magneto-optical recording medium such as MO, a tape medium, a semiconductor memory such as an IC card, and the like can be used. Further, a storage device such as a hard disk or RAM provided in a server system connected to a dedicated communication network or the Internet may be used as a recording medium, and the program may be provided to the computer 1900 via the network.
 以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、請求の範囲の記載から明らかである。 As mentioned above, although this invention was demonstrated using embodiment, the technical scope of this invention is not limited to the range as described in the said embodiment. It will be apparent to those skilled in the art that various modifications or improvements can be added to the above-described embodiment. It is apparent from the scope of the claims that the embodiments added with such changes or improvements can be included in the technical scope of the present invention.
 請求の範囲、明細書、および図面中において示した装置、システム、プログラム、および方法における動作、手順、ステップ、および段階等の各処理の実行順序は、特段「より前に」、「先立って」等と明示しておらず、また、前の処理の出力を後の処理で用いるのでない限り、任意の順序で実現しうることに留意すべきである。請求の範囲、明細書、および図面中の動作フローに関して、便宜上「まず、」、「次に、」等を用いて説明したとしても、この順で実施することが必須であることを意味するものではない。 The execution order of each process such as operations, procedures, steps, and stages in the apparatus, system, program, and method shown in the claims, the description, and the drawings is particularly “before” or “prior”. It should be noted that they can be implemented in any order unless the output of the previous process is used in the subsequent process. Regarding the operation flow in the claims, the description, and the drawings, even if it is described using “first”, “next”, etc. for the sake of convenience, it means that it is essential to carry out in this order. is not.
10・・・地磁気検出部、12・・・加速度検出部、14・・・角速度検出部、16・・・オフセット除去部、18・・・静止判定部、20・・・姿勢算出部、22・・・第2の姿勢算出部、24・・・第1の姿勢算出部、26・・・差分算出部、28・・・係数算出部、30・・・第3の姿勢算出部、32・・・決定部、34・・・回転軸算出部、36・・・回転量算出部、38・・・第1の姿勢算出部、40・・・第3の姿勢算出部、100・・・姿勢算出装置、200・・・携帯機器、1900・・・コンピュータ、2000・・・CPU、2010・・・ROM、2020・・・RAM、2030・・・通信インターフェイス、2040・・・ハードディスクドライブ、2050・・・フレキシブルディスク・ドライブ、2060・・・CD-ROMドライブ、2070・・・入出力チップ、2075・・・グラフィック・コントローラ、2080・・・表示装置、2082・・・ホスト・コントローラ、2084・・・入出力コントローラ、2090・・・フレキシブルディスク、2095・・・CD-ROM DESCRIPTION OF SYMBOLS 10 ... Geomagnetic detection part, 12 ... Acceleration detection part, 14 ... Angular velocity detection part, 16 ... Offset removal part, 18 ... Stillness determination part, 20 ... Attitude calculation part, 22. .. second posture calculation unit, 24... First posture calculation unit, 26... Difference calculation unit, 28... Coefficient calculation unit, 30.・ Determining unit 34... Rotating axis calculating unit 36... Rotation amount calculating unit 38... First posture calculating unit 40. 200, portable device, 1900 ... computer, 2000 ... CPU, 2010 ... ROM, 2020 ... RAM, 2030 ... communication interface, 2040 ... hard disk drive, 2050 ...・ Flexible disk drive, 2060 ・CD-ROM drive, 2070 ... input / output chip, 2075 ... graphic controller, 2080 ... display device, 2082 ... host controller, 2084 ... input / output controller, 2090 ... flexible Disc, 2095 ... CD-ROM

Claims (14)

  1.  機器に搭載され、前記機器の角速度を検出する角速度検出部の出力に基づいて前記機器の第1の姿勢を算出する第1の姿勢算出部と、
     前記第1の姿勢算出部と異なる手段で前記機器の第2の姿勢を算出する第2の姿勢算出部と、
     前記第1の姿勢と、前記第2の姿勢と、前記機器の回転情報と、に基づき、第3の姿勢を算出する第3の姿勢算出部と、
     を備える姿勢算出装置。
    A first attitude calculation unit that is mounted on a device and calculates a first attitude of the device based on an output of an angular velocity detection unit that detects an angular velocity of the device;
    A second attitude calculation unit that calculates a second attitude of the device by means different from the first attitude calculation unit;
    A third attitude calculation unit that calculates a third attitude based on the first attitude, the second attitude, and the rotation information of the device;
    An attitude calculation device comprising:
  2.  前記第3の姿勢算出部は、
     単位時間当たりの前記機器の回転量が小さいほど、前記第1の姿勢に対する差分が小さくなる前記第3の姿勢を算出し、単位時間当たりの前記機器の回転量が大きいほど、前記第2の姿勢に対する差分が小さくなる前記第3の姿勢を算出する
     請求項1に記載の姿勢算出装置。
    The third posture calculation unit
    The third posture is calculated such that the difference with respect to the first posture is smaller as the rotation amount of the device per unit time is smaller, and the second posture is larger as the rotation amount of the device per unit time is larger. The posture calculation apparatus according to claim 1, wherein the third posture is calculated such that a difference with respect to is small.
  3.  前記第2の姿勢算出部は、
     前記機器に搭載された地磁気検出部及び加速度検出部の少なくとも一方の出力に基づいて前記第2の姿勢を算出する
     請求項1又は2に記載の姿勢算出装置。
    The second posture calculation unit
    The posture calculation apparatus according to claim 1, wherein the second posture is calculated based on an output of at least one of a geomagnetism detection unit and an acceleration detection unit mounted on the device.
  4.  前記第3の姿勢出力部は、
     前記地磁気検出部または加速度検出部の出力に基づいて、前記第3の姿勢を出力するか否かを決定し、前記第3の姿勢を出力しない場合は、前記第1の姿勢を出力する
     請求項3に記載の姿勢算出装置。
    The third posture output unit includes:
    The system determines whether or not to output the third posture based on the output of the geomagnetism detection unit or the acceleration detection unit, and outputs the first posture when the third posture is not output. 4. The posture calculation apparatus according to 3.
  5.  前記第1の姿勢算出部は、前記第2の姿勢算出部よりも短い周期で前記機器の姿勢を算出する
     請求項1から4の何れか1項に記載の姿勢算出装置。
    The posture calculation apparatus according to any one of claims 1 to 4, wherein the first posture calculation unit calculates the posture of the device at a shorter cycle than the second posture calculation unit.
  6.  前記第1の姿勢算出部は、前記角速度検出部の出力を累積して前記第1の姿勢を算出する
     請求項1から5の何れか1項に記載の姿勢算出装置。
    The posture calculation apparatus according to any one of claims 1 to 5, wherein the first posture calculation unit calculates the first posture by accumulating outputs of the angular velocity detection unit.
  7.  前記機器の回転情報に基づいて、前記第1の姿勢と前記第2の姿勢とを組み合わせる割合を動的に決定する決定部を更に備え、
     前記第3の姿勢算出部は、
     前記第1の姿勢と、前記第2の姿勢と、前記決定部が決定した割合と、に基づいて、第3の姿勢を算出する
     請求項1から6の何れか1項に記載の姿勢算出装置。
    A determination unit that dynamically determines a ratio of combining the first posture and the second posture based on rotation information of the device;
    The third posture calculation unit
    The posture calculation device according to any one of claims 1 to 6, wherein a third posture is calculated based on the first posture, the second posture, and the ratio determined by the determination unit. .
  8.  前記決定部は、
     単位時間当たりの前記機器の回転量が大きいほど前記第2の姿勢の割合が大きく、単位時間当たりの前記機器の回転量が小さいほど前記第2の姿勢の割合が小さくなるように前記割合を動的に決定する
     請求項7に記載の姿勢算出装置。
    The determination unit
    The ratio of the second posture is larger as the amount of rotation of the device per unit time is larger, and the proportion of the second posture is smaller as the amount of rotation of the device per unit time is smaller. The posture calculation apparatus according to claim 7.
  9.  前記第1の姿勢と前記第2の姿勢との差分を算出する差分算出部を更に備え、
     前記第3の姿勢算出部は、
     前記第1の姿勢及び前記第2の姿勢の少なくとも一方と、前記第1の姿勢と前記第2の姿勢との差分と、前記決定部が決定した割合と、に基づいて、前記第3の姿勢を算出する
     請求項7又は8に記載の姿勢算出装置。
    A difference calculation unit for calculating a difference between the first posture and the second posture;
    The third posture calculation unit
    The third posture based on at least one of the first posture and the second posture, a difference between the first posture and the second posture, and a ratio determined by the determination unit. The posture calculation apparatus according to claim 7 or 8.
  10.  前記第1の姿勢から前記第2の姿勢への回転軸を算出する回転軸算出部
    を更に備え、
     前記第3の姿勢算出部は、
     前記第1の姿勢に対して、前記回転軸算出部が算出した前記回転軸に、前記機器の回転量を適用して、前記第3の姿勢を算出する
     請求項1から6の何れか1項に記載の姿勢算出装置。
    A rotation axis calculator that calculates a rotation axis from the first attitude to the second attitude;
    The third posture calculation unit
    7. The third posture is calculated by applying a rotation amount of the device to the rotation axis calculated by the rotation axis calculation unit with respect to the first posture. The posture calculation device described in 1.
  11.  前記第3の姿勢算出部は、
     1単位時間前の前記第1の姿勢に対して、前記回転軸算出部が算出した前記回転軸に、前記機器の回転量を適用して、前記第3の姿勢を算出する
     請求項10に記載の姿勢算出装置。
    The third posture calculation unit
    The third posture is calculated by applying a rotation amount of the device to the rotation axis calculated by the rotation axis calculation unit with respect to the first posture one unit time before. Attitude calculation device.
  12.  請求項1から11のいずれか1項に記載の姿勢算出装置を備える携帯機器。 A portable device comprising the posture calculation device according to any one of claims 1 to 11.
  13.  機器に搭載され、前記機器の角速度を検出する角速度検出部の出力に基づいて前記機器の第1の姿勢を算出する第1の姿勢算出段階と、
     前記第1の姿勢算出段階と異なる手段で前記機器の第2の姿勢を算出する第2の姿勢算出段階と、
     前記第1の姿勢と、前記第2の姿勢と、前記機器の回転情報と、に基づき、第3の姿勢を算出する第3の姿勢算出段階と、
     を備える姿勢算出方法。
    A first posture calculating step of calculating a first posture of the device based on an output of an angular velocity detection unit mounted on the device and detecting an angular velocity of the device;
    A second posture calculating step of calculating a second posture of the device by means different from the first posture calculating step;
    A third posture calculating step for calculating a third posture based on the first posture, the second posture, and the rotation information of the device;
    An attitude calculation method comprising:
  14.  コンピュータを、請求項1から11のいずれか1項に記載の姿勢算出装置として機能させるプログラム。 A program that causes a computer to function as the posture calculation device according to any one of claims 1 to 11.
PCT/JP2014/000704 2013-02-13 2014-02-10 Attitude calculating apparatus, attitude calculating method, portable apparatus, and program WO2014125809A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015500143A JP6209581B2 (en) 2013-02-13 2014-02-10 Attitude calculation device, attitude calculation method, portable device, and program

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2013025651 2013-02-13
JP2013-025651 2013-02-13
JP2013-025661 2013-02-13
JP2013025661 2013-02-13

Publications (1)

Publication Number Publication Date
WO2014125809A1 true WO2014125809A1 (en) 2014-08-21

Family

ID=51353822

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/000704 WO2014125809A1 (en) 2013-02-13 2014-02-10 Attitude calculating apparatus, attitude calculating method, portable apparatus, and program

Country Status (2)

Country Link
JP (1) JP6209581B2 (en)
WO (1) WO2014125809A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016211947A (en) * 2015-05-08 2016-12-15 株式会社Nttドコモ Rotating condition calculation device
JP2016211946A (en) * 2015-05-08 2016-12-15 株式会社Nttドコモ Rotating condition calculation device
JP2017513130A (en) * 2014-12-09 2017-05-25 ベイジン ギャラクシー ライタイ テクノロジー カンパニー リミテッド Wearable device wear state processing method and apparatus
KR20200072094A (en) * 2018-12-12 2020-06-22 건국대학교 산학협력단 Method and apparatus for determining attitude angle of rotating body
CN113100897A (en) * 2021-04-20 2021-07-13 电子科技大学 Intelligent external fixing clamp for monitoring spinal rehabilitation state and monitoring method
US11994676B2 (en) 2019-01-28 2024-05-28 Magic Leap, Inc. Method and system for resolving hemisphere ambiguity in six degree of freedom pose measurements

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0821732A (en) * 1994-07-05 1996-01-23 Data Tec:Kk Attitude, azimuth, and position measuring apparatus
JPH1185387A (en) * 1997-09-12 1999-03-30 Ricoh Co Ltd Posture input device, pen type input device with posture input function, and pen type input system with pen type input device
JP2008077661A (en) * 2006-09-19 2008-04-03 Samsung Electronics Co Ltd Input device and method for providing movement information of input device
JP2010020554A (en) * 2008-07-10 2010-01-28 Nintendo Co Ltd Information processing program and information processor
JP2010170327A (en) * 2009-01-22 2010-08-05 Olympus Corp Operational inputting device
JP2010259642A (en) * 2009-05-08 2010-11-18 Nintendo Co Ltd Posture calculation device and posture calculation program
JP2013015435A (en) * 2011-07-05 2013-01-24 Aichi Micro Intelligent Corp Magnetic gyro
JP2014038588A (en) * 2012-07-20 2014-02-27 Nintendo Co Ltd Information processing system, information processing device, information processing program, and information processing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2140916B1 (en) * 2008-06-30 2018-10-31 Nintendo Co., Ltd. Coordinate calculation apparatus and storage medium having coordinate calculation program stored therein
JP2010169595A (en) * 2009-01-23 2010-08-05 Toyota Motor Corp Method of measuring displacement amount of engine mount
JP5463790B2 (en) * 2009-08-18 2014-04-09 ソニー株式会社 Operation input system, control device, handheld device, and operation input method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0821732A (en) * 1994-07-05 1996-01-23 Data Tec:Kk Attitude, azimuth, and position measuring apparatus
JPH1185387A (en) * 1997-09-12 1999-03-30 Ricoh Co Ltd Posture input device, pen type input device with posture input function, and pen type input system with pen type input device
JP2008077661A (en) * 2006-09-19 2008-04-03 Samsung Electronics Co Ltd Input device and method for providing movement information of input device
JP2010020554A (en) * 2008-07-10 2010-01-28 Nintendo Co Ltd Information processing program and information processor
JP2010170327A (en) * 2009-01-22 2010-08-05 Olympus Corp Operational inputting device
JP2010259642A (en) * 2009-05-08 2010-11-18 Nintendo Co Ltd Posture calculation device and posture calculation program
JP2013015435A (en) * 2011-07-05 2013-01-24 Aichi Micro Intelligent Corp Magnetic gyro
JP2014038588A (en) * 2012-07-20 2014-02-27 Nintendo Co Ltd Information processing system, information processing device, information processing program, and information processing method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017513130A (en) * 2014-12-09 2017-05-25 ベイジン ギャラクシー ライタイ テクノロジー カンパニー リミテッド Wearable device wear state processing method and apparatus
KR101838838B1 (en) * 2014-12-09 2018-03-14 베이징 갤럭시 레인타이 테크놀로지 씨오., 엘티디., Method and apparatus for processing wearing state of wearable device
EP3232298A4 (en) * 2014-12-09 2018-07-11 Beijing Galaxy Raintai Technology Co., Ltd. Method and apparatus for processing wearing state of wearable device
JP2016211947A (en) * 2015-05-08 2016-12-15 株式会社Nttドコモ Rotating condition calculation device
JP2016211946A (en) * 2015-05-08 2016-12-15 株式会社Nttドコモ Rotating condition calculation device
KR20200072094A (en) * 2018-12-12 2020-06-22 건국대학교 산학협력단 Method and apparatus for determining attitude angle of rotating body
KR102127052B1 (en) * 2018-12-12 2020-06-25 건국대학교 산학협력단 Method and apparatus for determining attitude angle of rotating body
US11994676B2 (en) 2019-01-28 2024-05-28 Magic Leap, Inc. Method and system for resolving hemisphere ambiguity in six degree of freedom pose measurements
CN113100897A (en) * 2021-04-20 2021-07-13 电子科技大学 Intelligent external fixing clamp for monitoring spinal rehabilitation state and monitoring method

Also Published As

Publication number Publication date
JP6209581B2 (en) 2017-10-04
JPWO2014125809A1 (en) 2017-02-02

Similar Documents

Publication Publication Date Title
JP6209581B2 (en) Attitude calculation device, attitude calculation method, portable device, and program
US20070171202A1 (en) Trajectory estimation apparatus, method, and medium for estimating two-dimensional trajectory of gesture
JP4860697B2 (en) Acceleration sensor correction apparatus and acceleration sensor output value correction method
JP2005011341A (en) Spatial input device and method thereof
JP2006227008A (en) Inertial sensor correcting device and method, and recording medium on which that method is recorded
CN110096134B (en) VR handle ray jitter correction method, device, terminal and medium
WO2016056259A1 (en) Gesture input system data processing method
WO2014129166A1 (en) Carry-state determination device and program
US20190316939A1 (en) Rotational angle detection apparatus and rotational angle detection method
JP2001100908A (en) Pen tip trace generating method, pen type input device, and pen mounting unit
TW201314497A (en) Inertial sensing input apparatus, system and method thereof
CN108287607B (en) Method for controlling visual angle of HMD (HMD) and head-mounted display equipment
JP6154883B2 (en) Stillness determination device, posture angle detection device, portable device, stillness determination method, and program
KR101870542B1 (en) Method and apparatus of recognizing a motion
WO2014129169A1 (en) Carry-state change detection device, carry-state change detection method, and program
JP3678386B2 (en) Pen-type input device
JP3710603B2 (en) Pen-type input device
CN109408252B (en) Data transmission method, device and medium
KR20230030472A (en) Method for creating user defined gesture profile based on user's repetitive motion and recognizing gesture
CN111489376A (en) Method and device for tracking interactive equipment, terminal equipment and storage medium
US10558270B2 (en) Method for determining non-contact gesture and device for the same
CN108731675B (en) Measuring method and measuring device for course variation of object to be positioned and electronic equipment
US10936147B2 (en) Tablet computing device with display dock
CN113721777B (en) Control method and device of mouse pointer, electronic equipment and storage medium
EP4375618A1 (en) Dynamic gravity vector estimation for memory constrained devices

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14752064

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2015500143

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14752064

Country of ref document: EP

Kind code of ref document: A1