CN108007433A - A kind of terminal determines the method and terminal at inclination angle - Google Patents

A kind of terminal determines the method and terminal at inclination angle Download PDF

Info

Publication number
CN108007433A
CN108007433A CN201711117548.4A CN201711117548A CN108007433A CN 108007433 A CN108007433 A CN 108007433A CN 201711117548 A CN201711117548 A CN 201711117548A CN 108007433 A CN108007433 A CN 108007433A
Authority
CN
China
Prior art keywords
terminal
component
acceleration
acceleration information
inclination angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711117548.4A
Other languages
Chinese (zh)
Inventor
赵临虎
张兰鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201711117548.4A priority Critical patent/CN108007433A/en
Publication of CN108007433A publication Critical patent/CN108007433A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C9/00Measuring inclination, e.g. by clinometers, by levels
    • 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/04Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means
    • G01C21/08Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means involving use of the magnetic field of the earth
    • 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
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning

Landscapes

  • Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • General Life Sciences & Earth Sciences (AREA)
  • Geology (AREA)
  • Telephone Function (AREA)

Abstract

The present invention relates to mobile communication technology field, more particularly to a kind of terminal determines the method and terminal at inclination angle, to solve the problems, such as that current terminal determines that the method at inclination angle is not accurate enough.Terminal of the embodiment of the present invention judges currently whether remain static;If so, the terminal receives the acceleration information that acceleration transducer reports;The terminal determines inclination angle according to the acceleration information.Since terminal of the embodiment of the present invention is determining the lower definite inclination angle that remains static, avoid due to the influence for the acceleration information that the acceleration that external force produces detects acceleration transducer, so that inclination angle be determined more accurately out.

Description

