This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2008-244781, filed on Sep. 24, 2008, the entire contents of which are incorporated herein by reference.
A certain aspect of the embodiments discussed herein is related to an orientation detection method and apparatus, and a movement record computing apparatus.
There has been conventionally known an art installing a triaxial acceleration sensor and a triaxial orientation sensor (a geomagnetic sensor) in a portable device such as a cell phone, correcting a geomagnetic value detected by the orientation sensor based on an inclined angle of the portable device calculated from an output of the acceleration sensor, and computing the orientation with the corrected value, as is disclosed in Japanese Laid-open Patent Publication Nos. 08-278137 and 2004-286732.
According to the art disclosed in Japanese Laid-open Patent Publication Nos. 08-278137 and 2004-286732, the orientation sensor is horizontally installed to the portable device, and a program for outputting the orientation (an orientation output program) outputs the orientation to which a reference position 510 of a portable device 500 illustrated in
More specifically, when the reference position 510 (a head position) of the portable device 500 heads north as illustrated in
According to an aspect of the present invention, there is provided an orientation detection method including: detecting a direction of an orientation determination element outside of a portable device with a direction detection device under the condition that a position of the portable device is fixed; determining a standard orientation of the portable device based on the result of the detection and the position of the portable device; computing a present orientation of the portable device based on both a result of a re-detection of the direction of the orientation decision element with the direction detection device and the position of the portable device after the determination of the standard orientation; and detecting an angle between the present orientation and the standard orientation.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
As described above, according to related arts, when the portable device 500 is inclined at an angle of δ degrees to a horizontal surface as illustrated in
Therefore, when the reference position (the head position) of the portable device heads to a vertical direction that is to say straight up and down directions, the orientation output program of related arts cannot output the orientation or the angle because the horizontal component of the reference position of the portable device does not exist.
For example, when a user carrying the portable device moves (walks) for a long time, the user moves holding the portable device in a device holder mounted to his or her waist or in his or her pocket more often than holding the portable device in his or her hand. However, if the related arts are simply applied, the orientation and the angle cannot be outputted, because the portable device in the holder or in the pocket often heads straight up and down.
It is also possible to acquire the user's movement record with a GPS function when the GPS function is implemented to the portable device. However, in this case, it is required to make the GPS function work all the time or at arbitrary short time interval. Therefore, using the GPS function is an unsuitable method for acquiring the movement record for a long time because it consumes relatively high electrical power. Then, a method for acquiring the movement record of the user carrying the portable device by acquiring changes in the orientation of the movement direction of the device acquired by the orientation output program like related arts is thought. But as described above, it is difficult to acquire the user's movement record, because the orientation output program according to the related arts cannot output the orientation and the angle when the portable device is in the pocket or in the device holder.
A description will now be given of embodiments of the present invention with reference to the accompanying drawings.
A configuration of a cell phone 100 in accordance with an embodiment of the present invention is illustrated with a block diagram in
The triaxial acceleration sensor 10 detects accelerations of triaxial directions. An acceleration value A detected by the triaxial acceleration sensor 10 is outputted to the movement record computing apparatus 16 (a user walk detection unit 20, a step count unit 32, and a inclined angle calculation unit 40).
A magnetic orientation sensor, which can detect a geomagnetic value in the triaxial reference system, is used as the triaxial geomagnetic sensor 12. The geomagnetic value H detected by the triaxial geomagnetic sensor 12 is outputted to the movement record computing apparatus 16 (a geomagnetic value acquisition unit 42 ).
The input unit 14 includes input buttons and touch panels, and instructions from users are inputted via the input unit 14. The instructions from the users in this embodiment contain setting/cancellation of the movement record acquisition mode.
The movement record computing apparatus 16 includes the user walk detection unit 20, a device condition detection unit 22, a movement distance measurement device 24, an orientation detection apparatus 26, and a movement record computing and a store device 28.
The user walk detection unit 20 detects whether or not the user is walking based on the acceleration value A input from the triaxial acceleration sensor 10. This is disclosed in Japanese Laid-opened Patent Publication No. 2008-171347.
The device condition detection unit 22 detects whether or not the mode to acquire the movement record (the movement record acquisition mode) is set. In this embodiment, the user sets the movement record acquisition mode via the input unit 14. Thus, the device condition detection unit 22 determines whether the movement record acquisition mode is set or not by detecting the input from the user.
The movement distance measurement device 24 includes the step count unit 32 as a step detection unit, and a distance calculation unit 34.
The step count unit 32 counts the number of the user's step based on the acceleration value A input from the triaxial acceleration sensor 10 as an ordinal pedometer counts. This is disclosed in Japanese Laid-opened Patent Publication No. 2008-171347 mentioned before. The distance calculation unit 34 stores a stride length preliminarily inputted by the user via the input unit 14, and calculates the movement distance by multiplying the stride length by the number of the step counted by the step count unit 32. This calculation result by the distance calculation unit 34 is outputted to the movement record computing and store device 28.
The orientation detection apparatus 26 includes an inclined angle calculation unit 40, a geomagnetic value acquisition unit 42, an orientation vector calculation unit 44 as an orientation computing unit, a standard orientation vector store unit 46, and a difference angle calculation unit 48 as a relative angle calculation unit.
The inclined angle calculation unit 40 calculates an inclined angle based on the acceleration input from the triaxial acceleration sensor 10. A calculation method of the inclined angle is described below.
The geomagnetic value acquisition unit 42 acquires the geomagnetic value H input from the triaxial geomagnetic sensor 12.
The orientation vector calculation unit 44 calculates an orientation vector D with the inclined angle of the cell phone 100 calculated by the inclined angle calculation unit 40 and the geomagnetic value H acquired by the geomagnetic value acquisition unit 42. A calculation method of the orientation vector is described below.
The standard orientation vector store unit 46 stores one of the orientation vector D as “the standard orientation vector”.
The difference angle calculation unit 48 calculates the angle between the standard orientation vector, which is stored in the standard orientation vector store unit 46, and another orientation vector (a relative orientation), and outputs it to the movement record computing and store device 28.
The movement record computing and store device 28 includes the movement record computing unit 50 and the movement record store unit 52.
The movement record computing unit 50 computes the movement record with the movement distance of the user calculated by the distance calculation unit 34 and the relative orientation calculated by the difference angle calculation unit 48. In this case, the movement record information such as “moved q meter to the p+ direction from the standard orientation” is computed. This computing result is sent to the movement record store unit 52, and the movement record store unit 52 acquires and stores the movement record.
The display unit 18 contains a liquid crystal display or an organic light emitting display, and displays the movement record stored in the movement record store unit 52 according to a display instruction from the user. The display unit 18 displays various information to fulfill various functions that the cell phone 100 has.
Now the description of the specific process that the movement record computing apparatus 16 configured as described above executes will be given referring to flowcharts illustrated in
In the step S10 in
In the step S12, a subroutine of the orientation acquisition process is executed. In this subroutine of the orientation acquisition process, the device condition detection unit 22 determines whether the position of the device (the cell phone 100) is fixed in the step S20 as illustrated in
When the determination of the step S20 is YES, the process goes to the step S22 and the device condition detection unit 22 determines whether the previous condition of the cell phone 100 was the fixed condition. When the determination of the step S22 is NO, the process goes to the step S24, and the inclined angle calculation unit 40 acquires the acceleration value A from the triaxial acceleration sensor 10 and calculates the inclined angle. When the inclined angle is calculated, an X-Y-Z coordinate system, of which an X-Y coordinate system is a virtual horizontal surface that is parallel to a ground, is set. In this case, both axes of X and Y can face in any direction if they are at right angles to each other.
The acceleration value A acquired by the triaxial acceleration sensor is expressed in the following formula (1).
Thus, define gravity acceleration as g, and a gravity vector G as the following formula (2).
Set the X-Y-Z coordinate system, of which the X-Y coordinate system is a virtual horizontal surface that is parallel to the ground, to the cell phone 100. When the inclined angles with respect to the horizontal surface of the cell phone 100 are defined as a pitch angle β and a roll angle α, the relationship among A, G, β and α is expressed in the following formula (3).
According to the formula (3), the pitch angle β and the roll angle α are expressed in the following formulas (4) and (5).
By using the formulas above, in the step S24, the inclined angle (the pitch angle β and the roll angle α) can be calculated.
In the next step S26, the geomagnetic value acquisition unit 42 acquires the geomagnetic value H, which is expressed in the following formula (6), from the triaxial geomagnetic sensor 12.
The orientation vector calculation unit 44 acquires the horizontal component of the geomagnetic value H (the orientation vector D) with the inclined angles β and α calculated in the step S24.
More specifically, the orientation vector calculation unit 44 corrects the geomagnetic value H with the inclined angle P and a according to the following formula (7) and acquires the corrected geomagnetic value H′.
The component in the horizontal surface of this corrected geomagnetic field H′ is defined as the orientation vector D expressed in the following formula (8).
{right arrow over (D)}=(x0,y0)=(Hx′,Hy′) (8)
In this case, for example, as illustrated in the
Back to
When the standard orientation vector D0 is determined as described above, the process goes to the step S14 in
In this movement distance acquisition processing subroutine, in the step S44 of
In the step S16 of
Then, in the step S18, the movement record that the movement record computing unit 50 acquires in the step S16 is stored in the movement record store unit 52, and the process returns to the step S10.
When the determination in the step S10 is YES, the orientation acquisition processing subroutine in the step S12 is reexecuted. In this subroutine, when the determination in the step S20 is YES (because the fixed condition is locked in the cell phone 100), in the step S22 whether the previous condition of the device was the fixed condition is determined.
In this case, the determination in the step S22 is YES because the previous condition of the device was the fixed condition, and the process goes to the step S30. In this step S30, the inclined angle calculation unit 40 acquires the acceleration value A from the triaxial acceleration sensor 10 and calculates the inclined angle (α, β) on the X-Y-Z coordinate system set in the step S24, with the same method as the step S24 described above. In the step S32, the geomagnetic value acquisition unit 42 acquires the geomagnetic value H from the triaxial geomagnetic sensor 12 and acquires the horizontal component of the geomagnetic value H (the corrected geomagnetic value H′) (the orientation vector D) by using the inclined angle (α, β) calculated in the step S30, with the same method as the step S26 described above.
Then, in the step S34, the difference angle calculation unit 48 calculates the angle between the orientation vector D acquired in the step S32 (hereinafter called “the present orientation vector D1”) and the standard orientation vector D0 (the relative azimuth of the present orientation vector D1 by reference to the standard orientation vector D0) as described below. In the
Define the standard orientation vector and the present orientation vector as D0=(x0, y0) and D1=(x1, y1) respectively. Then, an outer product of the vectors D0 and D1 and an inner product of the vectors D0 and D1 are expressed in the following formulas (9) and (10).
inner product=(x0*y1)−(y0*x1) (9)
outer product=(x0*x1)+(y0*y1) (10)
Therefore, the relative azimuth φ is calculated with the following formula (11).
φ=arctan((x0*y1−y0*x1)/(x0*x1+y0*y1)) (11)
Accordingly, in the step S34, the relative azimuth φ is calculated with the formula (11), and the process goes to the step S14 in
Then, in the step S18, the movement record computing unit 50 sends the movement record acquired in the step S16 to the movement record store unit 52, and the process returns to the step S10.
The loop, which is the step S10→the step S12 (the step S20→S22→S30→S32→S34 in FIG. 3)→the step S14 (the step S44→S46 in FIG. 6)→the step S16→the step S18 in the
Both the migration pathway after starting to move from the starting post S and the movement distance can be acquired by integrating (combining) the movement records acquired with the process described above as illustrated in
In this embodiment, the migration pathway that is the turned migration pathway illustrated in
When the fixed condition of the cell phone 100 is released (when the set of the movement record acquisition mode is cancelled), the determination in the step S20 (
In this step S38, whether the previous condition was the fixed condition is determined. When the determination in the step S38 is YES, the standard vector D0 is cleared in the step S40. Additionally, the X-Y-Z axis set in the step S24 is cleared. When the determination in the step S38 is NO, the process goes to the step S14, and waits until the cell phone 100 becomes the fixed condition (until the movement record acquisition mode is set).
In this embodiment, instead of an X-Y-Z axis fixed to the device, an X-Y-Z axis of which an X-Y coordinate system is the virtual horizontal surface that is parallel to the ground is set each time the standard orientation vector is calculated. The process to compute the orientation with the inclined angle (the pitch angle, the roll angle) is executed by assuming the condition that the device rotates in the axis. Therefore, it is possible to calculate the relative azimuth φ based on the standard orientation vector regardless of the position of the cell phone 100. The X-Y axis set when the standard orientation vector is calculated can be the axis that directs a different orientation every time if the X-Y plane is the virtual surface that is parallel to the ground. For example, it is allowed that an X axis may be set to the magnetic north when the standard orientation vector is calculated first and an X axis may be set to east inclined 30 degree from the magnetic north, which is a different orientation from the orientation of the X axis set first when the standard orientation vector is calculated a second time.
As described in detail above, according to this embodiment, the standard orientation vector D0 of the cell phone 100 is determined based on the result of the geomagnetic detection (the geomagnetic value H) by the triaxial geomagnetic sensor 12 and the position of the cell phone 100 (the roll angle α, the pitch angle β) under the condition that the position of the cell phone 100 is fixed. After that, the angle between the present orientation vector D1 of the cell phone 100, which is calculated based on the result of the geomagnetic re-detection (the geomagnetic value H) by the triaxial geomagnetic sensor 12 and the position of the cell phone 100 (the roll angle α, the pitch angle β), and the standard orientation vector D0 (the relative azimuth) φ is detected. Therefore, regardless of the position of the cell phone 100, the relative angle of the cell phone 100 by reference to the standard orientation vector D0 can be detected. It means that with the known arts, the orientation cannot be measured when the cell phone 100 of which the reference position is the top of the device points to the vertical direction as illustrated in
Additionally, according to this embodiment, the movement record computing is easy because the user's movement record is computed based on the angle between the standard orientation vector D0 and the present orientation vector D1 of the cell phone 100 (the relative azimuth) φ and the number of a user's step. In this case, power consumption can be reduced because the device such as GPS is not used (the triaxial geomagnetic sensor and the triaxial acceleration sensor are used).
Although in the above embodiment the determination in the step S20 of
Additionally, for example, the fixed condition can be determined when the condition of the cell phone 100 becomes the condition described below, and after that the fixed condition is locked (kept) till the user takes a cancel action. The fixed condition may be determined, for example; (1) when the change of the geomagnetic value per unit time is equal or less than the threshold value; (2) when the change of the output value from the acceleration sensor per unit time is equal or less than the threshold value; (3) when the condition that the change of the geomagnetic value per unit time is equal or less than the threshold value continues for more than a certain period of time; (4) when the start of walk is detected (when the step count unit 32 outputs the number of the step); (5) when the start of walk is detected and the change of the geomagnetic value per unit time is equal or less than the threshold value; or (6) when the start of walk is detected and the condition that the change of the geomagnetic value per unit time is equal or less than the threshold value continues for more than a certain period of time.
The element to determine the orientation is not limited to this embodiment although the case to use the geomagnetism as the element to determine the orientation is described in the above embodiment. For example, radio waves transmitted by a radio wave transmitter or infrared rays transmitted by an infrared ray transmitter can be used as the element to decide the orientation. In this case, for example, by mounting the orientation detection device and the movement record calculation device of the present invention on a self-propelled robot, the movement record and the movement direction (the relative azimuth based on the standard orientation) of the robot can be acquired. According to this case, a control of the robot can be easily done with the movement record and the movement direction acquired.
Although in the above embodiment the case that the movement record computing apparatus of the present invention is mounted on the cell phone 100, it is possible to mount the movement record computing apparatus on other mobile device such as a PDA (Personal Digital Assistant) and a smart phone. Additionally, although in the above embodiment the movement record computing apparatus contains the orientation detection device 26 and the movement distance measurement device 24 that measures movement distance based on the number of the step, the configuration of the movement record computing apparatus is not limited to the above embodiment. For example, the movement record computing apparatus can be composed of the orientation detection apparatus 26 and a car-mounted meter device that can acquire the movement distance.
The orientation detection device and the movement record computing apparatus in the above embodiment can be composed of a combination of a plurality of devices that are corresponding to each unit in
All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiment of the present invention has been described in detail, it should be understood that the various change, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2008-244781 | Sep 2008 | JP | national |