A kind of terminal determines the method and terminal at inclination angle
Technical field
The present invention relates to mobile communication technology field, more particularly to a kind of terminal determines the method and terminal at inclination angle.
Background technology
With the continuous improvement of mobile terminal performance, the function of mobile terminal is also more next to be enriched.For example user can pass through Mobile terminal playing video, checks picture, reads novel etc..With the continuous improvement of mobile terminal technology, in order to further carry Rise user experience, generally require to judge the mode of active user's hand-held mobile terminal by the inclination angle of mobile terminal, according to The mode of family hand-held mobile terminal adjusts display picture.For example, during user uses mobile terminal playing video, detection The inclination angle of mobile terminal, when being more than a certain threshold value at the definite angle of inclination, horizontal stroke is switched to by the display interface of mobile terminal To display.Therefore, how accurately to determine that the inclination angle of mobile terminal becomes urgent problem to be solved.
At present, when determining the inclination angle of terminal, terminal is detected by obtaining the acceleration sensor inside mobile terminal The sensing data arrived, after acceleration information is got, directly calculates mobile terminal according to the sensing data got Inclination angle.Since existing terminal determines that the method at inclination angle is not docked received sensing data and distinguished, if acceleration passes The sensing data that sensor is got collects in terminal moving process, due to what is got in terminal moving process Include in sensing data since user shakes acceleration caused by mobile terminal, moved being calculated according to the sensing data During the inclination angle of terminal, there are larger deviation for the inclination angle of the mobile terminal calculated and the actual tilt angles of mobile terminal.
In conclusion terminal determines that the method at inclination angle is not accurate enough at present.
The content of the invention
The present invention provides the method and terminal that a kind of terminal determines inclination angle, existing in the prior art current to solve Determine the problem of method at terminal inclination angle is not accurate enough.
Based on the above problem, in a first aspect, the embodiment of the present invention provides a kind of method that terminal determines inclination angle, this method Including:
Terminal judges currently whether remain static;
If so, the terminal receives the acceleration information that acceleration transducer reports;
The terminal determines inclination angle according to the acceleration information.
Second aspect, the embodiment of the present invention provide a kind of terminal, including:
At least one processing unit and at least one storage unit, wherein, the storage unit has program stored therein code, When said program code is performed by the processing unit so that the processing unit performs following process:
Whether judgement currently remains static;If so, receive the acceleration information that acceleration transducer reports;According to institute State acceleration information and determine inclination angle.
The third aspect, the embodiment of the present invention also provide a kind of device at definite inclination angle, including:
Judgment module, for judging currently whether remain static;
Receiving module, the acceleration information reported for receiving acceleration transducer;
Determining module, for determining inclination angle according to the acceleration information.
Fourth aspect, the embodiment of the present invention provides a kind of computing device readable storage medium storing program for executing, including program code, when described When program code is run on the computing device, said program code is used to make the computing device embodiment of the present invention terminal The step of determining the method at inclination angle.
Terminal of the embodiment of the present invention first determines whether terminal currently remains static it needs to be determined that during inclination angle; After determining to remain static, the acceleration information that acceleration transducer reports is received, it is true according to acceleration information is received Constant inclination oblique angle.It is the basis after definite terminal remains static due to the method that terminal of the embodiment of the present invention determines inclination angle Acceleration information determines inclination angle, avoids under motion state of terminal, since the acceleration that external force produces examines acceleration transducer The influence of the acceleration information of the terminal of survey, ensures acceleration information that terminal determines that inclination angle uses close to since gravity produces Raw acceleration information, so that inclination angle be determined more accurately out.
Brief description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is the method flow diagram that terminal of the embodiment of the present invention determines inclination angle;
Fig. 2 is the method schematic diagram that the embodiment of the present invention establishes coordinate system;
For the embodiment of the present invention, the first judges the method flow diagram whether terminal remains static to Fig. 3;
Fig. 4 judges the method flow diagram whether terminal remains static second for the embodiment of the present invention;
Fig. 5 is the method schematic diagram that terminal of the embodiment of the present invention determines inclination angle;
Fig. 6 is the overall flow figure that terminal of the embodiment of the present invention determines inclination angle;
Fig. 7 is the structure diagram of terminal of the embodiment of the present invention;
Fig. 8 is the structure diagram for the device that the embodiment of the present invention determines inclination angle.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearer, the present invention is made below in conjunction with attached drawing into One step it is described in detail, it is clear that the described embodiment only a part of embodiment of the present invention, rather than whole implementation Example.Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without making creative work All other embodiment, belongs to the scope of protection of the invention.
As shown in Figure 1, terminal of the embodiment of the present invention determines that the method at inclination angle includes:
Step 101, terminal judge currently whether remain static;
Step 102, if so, the terminal receives the acceleration information that reports of acceleration transducer;
Step 103, the terminal determine inclination angle according to the acceleration information.
Terminal of the embodiment of the present invention first determines whether terminal currently remains static it needs to be determined that during inclination angle; After determining to remain static, the acceleration information that acceleration transducer reports is received, it is true according to acceleration information is received Constant inclination oblique angle.It is the basis after definite terminal remains static due to the method that terminal of the embodiment of the present invention determines inclination angle Acceleration information determines inclination angle, avoids under motion state of terminal, since the acceleration that external force produces examines acceleration transducer The influence of the acceleration information of the terminal of survey, ensures acceleration information that terminal determines that inclination angle uses close to since gravity produces Raw acceleration information, so that inclination angle be determined more accurately out.
The embodiment of the present invention after definite terminal is currently at inactive state, what the acceleration transducer of receiving terminal reported Acceleration information;
Wherein, acceleration information includes the first component, the acceleration of the acceleration of the terminal in the direction of the x axis The three-component of second component and the acceleration in the z-axis direction in the y-axis direction;And z-axis and the terminal screen institute In the vertical of plane.
Terminal of the embodiment of the present invention continues the acceleration information of detection terminal by the acceleration transducer of terminal inner, and The acceleration information of the terminal detected is reported.
Wherein, acceleration transducer can periodically report the acceleration information detected, or detect acceleration Reported immediately after data.
Optionally, the acceleration transducer of the embodiment of the present invention is 3-axis acceleration sensor, and acceleration transducer is logical The acceleration of gravity (vector) of detection terminal is crossed, obtains the first component of the acceleration of gravity of terminal in the direction of the x axis, gravity adds The second component of speed in the y-axis direction, three-component in the z-axis direction.
The acceleration transducer of the embodiment of the present invention can be built in the acceleration information of detection terminal according to following manner Vertical coordinate system:
Z-axis is vertical with plane where the terminal screen, and the x-axis and the y-axis are where the terminal screen In plane, and the x-axis, the y-axis and the z-axis are vertical two-by-two.
Optionally, the sides aligned parallel of the x-axis of the embodiment of the present invention and y-axis with terminal screen;
Specifically, since x-axis and y-axis are vertical, when the screen of terminal is rectangle, x-axis, y-axis respectively with the terminal screen Long side, broadside it is parallel.
For example, coordinate system as shown in Figure 2, wherein, abcd regions are the screen of terminal, and abcd regions are rectangle, z-axis With the screen vertical of the terminal, x-axis is parallel with the edge ab of terminal screen, and y-axis is parallel with the edge bc of terminal screen.Need Bright, arrow G represents the direction with horizontal plane in Fig. 2.
It should be noted that when terminal remains static, the acceleration information that acceleration transducer detects is eventually Hold the related data of the acceleration produced under the effect of gravity.But when terminal is kept in motion, since terminal can receive The external force such as shake, in the acceleration information of detection terminal, what is detected is not only since gravity produces acceleration transducer Acceleration, further include due to shake etc. external force produce a part of acceleration.Therefore, when terminal is kept in motion, add It is the acceleration information really produced due to gravity that the acceleration information that velocity sensor detects, which is not,.
For these reasons, for terminal when determining inclination angle, a kind of optional mode is to be in static shape in definite terminal After state, inclination angle is determined further according to the acceleration information that acceleration transducer reports.
Terminal of the embodiment of the present invention can judge current state using following two ways.
Mode one,
As shown in figure 3, the first terminal of the embodiment of the present invention judges the current method whether to remain static.
Step 301, the terminal starting loop sensor, and receive the acceleration transducer persistently report it is described The acceleration information of terminal;Wherein, the acceleration information includes first point of the acceleration of the terminal in the direction of the x axis Amount, the three-component of second component and the acceleration in the z-axis direction of the acceleration in the y-axis direction;
Step 302, first component in the received acceleration information of the end-on, the second component Modulo operation is carried out with the three-component, determines modulus value that modulo operation obtains and the difference of acceleration of gravity;
If step 303, the difference are not more than first threshold, the terminal determines to be currently at inactive state.
Since terminal of the embodiment of the present invention is when remaining static, the acceleration information that acceleration transducer detects is The acceleration component in x-axis, y-axis and z-axis respectively produced by the gravity of terminal;That is, it is in static shape in terminal During state, the first component, second component and three-component modulus value in the acceleration information that acceleration transducer detects are equal to The standard value of acceleration of gravity.
After terminal of the embodiment of the present invention receives the acceleration information that acceleration transducer reports, received acceleration is docked Data perform following judgement operation:
First component, the second component in the received acceleration information of end-on and 3rd point described Amount carries out modulo operation, determines modulus value that modulo operation obtains and the difference of acceleration of gravity;
The absolute value for the difference determined compared with first threshold, is determined that terminal is current by terminal according to comparative result State.
Specifically, if it is determined that the absolute value of difference be more than first threshold, then terminal determines to be currently at motion state;
If it is determined that the absolute value of difference be not more than first threshold, then terminal determines to be currently at inactive state.
Wherein, the first threshold of the embodiment of the present invention is numerical value set in advance, or the first threshold is this area skill Art personnel are through testing obtained empirical value;
Also, when terminal remains static, the acceleration information that acceleration transducer detects is due to terminal The acceleration information that gravity produces, the first component, second component in acceleration information, three-component modulus value, should approach In or equal to acceleration of gravity standard value;Therefore, the first threshold in the embodiment of the present invention is a less numerical value.
It should be noted that above-mentioned sentence since terminal of the embodiment of the present invention often receives an acceleration information and is intended to perform Disconnected operation, terminal is when determining to be currently at motion state, it is necessary to which docking received acceleration information continues to execute above-mentioned judgement Operation, until determining that terminal is currently at inactive state;
After determining to be currently at inactive state according to the acceleration information received, acquisition the last time receives terminal Acceleration information, determine inclination angle using the acceleration information that receives of the last time.
In implementation, terminal of the embodiment of the present invention can judge current state using following equation:
Wherein, x is the first component in acceleration information, and y is the second component in acceleration information, and z is the acceleration number of degrees Three-component in;9.80665 it is the standard value of acceleration of gravity.
Optionally, the first threshold of the embodiment of the present invention is 0;
That is, | Δ gra | during > 0, determine that terminal is currently at motion state;
| Δ gra | when=0, determine that terminal is currently at inactive state.
Mode two,
As shown in figure 4, the embodiment of the present invention judges the method whether terminal remains static second.
Step 401, the terminal starting loop sensor, and receive the acceleration transducer persistently report it is described The acceleration information of terminal;Wherein, the acceleration information includes first point of the acceleration of the terminal in the direction of the x axis Amount, the three-component of second component and the acceleration in the z-axis direction of the acceleration in the y-axis direction;
Step 402, first component in the received acceleration information of the end-on, the second component Modulo operation is carried out with the three-component, determines modulus value that modulo operation obtains and the difference of acceleration of gravity;
If step 403, the difference are not more than first threshold, the terminal obtains the acceleration transducer and reports recently At least two acceleration informations;
Step 404, the terminal according at least two acceleration information each acceleration information on call time, Determine to report the change rate of the first component, the change rate of second component and the 3rd in temporally adjacent each two acceleration information The change rate of component;
If the absolute value of the change rate of step 405, the first component is not more than second threshold, the change rate of second component it is exhausted 3rd threshold value is not more than to value, and the absolute value of three-component change rate is not more than the 4th threshold value, then the terminal determines to work as Before remain static.
Since terminal of the embodiment of the present invention is when remaining static, the acceleration information that acceleration transducer detects is The acceleration component in x-axis, y-axis and z-axis respectively produced by the gravity of terminal;That is, it is in static shape in terminal During state, the first component, second component and three-component modulus value in the acceleration information that acceleration transducer detects are equal to The standard value of acceleration of gravity.
After terminal of the embodiment of the present invention receives the acceleration information that acceleration transducer reports, received acceleration is docked Data perform following judgement operation:
First component, the second component in the received acceleration information of end-on and 3rd point described Amount carries out modulo operation, determines modulus value that modulo operation obtains and the difference of acceleration of gravity;Terminal is according to the difference determined Judge current state.
Specifically, terminal by the absolute value for the difference determined compared with first threshold;
If it is determined that the absolute value of difference be more than first threshold, then terminal determines to be currently at motion state;
If it is determined that the absolute value of difference be not more than first threshold, then terminal needs to determine whether currently whether be in Inactive state.
Wherein, the first threshold of the embodiment of the present invention is numerical value set in advance, or the first threshold is this area skill Art personnel are through testing obtained empirical value.
It should be noted that above-mentioned sentence since terminal of the embodiment of the present invention often receives an acceleration information and is intended to perform Disconnected operation, terminal is when determining to be currently at motion state, it is necessary to which docking received acceleration information continues to execute above-mentioned judgement Operation, until the absolute value for the difference determined is not more than first threshold.
In implementation, terminal of the embodiment of the present invention can judge current state using following equation:
Wherein, x is the first component in acceleration information, and y is the second component in acceleration information, and z is the acceleration number of degrees Three-component in;9.80665 it is the standard value of acceleration of gravity.
The first threshold of the embodiment of the present invention can be set in advance as 1.0;
| Δ gra | during > 1.0, determine that terminal is currently at motion state;
| Δ gra |, it is necessary to determine whether terminal currently remains static when≤1.0.
Due to when the absolute value for the difference determined is more than first threshold, illustrating acceleration transducer in acquisition terminal There are relatively large deviation with acceleration of gravity for acceleration, that is to say, that the acceleration information collected is not only the gravity by terminal The component in x-axis, y-axis and z-axis, i.e. terminal are currently not at inactive state to the acceleration of generation respectively;
And when the absolute value for the difference determined is not more than first threshold, illustrate acceleration transducer in acquisition terminal The deviation of acceleration and acceleration of gravity is smaller or there is no deviation, at this time it is considered that terminal is likely to be at inactive state;But It is, since terminal by motion state change during inactive state is turned to, the first component, second component in acceleration information Constantly reducing with the absolute value of the difference of three-component modulus value and first threshold;Therefore, tended in terminal by motion state During inactive state, in the acceleration information that may detect that the first component, second component and three-component modulus value with The absolute value of the difference of first threshold is not more than first threshold, but terminal is also not on inactive state.
In order to more accurately judge whether terminal currently remains static, terminal of the embodiment of the present invention is determining to accelerate The absolute value of the difference of the first component, second component and three-component modulus value and first threshold in degrees of data is not more than first During threshold value, it is also necessary to carry out second to current state using step 404 and step 405 mode and judge:
Terminal obtains at least two acceleration informations that the acceleration transducer reports recently;Terminal according to it is described at least In two acceleration informations each acceleration information on call time, determine to report in temporally adjacent each two acceleration information The change rate of first component, the change rate of second component and three-component change rate;If the change rate of the first component is exhausted To value no more than second threshold, the absolute value of the change rate of second component is no more than the 3rd threshold value, and three-component change The absolute value of rate determines to be currently at inactive state no more than the 4th threshold value, then terminal;Otherwise, terminal determines to be currently at Motion state.
It should be noted that first component, second component and three-component mould of the terminal in acceleration information is determined After the absolute value of value and the difference of first threshold is not more than first threshold, stop docking each point in received acceleration information Amount carries out modulo operation;And on the basis of current time, obtain at least two acceleration informations being most recently received, and according to obtaining At least two acceleration informations got determine the change rate of each component.
Wherein, terminal of the embodiment of the present invention is determining the change of each component according at least two acceleration informations got During rate, called time according on each acceleration information, determine to report each in temporally adjacent each two acceleration information The change rate of component.
It is respectively the first acceleration according to time sequencing is reported for example, obtaining three acceleration informations being most recently received Data, the second acceleration information and the 3rd acceleration information;Then when determining the change rate of each component, the first acceleration number of degrees are determined According to each component variation rate in the second acceleration information, and determine in the second acceleration information and the 3rd acceleration information each point Quantitative change rate.
Optionally, terminal of the embodiment of the present invention determines to report temporally adjacent each two acceleration information according to following manner In each component change rate:
For arbitrarily reporting two temporally adjacent acceleration informations, terminal is by first in described two acceleration informations The ratio of the difference to call time in the difference of component, with described two acceleration informations, as described two acceleration informations In the first component change rate;
Terminal is by the difference of the second component in described two acceleration informations, with reporting for described two acceleration informations The ratio of the difference of time, the change rate as second component in described two acceleration informations;
Terminal is by the three-component difference in described two acceleration informations, with reporting for described two acceleration informations The ratio of the difference of time, as three-component change rate in described two acceleration informations.
Specifically, terminal of the embodiment of the present invention can determine to report temporally adjacent each two acceleration using following equation The change rate of each component in data:
The acceleration information formerly reported in two temporally adjacent acceleration informations is reported to include the first component xi, second Component yi, three-component zi, and on call time labeled as Ti;The acceleration information reported after includes the first component xi+1, second Component yi+1, three-component zi+1, and on call time labeled as Ti+1;Wherein, above call time Ti、Ti+1It is by obtaining reported event Timestamp obtain.
The then change rate of the first component
The change rate of second component
Three-component change rate
If terminal gets at least three acceleration informations, call time according on each acceleration information, determine to report In temporally adjacent each two acceleration information during the change rate of each component, multiple first component variation rates are capable of determining that, it is more A second component change rate and multiple three-component change rates;In the multiple first component variation rates determined no more than second Threshold value, multiple second component change rates are no more than the 3rd threshold value, and multiple three-component change rates are no more than the 4th threshold value Afterwards, terminal determines to be currently at inactive state.
For example, terminal gets the N number of acceleration information reported recently, wherein N >=3;Then add to adjacent each two When speed data determines each component variation rate, the change rate of N-1 the first components is determined, the change rate of N-1 second component, N-1 three-component change rates.
If it is determined that N-1 the first components change rate absolute value no more than second threshold, the N-1 determined The absolute value of the change rate of second component no more than the 3rd threshold value, the N-1 determined three-component change rates it is absolute Value determines to be currently at inactive state no more than the 4th threshold value, then terminal;
Otherwise, terminal determines to be currently at motion state.
Terminal then needs to continue to determine the acceleration number of degrees received when judging to determine to be kept in motion by second The difference of the modulus value of each component and first threshold in, rejudges the state of terminal.
The second threshold of the embodiment of the present invention, the 3rd threshold value and the 4th threshold value are numerical value set in advance, or ability The empirical value that field technique personnel obtain according to experiment.
Optionally, second threshold, the 3rd threshold value and the 4th threshold value are same numerical value.
Optionally, the second threshold of the embodiment of the present invention, the 3rd threshold value and the 4th threshold value are 25.0.
Illustrated below with a specific example.
For example, terminal is when carrying out second to current state and judging, if what acquisition acceleration transducer reported recently Three acceleration informations, are respectively the first acceleration information, the second acceleration information and the 3rd acceleration according to time sequencing is reported Degrees of data;
Wherein, the first acceleration information includes the first component x1, second component y1, three-component z1, and first accelerates the number of degrees According on call time as T1
Second acceleration information includes the first component x2, second component y2, three-component z2, and the second acceleration information On call time as T2
First acceleration information includes the first component x3, second component y3, three-component, and the 3rd acceleration information is upper Call time as T3
Then terminal determine each component change rate when, it is necessary to be directed to the first acceleration information and the second acceleration information Each component variation amount is calculated respectively, and calculates each component respectively for the second acceleration information and the 3rd acceleration information Variable quantity.
It should be noted that the first component x, the unit of second component y and three-component z are m/s in acceleration information2, The unit of T of calling time on and is nanosecond (ns), therefore when calculating the variable quantity of each component, it is necessary to the list for the T that calls time by Position is converted to the second.
Then, in the first acceleration information and the second acceleration information the first component variable quantity:
The variable quantity of second component in first acceleration information and the second acceleration information:
Three-component variable quantity in first acceleration information and the second acceleration information:
The variable quantity of first component in second acceleration information and the 3rd acceleration information:
The variable quantity of second component in second acceleration information and the 3rd acceleration information:
Three-component variable quantity in second acceleration information and the 3rd acceleration information:
If the value of second threshold, the 3rd threshold value and the 4th threshold value is 25.0, determiningAndAnd AndAndWhen, terminal determines to be currently at inactive state;
In any one be more than 25.0 when, terminal determines to be currently at motion state.
It should be noted that above two terminal judges that the mode of current state is illustrating to the embodiment of the present invention Bright, terminal to be protected of the embodiment of the present invention judges that the mode of current state is not limited to the example above, any to can interpolate that The mode for going out terminal current state is suitable for the present invention.
Terminal of the embodiment of the present invention is after determining to be currently at inactive state, according to the acceleration sensing of the terminal received The acceleration information that device reports determines inclination angle.
In implementation, if the acceleration information that terminal is reported by acceleration transducer judges currently whether be in static shape State, in the manner described above one and mode two, since the acceleration transducer of terminal persistently reports acceleration information;The embodiment of the present invention Terminal is after definite terminal is currently at inactive state, acceleration that terminal is reported according to described acceleration transducer the last time Data determine inclination angle.
It should be noted that since the acceleration transducer of the embodiment of the present invention is in the acceleration information of reporting terminal, It is (time interval reported is usually 5ms) reported using the time interval of Millisecond, therefore terminal is determining currently After remaining static, the acceleration information that the last time for getting reports is still the acceleration that terminal remains static Data.
In implementation, if terminal is judged currently by the other modes in addition to the acceleration information that acceleration transducer reports Whether remain static, terminal is after determining to be currently at inactive state, terminal starting loop sensor, and receives acceleration The acceleration information that degree sensor reports, it is optionally, true according to the acceleration information that the acceleration transducer reports for the first time Constant inclination oblique angle.
It should be noted that terminal of the embodiment of the present invention after determining to be currently at inactive state, starts terminal immediately Acceleration transducer, and the acceleration information that receiving terminal reports, since acceleration transducer is in the acceleration number of degrees of reporting terminal According to when, be the time interval (time interval reported is usually 5ms) that is reported using Millisecond, therefore in Acceleration of starting After spending sensor, the acceleration information that can ensure to receive for the first time is still the acceleration number of degrees that terminal remains static According to.
Optionally, terminal of the embodiment of the present invention determines the inclination angle of terminal according to following manner:
Wherein, the α is the inclination angle of the terminal, and the x is the in the last acceleration information received One component, the y are the first component in the last acceleration information received, and the z is the last to be received The first component in acceleration information, tan-1For arctangent cp cp operation.
Angle of the inclination angle of terminal of the embodiment of the present invention where terminal screen between plane and horizontal plane;Such as Fig. 3 institutes Show, being shifted onto by geometry can be easy to draw, the inclination angle of terminal is z-axis and direction (Vertical Square where acceleration of gravity G To) angle, such as the α in Fig. 5.Since when terminal remains static, acceleration of gravity is passed in the component of X-axis for acceleration The first component x in the acceleration information that sensor detects, acceleration of gravity Y-axis component be acceleration information in second Component y, three-component z of the acceleration of gravity in the component of Z axis is acceleration information;Then as shown in figure 5, Z, G form right angles triangle, and G is bevel edge, then
Since the inclination angular unit of terminal is degree, it is therefore desirable to carry out Conversion of measurement unit, then:
It should be noted that above-mentioned terminal determines the mode at inclination angle simply to the embodiment of the present invention for example, originally Inventive embodiments terminal to be protected determines that the mode at inclination angle is not limited to the example above, any that terminal can be made to determine to incline The mode at oblique angle is suitable for the present invention.
As shown in fig. 6, terminal of the embodiment of the present invention determines the overall flow figure at inclination angle;
Wherein, two terminals provided judge to be said exemplified by the current mode whether to remain static in the above described manner It is bright.
The acceleration transducer that step 601, terminal start;
Wherein, the acceleration transducer is located at the terminal inner.
Step 602, terminal receive the acceleration information for the terminal that the acceleration transducer persistently reports.
Wherein, every group of acceleration information include the acceleration of the terminal the first component in the direction of the x axis, it is described plus The three-component of second component and the acceleration in the z-axis direction of speed in the y-axis direction;The z-axis and the terminal Plane is vertical where screen, and the x-axis, the y-axis and the z-axis are vertical two-by-two.
First component, the second component and institute in step 603, the received acceleration information of end-on State three-component and carry out modulo operation, determine modulus value that modulo operation obtains and the difference of acceleration of gravity.
Step 604, terminal judge whether the absolute value of the difference is more than first threshold, if so, step 605 is performed, if it is not, Perform step 606.
Step 605, terminal determine to be currently at motion state.
Step 606, terminal obtain at least two acceleration informations that the acceleration transducer reports recently.
Step 607, terminal according at least two groups of acceleration informations each acceleration information on call time, determine Report the change rate of the first component, the change rate of second component and three-component in temporally adjacent each two acceleration information Change rate.
The change rate of the first whole components that step 608, terminal judge to determine whether no more than second threshold, if It is to perform step 609, if it is not, performing step 605.
The change rate of whole second components that step 609, terminal judge to determine whether no more than the 3rd threshold value, if It is to perform step 610, if it is not, performing step 605.
Whether step 610, terminal judge whole three-component change rates for determining no more than the 4th threshold value, if It is to perform step 611, if it is not, performing step 605.
Step 611, terminal obtain the last acceleration information received, and received according to described the last time Acceleration information determines inclination angle.
Based on same inventive concept, a kind of terminal is additionally provided in the embodiment of the present invention, since the terminal is of the invention real The terminal that the terminal in example determines inclination angle method is applied, and the principle that the terminal solves the problems, such as is similar to this method, therefore should The implementation of terminal may refer to the implementation of method, and overlaps will not be repeated.
As shown in fig. 7, a kind of terminal of the embodiment of the present invention, including:
At least one processing unit 700 and at least one storage unit 701, wherein, the storage unit 701 is stored with Program code, when said program code is performed by the processing unit 700 so that the processing unit 700 performs following mistake Journey:
Judge whether terminal currently remains static;If so, receive the acceleration information that acceleration transducer reports;Root Inclination angle is determined according to the acceleration information.
Optionally, the processing unit 700 is specifically used for:
Judge currently whether remain static according to following manner:
Starting loop sensor, and receive the acceleration number of degrees for the terminal that the acceleration transducer persistently reports According to;Wherein, the acceleration information includes the first component, the acceleration of the acceleration of the terminal in the direction of the x axis The three-component of second component and the acceleration in the z-axis direction in the y-axis direction;The z-axis and the terminal screen Place plane it is vertical, and the x-axis, the y-axis and the z-axis are vertical two-by-two;Dock in the received acceleration information First component, the second component and the three-component carry out modulo operation, determine the modulus value that modulo operation obtains With the difference of acceleration of gravity;If the absolute value of the difference is not more than first threshold, determine to be currently at inactive state.
Optionally, the processing unit 700 is additionally operable to:
After the absolute value for determining the difference is not more than first threshold, determines to be currently at before inactive state, obtain Take at least two acceleration informations that the acceleration transducer reports recently;According to every at least two acceleration information Call time on a acceleration information, determine to report the change rate of the first component in temporally adjacent each two acceleration information, The change rate and three-component change rate of second component;Determine the absolute value of the change rate of first component no more than the Two threshold values, the absolute value of the change rate of the second component is not more than the 3rd threshold value, and the three-component change rate is exhausted 4th threshold value is not more than to value.
Optionally, the processing unit 700 is specifically used for:
Inclination angle is determined according to the acceleration information that described acceleration transducer the last time reports.
Optionally, the processing unit 700 is specifically used for:
Inclination angle is determined according to following manner:
Wherein, the α is inclination angle, and the x is the first component in the last acceleration information received, described Y is the first component in the last acceleration information received, and the z is in the last acceleration information received Three-component, tan-1For arctangent cp cp operation.
As shown in figure 8, the embodiment of the present invention determines the device at inclination angle, including:
Judgment module 801, for judging currently whether remain static;
Receiving module 802, the acceleration information reported for receiving acceleration transducer;
Determining module 803, for determining inclination angle according to the acceleration information.
Optionally, judgment module 801 is specifically used for:
Starting loop sensor, and receive the acceleration number of degrees for the terminal that the acceleration transducer persistently reports According to;Wherein, the acceleration information includes the first component, the acceleration of the acceleration of the terminal in the direction of the x axis The three-component of second component and the acceleration in the z-axis direction in the y-axis direction;The z-axis and the terminal screen Place plane it is vertical, and the x-axis, the y-axis and the z-axis are vertical two-by-two;Dock in the received acceleration information First component, the second component and the three-component carry out modulo operation, determine the modulus value that modulo operation obtains With the difference of acceleration of gravity;If the absolute value of the difference is not more than first threshold, determine to be currently at inactive state.
Optionally, the judgment module 801 is additionally operable to:
After the absolute value for determining the difference is not more than first threshold, determine that the terminal is currently at inactive state Before, at least two acceleration informations that the acceleration transducer reports recently are obtained;According at least two groups of acceleration In data each acceleration information on call time, determine to report the first component in temporally adjacent each two acceleration information Change rate, the change rate of second component and three-component change rate;Determine the absolute value of the change rate of first component No more than second threshold, the absolute value of the change rate of the second component is not more than the 3rd threshold value, and the three-component change The absolute value of rate is not more than the 4th threshold value.
Optionally, the determining module 803 is specifically used for:
Inclination angle is determined according to the acceleration information that described acceleration transducer the last time reports.
Optionally, the determining module 803 is specifically used for:
Inclination angle is determined according to following manner:
Wherein, the α is inclination angle, and the x is the first component in the last acceleration information received, described Y is the first component in the last acceleration information received, and the z is in the last acceleration information received Three-component, tan-1For arctangent cp cp operation.
The embodiment of the present invention provides a kind of computing device readable storage medium storing program for executing, including program code, works as said program code When running on the computing device, said program code is used for the step for the method for making the computing device terminal determine inclination angle Suddenly.
Above by reference to showing according to the method, apparatus (system) of the embodiment of the present application and/or the frame of computer program product Figure and/or flow chart describe the application.It is to be understood that it can realize that block diagram and/or flow illustrate by computer program instructions One block of figure and the combination of block diagram and/or the block of flowchart illustration.These computer program instructions can be supplied to logical With computer, the processor of special purpose computer and/or other programmable data processing units so that via computer processor And/or the instruction that performs of other programmable data processing units create be used for realization it is specified in block diagram and/or flow chart block The method of function/action.
Correspondingly, the application can also be implemented with hardware and/or software (including firmware, resident software, microcode etc.).More Further, the application can take computer to can be used or the shape of computer program product on computer-readable recording medium Formula, it can be used with the computer realized in media as well or computer readable program code, to be made by instruction execution system With or combined command execution system and use.In the present context, computer can be used or computer-readable medium can be with It is arbitrary medium, it can include, store, communicate, transmit or transmit program, to be made by instruction execution system, device or equipment With, or combined command execution system, device or equipment use.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art God and scope.In this way, if these modifications and changes of the present invention belongs to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising including these modification and variations.

Claims (10)

1. a kind of method that terminal determines inclination angle, it is characterised in that this method includes:
Terminal judges currently whether remain static;
If so, the terminal receives the acceleration information that acceleration transducer reports;
The terminal determines inclination angle according to the acceleration information.
2. the method as described in claim 1, it is characterised in that whether the terminal judges current in quiet according to following manner Only state:
The terminal starting loop sensor, and receive the acceleration for the terminal that the acceleration transducer persistently reports Data;Wherein, the acceleration information includes the acceleration of the terminal the first component in the direction of the x axis, the acceleration The three-component of second component and the acceleration in the z-axis direction of degree in the y-axis direction;The z-axis and the end panel Plane where curtain is vertical, and the x-axis, the y-axis and the z-axis are vertical two-by-two;
First component, the second component in the received acceleration information of end-on and 3rd point described Amount carries out modulo operation, determines the difference of modulus value and acceleration of gravity standard value that modulo operation obtains;
If the absolute value of the difference is not more than first threshold, the terminal determines to be currently at inactive state.
3. method as claimed in claim 2, it is characterised in that determine the absolute value of the difference no more than the in the terminal After one threshold value, determine to be currently at before inactive state, further include:
The terminal obtains at least two acceleration informations that the acceleration transducer reports recently;
The terminal according at least two acceleration information each acceleration information on call time, determine on call time The change rate of first component, the change rate of second component and three-component change in adjacent each two acceleration information Rate;
Determine that the absolute value of the change rate of first component is not more than second threshold, the change rate of the second component it is absolute Value is not more than the 3rd threshold value, and the absolute value of the three-component change rate is not more than the 4th threshold value.
4. method as claimed in claim 2 or claim 3, it is characterised in that the terminal determines to tilt according to the acceleration information Angle, including:
The terminal determines inclination angle according to the acceleration information that described acceleration transducer the last time reports.
5. the method as described in claims 1 to 3 is any, it is characterised in that the terminal determines inclination angle according to following manner:
<mrow> <mi>&amp;alpha;</mi> <mo>=</mo> <msup> <mi>tan</mi> <mrow> <mo>-</mo> <mn>1</mn> </mrow> </msup> <mfrac> <msqrt> <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <msup> <mi>y</mi> <mn>2</mn> </msup> </mrow> </msqrt> <mi>z</mi> </mfrac> <mo>*</mo> <mfrac> <mn>180</mn> <mi>&amp;pi;</mi> </mfrac> <mo>;</mo> </mrow>
Wherein, the α is inclination angle, and the x is the first component in the last acceleration information received, and the y is The first component in the acceleration information that the last time receives, the z are in the last acceleration information received Three-component, tan-1For arctangent cp cp operation.
A kind of 6. terminal, it is characterised in that including:
At least one processing unit and at least one storage unit, wherein, the storage unit has program stored therein code, works as institute When stating program code and being performed by the processing unit so that the processing unit performs following process:
Whether judgement currently remains static;If so, receive the acceleration information that acceleration transducer reports;Added according to described Speed data determines inclination angle.
7. terminal as claimed in claim 6, it is characterised in that the processing unit is specifically used for:
Judge currently whether remain static according to following manner:
Starting loop sensor, and receive the acceleration information for the terminal that the acceleration transducer persistently reports;Its In, the acceleration information includes the acceleration of the terminal the first component in the direction of the x axis, the acceleration in y-axis The three-component of second component and the acceleration in the z-axis direction on direction;The z-axis where the terminal screen with putting down Face it is vertical, and the x-axis, the y-axis and the z-axis are vertical two-by-two;Dock described in the received acceleration information First component, the second component and the three-component carry out modulo operation, determine modulus value and gravity that modulo operation obtains The difference of acceleration;If the absolute value of the difference is not more than first threshold, determine to be currently at inactive state.
8. terminal as claimed in claim 7, it is characterised in that the processing unit is additionally operable to:
Determine the difference absolute value be not more than first threshold after, determine the terminal be currently at inactive state it Before, obtain at least two acceleration informations that the acceleration transducer reports recently;Accelerate the number of degrees according to described at least two In each acceleration information on call time, determine to report the change of the first component in temporally adjacent each two acceleration information Rate, the change rate of second component and three-component change rate;Determine the absolute value of the change rate of first component not More than second threshold, the absolute value of the change rate of the second component is not more than the 3rd threshold value, and the three-component change The absolute value of rate is not more than the 4th threshold value.
9. terminal as claimed in claim 7 or 8, it is characterised in that the processing unit is specifically used for:
Inclination angle is determined according to the acceleration information that described acceleration transducer the last time reports.
10. the terminal as described in claim 6~8 is any, it is characterised in that the processing unit is specifically used for:
Inclination angle is determined according to following manner:
<mrow> <mi>&amp;alpha;</mi> <mo>=</mo> <msup> <mi>tan</mi> <mrow> <mo>-</mo> <mn>1</mn> </mrow> </msup> <mfrac> <msqrt> <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <msup> <mi>y</mi> <mn>2</mn> </msup> </mrow> </msqrt> <mi>z</mi> </mfrac> <mo>*</mo> <mfrac> <mn>180</mn> <mi>&amp;pi;</mi> </mfrac> <mo>;</mo> </mrow>
Wherein, the α is inclination angle, and the x is the first component in the last acceleration information received, and the y is The first component in the acceleration information that the last time receives, the z are in the last acceleration information received Three-component, tan-1For arctangent cp cp operation.
CN201711117548.4A 2017-11-13 2017-11-13 A kind of terminal determines the method and terminal at inclination angle Pending CN108007433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711117548.4A CN108007433A (en) 2017-11-13 2017-11-13 A kind of terminal determines the method and terminal at inclination angle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711117548.4A CN108007433A (en) 2017-11-13 2017-11-13 A kind of terminal determines the method and terminal at inclination angle

Publications (1)

Publication Number Publication Date
CN108007433A true CN108007433A (en) 2018-05-08

Family

ID=62052402

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711117548.4A Pending CN108007433A (en) 2017-11-13 2017-11-13 A kind of terminal determines the method and terminal at inclination angle

Country Status (1)

Country Link
CN (1) CN108007433A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108917701A (en) * 2018-08-06 2018-11-30 中国矿业大学 A kind of barrier based on smart phone detects automatically and method for early warning
CN109091848A (en) * 2018-05-31 2018-12-28 深圳还是威健康科技有限公司 Brandish action identification method, device, terminal and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101120303A (en) * 2005-12-26 2008-02-06 C&N株式会社 Portable terminal device
JP2010262563A (en) * 2009-05-11 2010-11-18 Sony Ericsson Mobilecommunications Japan Inc Mobile terminal, track information acquisition method and program
CN102394974A (en) * 2011-10-25 2012-03-28 中兴通讯股份有限公司 Processing method and device for locking terminal
CN103336655A (en) * 2013-06-21 2013-10-02 广东欧珀移动通信有限公司 Method for controlling switchover between horizontal screen and vertical screen states of mobile phone
CN103472993A (en) * 2013-09-02 2013-12-25 小米科技有限责任公司 Rotation displaying method, device and terminal equipment
CN105122344A (en) * 2013-03-14 2015-12-02 日本电气株式会社 Display control device, information device, display control method, and recording medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101120303A (en) * 2005-12-26 2008-02-06 C&N株式会社 Portable terminal device
JP2010262563A (en) * 2009-05-11 2010-11-18 Sony Ericsson Mobilecommunications Japan Inc Mobile terminal, track information acquisition method and program
CN102394974A (en) * 2011-10-25 2012-03-28 中兴通讯股份有限公司 Processing method and device for locking terminal
CN105122344A (en) * 2013-03-14 2015-12-02 日本电气株式会社 Display control device, information device, display control method, and recording medium
CN103336655A (en) * 2013-06-21 2013-10-02 广东欧珀移动通信有限公司 Method for controlling switchover between horizontal screen and vertical screen states of mobile phone
CN103472993A (en) * 2013-09-02 2013-12-25 小米科技有限责任公司 Rotation displaying method, device and terminal equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109091848A (en) * 2018-05-31 2018-12-28 深圳还是威健康科技有限公司 Brandish action identification method, device, terminal and computer readable storage medium
CN108917701A (en) * 2018-08-06 2018-11-30 中国矿业大学 A kind of barrier based on smart phone detects automatically and method for early warning

Similar Documents

Publication Publication Date Title
KR101608878B1 (en) Rest detection using accelerometer
US20140214357A1 (en) Portable electronic device adapted to provide an improved attitude matrix
CN102890612B (en) Method and device for scrolling screen
CN107515011A (en) A kind of bearing calibration of gyroscope and device
WO2012118904A1 (en) System and method to display content
KR20110066969A (en) Generating virtual buttons using motion sensors
US20120217958A1 (en) Portable electronic device adapted to compensate for gyroscope bias
US20180032152A1 (en) Mobile terminal and method for determining scrolling speed
CN103176623A (en) Reading anti-shaking method and device of mobile terminal and mobile terminal
JP2014199964A (en) Imaging apparatus and image processing apparatus
CN111355888A (en) Video shooting method and device, storage medium and terminal
CN106445334B (en) Display interface adjusting method and adjusting system
CN108007433A (en) A kind of terminal determines the method and terminal at inclination angle
US20160011719A1 (en) Adjusting coordinates of touch input
CN105718232A (en) Display method and display device of arbitrary angle plane rotation
US9478045B1 (en) Vibration sensing and canceling for displays
US8606332B2 (en) Gravity axis determination apparatus and mobile terminal apparatus using the same
CN107797652A (en) Adjust the method, apparatus and terminal of display effect
CA2769085C (en) Portable electronic device adapted to compensate for gyroscope bias
CN101587423B (en) Portable electronic apparatus and screen display method thereof
US9665232B2 (en) Information-processing device, storage medium, information-processing method, and information-processing system for enlarging or reducing an image displayed on a display device
CN105335118B (en) The display methods and device of a kind of electronic equipment control
CN107168621A (en) A kind of view control method by sliding and mobile terminal
WO2019052166A1 (en) Display screen switching method and mobile terminal
CN106293312A (en) The method and apparatus that terminal movable control shows

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180508

RJ01 Rejection of invention patent application after publication