CN108683807A - A kind of radar animated show method, apparatus and equipment based on mobile phone gyroscope - Google Patents
A kind of radar animated show method, apparatus and equipment based on mobile phone gyroscope Download PDFInfo
- Publication number
- CN108683807A CN108683807A CN201810421732.6A CN201810421732A CN108683807A CN 108683807 A CN108683807 A CN 108683807A CN 201810421732 A CN201810421732 A CN 201810421732A CN 108683807 A CN108683807 A CN 108683807A
- Authority
- CN
- China
- Prior art keywords
- mobile phone
- radar
- angular velocity
- phone gyroscope
- rotational angular
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72427—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting games or graphical animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/7243—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
- H04M1/72439—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for image or video messaging
Abstract
The embodiment of the present invention provides a kind of radar animated show method, apparatus and equipment based on mobile phone gyroscope.The method includes:If judgement knows that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, radar sector image is shown in the target image;Obtain the current time value of the rotational angular velocity and the mobile phone gyroscope of the mobile phone gyroscope, the angle position of the radar sector image is set according to the rotational angular velocity and the current time value, so that the radar sector image by the target image presumptive area or predetermined point centered on rotated, to realize radar animation.An embodiment of the present invention provides a kind of method for realizing radar animation using mobile phone gyroscope, the radar animation can be applied in the various applications of mobile phone.
Description
Technical field
The present embodiments relate to computer realm more particularly to a kind of radar animated show sides based on mobile phone gyroscope
Method, device and equipment.
Background technology
Mobile phone gyroscope is called angular-rate sensor, is different from accelerometer (G-sensor), the measurement of mobile phone gyroscope
Physical quantity is deflection, rotational angular velocity when tilting, and can do good measurement to the action for rotating, deflecting, thus can be with
Accurate Analysis judges the actual act of user.
As gyroscope mobile phone is more and more, the developer of APP applications can create the more and more gyroscope applications of exploitation.
However, in current mobile terminal such as Android, there is not the implementation method of the radar animation based on gyroscope also.
Invention content
In view of the problems of the existing technology, the embodiment of the present invention provides a kind of radar animation exhibition based on mobile phone gyroscope
Show method, apparatus and equipment, the rotation of mobile phone gyroscope can be followed and carry out rotation and realize radar animation.
In a first aspect, the embodiment of the present invention provides a kind of radar animated show method based on mobile phone gyroscope, including:
If judgement knows that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, thunder is shown in the target image
Up to sector image;
The current time value for obtaining the rotational angular velocity and the mobile phone gyroscope of the mobile phone gyroscope, according to described turn
The angle position of the radar sector image is arranged in dynamic angular speed and the current time value so that the radar sector image with
It is rotated centered on presumptive area or predetermined point in the target image, to realize radar animation.
Second aspect, the embodiment of the present invention provide a kind of radar animated show square law device based on mobile phone gyroscope, packet
It includes:
Radar asorbing paint module, if for judging to know that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value,
Radar sector image is shown in the target image;
Radar rotating module, rotational angular velocity and the mobile phone gyroscope for obtaining the mobile phone gyroscope it is current
The angle position of the radar sector image is arranged according to the rotational angular velocity and the current time value for time value, so that
The radar sector image by the target image presumptive area or predetermined point centered on rotated, to realize radar
Animation.
The third aspect, the embodiment of the present invention provide a kind of radar animated show equipment based on mobile phone gyroscope, including:
At least one processor;And
At least one processor being connect with the processor communication, wherein:
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to refer to
Enable the radar animated show method described in first aspect of the embodiment of the present invention based on mobile phone gyroscope of being able to carry out and its it is any can
Select the method described in embodiment.
Fourth aspect, the embodiment of the present invention provide a kind of non-transient computer readable storage medium, the non-transient calculating
Machine readable storage medium storing program for executing stores computer instruction, and the computer instruction, which executes, is based on hand described in first aspect of the embodiment of the present invention
The radar animated show method of machine gyroscope and its method of any alternative embodiment.
A kind of radar animated show method based on mobile phone gyroscope provided in an embodiment of the present invention, in mobile phone gyroscope
Radar sector image is shown after rotational angular velocity reaches certain speed, in target image, and thereafter according to mobile phone gyroscope
The angle position of radar sector image is arranged in rotational angle, so that radar sector image is with predetermined in the target image
It is rotated centered on region or predetermined point, realizes radar animation, provide a kind of utilization mobile phone gyroscope realization radar animation
Method, the radar animation can be applied in the various applications of mobile phone.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Some bright embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of radar animated show method flow diagram based on mobile phone gyroscope of the embodiment of the present invention;
Fig. 2 is radar animation schematic diagram described in the embodiment of the present invention;
Fig. 3 is three axis schematic diagram of mobile phone of embodiment of the present invention gyroscope;
Fig. 4 is a kind of radar animated show schematic device based on mobile phone gyroscope of the embodiment of the present invention;
Fig. 5 is a kind of block schematic illustration of the radar animated show equipment based on mobile phone gyroscope of the embodiment of the present invention;
Reference sign
1, target image, 2, radar sector image, 3, presumptive area or predetermined point.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical solution in the embodiment of the present invention is explicitly described, it is clear that described embodiment is the present invention
A part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
The every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
Firstly the need of explanation, the radar animated show method based on mobile phone gyroscope opens described in the embodiment of the present invention
Hair tool is Android studio3.0, and the method can be run on Android4.0 and system above.
Fig. 1 is a kind of radar animated show method flow diagram based on mobile phone gyroscope of the embodiment of the present invention, as shown in Figure 1
The radar animated show method based on mobile phone gyroscope, executive agent be cell phone application, including:
S100, if judging to know that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, in the target image
Show radar sector image;
The principle of gyroscope is that when not influenced by external force, being will not in the direction of the rotary shaft meaning of a rotating object
Change.The embodiment of the present invention opens radar animation when the rotational angular velocity of mobile phone gyroscope reaches certain value, that is, reaches
One predetermined threshold value, specific first predetermined threshold value can be decided according to the actual requirements, for example, 0.1rad/s, 0.15rad/s,
0.2rad/s etc., the embodiment of the present invention is not especially limited this.
The target image can be arbitrary image, and in other words, radar sector image can be on the ground for arbitrarily needing to show
Side's display.Fig. 2 is radar animation schematic diagram described in the embodiment of the present invention, is please referred to Fig.2, wherein target image 1 is border circular areas
One piece of the center border circular areas of image, target image 1 is presumptive area 3, in the circle of outermost layer circular image and presumptive area 3
Sector image between image is radar sector image 2.Fig. 2 is only a kind of demonstration schematic diagram of radar animation, but the present invention
Radar image described in embodiment is not limited to the form of expression of Fig. 2.
S101 obtains the current time value of the rotational angular velocity and the mobile phone gyroscope of the mobile phone gyroscope, according to
The angle position of the radar sector image is arranged in the rotational angular velocity and the current time value, so that the radar is fan-shaped
Image by the target image presumptive area or predetermined point centered on rotated, to realize radar animation.
Specifically, after the rotational angular velocity of mobile phone gyroscope reaches threshold value unlatching radar animation, step S101 is according to hand
The current time stamp real-time update radar sector image of rotational angular velocity and current time value, that is, mobile phone gyroscope of machine gyroscope,
So that radar sector image by target image presumptive area or predetermined point centered on rotated, visually show radar
Sector image follows the animation of the radar of mobile phone Motions of Gyroscope.
The embodiment of the present invention shows radar after the rotational angular velocity of mobile phone gyroscope reaches certain speed in target image
Sector image, and the angle position of radar sector image is set according to the rotational angle of mobile phone gyroscope thereafter, so that
Radar sector image is rotated centered on the presumptive area in the target image, is realized radar animation, is provided one kind
The method for realizing radar animation using mobile phone gyroscope, the radar animation can be applied in the various applications of mobile phone.
Based on above-described embodiment, step S100, if described judge to know that the rotational angular velocity of mobile phone gyroscope reaches first
Predetermined threshold value then shows radar sector image, specifically includes in the target image:
If judging to know, the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, draws radar sector image,
The fan angle of the radar sector image is default display wide-angle;
Include in the target image by the radar sector image, the radar sector image is in the target image
In position it is related to the Z axis position of mobile phone gyroscope and related to the presumptive area of the target image and predetermined point.
In the present embodiment, shows radar sector image after the rotational angular velocity of mobile phone gyroscope reaches threshold value, need first
Sector image is first drawn, specifically, there are one angles for the sector in the radar sector image drawn, referring to FIG. 2, the angle
Degree can be arranged according to the needs of actual displayed, you can the default display wide-angle of setting according to actual needs, for example, by default display
Wide-angle is set as 30 degree, 45 degree, 60 degree etc., and the embodiment of the present invention is not especially limited this.Radar sector image angle is arranged
After good, drawn, you can shown.
Specifically, since radar sector image needs presumptive area or predetermined point in surrounding target image to be rotated, because
And the display location of radar sector diagram is related to presumptive area or predetermined point, as shown in Fig. 2, the side of radar sector image 2 is leaned on
Close or connection presumptive area 3.And the specific direction of radar sector image is then related to the Z axis position of mobile phone gyroscope, to root
According to the Z axis position of presumptive area or predetermined point and mobile phone gyroscope, it may be determined that the display location of radar sector image.
Specifically, the Z axis position of the radar sector image position in the target image and the mobile phone gyroscope
Set correlation, Ke Yishi:
The fan shape center line of the radar sector image is consistent with the Z axis orientation of mobile phone gyroscope.
It is illustrated with the present embodiment:Assuming that the fan angle of radar sector image is 45 degree, if radar sector image
Fan shape center line overlapped with the Z axis of the mobile phone gyroscope, then the both sides of the Z axis position of mobile phone gyroscope, that is, radar sector diagram
The fan angle of the both sides of inconocenter line is 22.5 degree respectively.
Fig. 3 is three axis schematic diagram of mobile phone of embodiment of the present invention gyroscope, the X-axis of mobile phone gyroscope, the position of Y-axis and Z axis
Referring to FIG. 3, mobile phone is kept flat, x-axis is right-hand side, and y-axis is front, and z-axis is surface.
Based on above-described embodiment, step S100, if the judgement knows that the rotational angular velocity of mobile phone gyroscope reaches first
Predetermined threshold value then shows radar sector image, further includes before in the target image:
It is pre- to judge whether the Z axis rotational angular velocity reaches first for the Z axis rotational angular velocity for obtaining the mobile phone gyroscope
If threshold value.
In the present embodiment, judge whether the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, mainly judges Z
Whether axis rotational angular velocity reaches the first predetermined threshold value.Specifically, the Z axis for constantly obtaining the mobile phone gyroscope is needed to rotate
Angular speed compares the size of Z axis rotational angular velocity and the first predetermined threshold value, to judge whether Z axis rotational angular velocity reaches
One predetermined threshold value.
Based on above-described embodiment, the Z axis rotational angular velocity for obtaining the mobile phone gyroscope judges the Z axis rotation
Whether angular speed reaches the first predetermined threshold value, further includes before:
The all the sensors in the mobile phone are obtained, and recognize whether gyro sensor;
If there are the gyro sensor, the gyro sensor is registered;
The corresponding method of the sensor values variation of the gyro sensor is obtained, to change by the sensor values
Corresponding method obtains the rotational angular velocity and/or time value of the mobile phone gyroscope.
In the embodiment of the present invention, the rotational angular velocity for obtaining mobile phone gyroscope is needed, it is necessary to first collect mobile phone gyroscope.
Specifically, the present embodiment obtains all the sensors in mobile phone, gyro sensor is found in all the sensors, this step is
Cause application exception without configuration gyro sensor in the mobile phone having in order to prevent.Finding gyro sensor
Axis registers the gyro sensor, so that it may to take gyroscope all angles by the relevant class of gyro sensor
Value.
Specifically, in order to realize that the above process, developer can instantiate the management class of device sensor
SensorManager, the then sensor of the management class SensorManager examples of global traversal device sensor, to take
To all sensors;Then gyro sensor is found in all the sensors, if it does, just registration gyro sensors
Device.Further, it is possible to the monitoring class of sensor is inherited, such as SensorEventListener, to realize that sensor values variation institute is right
The method answered, it is therefore desirable to the method be obtained, the corresponding method of sensor values variation is entitled
OnSensorChanged can obtain the required angle of rotation speed of the embodiment of the present invention by onSensorChanged methods
Degree.
Based on above-described embodiment, step S101, the rotational angular velocity for obtaining the mobile phone gyroscope and the mobile phone
The angle of the radar sector image is arranged according to the rotational angular velocity and the current time value for the current time value of gyroscope
Position is spent, is specifically included:
S101.1 is based on prefixed time interval, obtains the Z axis rotational angular velocity of the mobile phone gyroscope and the mobile phone top
The current time value of spiral shell instrument, and rotational angle is calculated according to the Z axis rotational angular velocity and the current time value;
S101.2 repaints the radar sector image so that the radar sector image newly drawn is relative to original
Radar sector image rotates predetermined angle around the presumptive area and predetermined point, and the predetermined angle is the rotational angle.
Specifically, to realize that radar animation follows the rotation of mobile phone gyroscope and rotates, need to obtain mobile phone gyro in real time
The rotational angle of instrument is to be realized by prefixed time interval, i.e., is constantly obtained in very short time interval herein in real time
The rotational angle of mobile phone gyroscope, to reach a kind of real-time effect.
Specifically, the rotational angle of mobile phone gyroscope can be according to the current time value of Z axis rotational angular velocity and gyroscope
It is calculated, calculation formula is:
Rotational angle=Z axis rotational angular velocity * current time values.
It should be noted that the unit of the time value of mobile phone gyroscope is nanosecond, need first to carry out unit turn to time value
Rotational angle is calculated after changing again, for example, by unit by being converted to second, conversion proportion 1.0f/1000000000.0f nanosecond.
After the rotational angle for obtaining mobile phone gyroscope, you can repaint radar according to the rotational angle of mobile phone gyroscope
Sector image keeps the center line of radar sector image consistent with the Z axis of mobile phone gyroscope always, to be achieved that radar sector
Image follows the rotation of mobile phone gyroscope and the radar animation that rotates.
Based on above-described embodiment, step S101, the rotational angular velocity for obtaining the mobile phone gyroscope and the mobile phone
The angle of the radar sector image is arranged according to the rotational angular velocity and the current time value for the current time value of gyroscope
Position is spent, further includes later:
If detecting, the Z axis rotational angular velocity of the mobile phone gyroscope is less than the second predetermined threshold value, does not show the thunder
Up to sector image.
It is dynamic to open radar after the rotational angular velocity raising of mobile phone gyroscope reaches the first predetermined threshold value for the embodiment of the present invention
Draw, if correspondingly, mobile phone gyroscope rotational angular velocity decline reach the second predetermined threshold value after, radar animation can be stopped, i.e.,
Radar sector image is not shown.In general, the difference of the second predetermined threshold value and the first predetermined threshold value is in certain difference range, example
Such as, the first predetermined threshold value is 0.15rad/s, and the second predetermined threshold value can be 0.15rad/s, or 0.1rad/s also may be used
Think 0.2rad/s, then difference range is 0.05rad/s, i.e., what gyroscope speed when radar animation stops can be when opening
Near gyroscope speed;Preferably, gyroscope speed when radar animation stops is identical with gyroscope speed when opening.
In conclusion the embodiment of the present invention provides a kind of radar animated show method based on mobile phone gyroscope, make hardware
Sensor information is shown by the formal intuition of radar animation;It can also be to the unlatching opportunity of radar animation and radar
The fan angle of sector image is controlled, and many practical need may be implemented in the self-defined of both unlatching opportunity and fan angle
It asks, most of demand for animation based on sensor can be met, hardware information is associated with page presentation, it is preferably real
Now interact.In addition, the variations such as the fan-shaped size of radar animation, fan-shaped concrete shape, color can also according to actual needs and
Setting, the embodiment of the present invention are not specifically limited this.
Fig. 4 is a kind of radar animated show schematic device based on mobile phone gyroscope of the embodiment of the present invention, and the present invention is real
It applies example and a kind of radar animated show device based on mobile phone gyroscope is also provided, including:
Radar asorbing paint module 400, if for judging to know that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value,
Radar sector image is then shown in the target image;
Radar rotating module 401, rotational angular velocity and the mobile phone gyroscope for obtaining the mobile phone gyroscope
The angle position of the radar sector image is arranged according to the rotational angular velocity and the current time value for current time value,
So that the radar sector image by the target image presumptive area or predetermined point centered on rotated, to realize
Radar animation.
The device of the embodiment of the present invention can be used for executing the radar animated show side shown in FIG. 1 based on mobile phone gyroscope
The technical solution of method embodiment, implementing principle and technical effect are similar, and details are not described herein again.
Based on above-described embodiment, the radar asorbing paint module 400 specifically includes:
Radar drawing unit, if for judging to know that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value,
Radar sector image is drawn, the fan angle of the radar sector image is default display wide-angle;
Radar asorbing paint unit, for including in the target image by the radar sector image, the radar is fan-shaped
Position of the image in the target image is related to the Z axis position of mobile phone gyroscope, and pre- with the target image
It is related to predetermined point to determine region.
Based on above-described embodiment, position of the radar sector image in the target image and the mobile phone gyroscope
Z axis position it is related, specifically include:
The fan shape center line of the radar sector image is consistent with the Z axis orientation of mobile phone gyroscope.
Based on above-described embodiment, if the judgement knows that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value,
Radar sector image is then shown in the target image, further includes before:
It is pre- to judge whether the Z axis rotational angular velocity reaches first for the Z axis rotational angular velocity for obtaining the mobile phone gyroscope
If threshold value.
Based on above-described embodiment, the Z axis rotational angular velocity for obtaining the mobile phone gyroscope judges the Z axis rotation
Whether angular speed reaches the first predetermined threshold value, further includes before:
The all the sensors in the mobile phone are obtained, and recognize whether gyro sensor;
If there are the gyro sensor, the gyro sensor is registered;
The corresponding method of the sensor values variation of the gyro sensor is obtained, to change by the sensor values
Corresponding method obtains the rotational angular velocity and/or time value of the mobile phone gyroscope.
Based on above-described embodiment, the radar rotating module 401 specifically includes:
Angle calculation unit, for be based on prefixed time interval, obtain the mobile phone gyroscope Z axis rotational angular velocity and
The current time value of the mobile phone gyroscope, and angle of rotation is calculated according to the Z axis rotational angular velocity and the current time value
Degree;
Radar redraws unit, for repainting the radar sector image so that the radar sector image phase newly drawn
Predetermined angle is rotated around the presumptive area or predetermined point for original radar sector image, the predetermined angle is described
Rotational angle.
Based on above-described embodiment, the rotational angular velocity of the acquisition mobile phone gyroscope and working as the mobile phone gyroscope
The angle position of the radar sector image is arranged according to the rotational angular velocity and the current time value for preceding time value, it
After further include:
If detecting, the Z axis rotational angular velocity of the mobile phone gyroscope is less than the second predetermined threshold value, does not show the thunder
Up to sector image.
Fig. 5 is the block schematic illustration of radar animated show equipment of the embodiment of the present invention based on mobile phone gyroscope.It please refers to
Fig. 5, the embodiment of the present invention provide a kind of radar animated show equipment based on mobile phone gyroscope, including:Processor
(processor) 510, communication interface (Communications Interface) 520, memory (memory) 530 and bus
540, wherein processor 510, communication interface 520, memory 530 complete mutual communication by bus 540.Processor 510
The logical order in memory 530 can be called, to execute following method, including:If the rotation of mobile phone gyroscope is known in judgement
Angular speed reaches the first predetermined threshold value, then shows radar sector image in the target image;Obtain turning for the mobile phone gyroscope
Institute is arranged according to the rotational angular velocity and the current time value in the current time value of dynamic angular speed and the mobile phone gyroscope
The angle position of radar sector image is stated, so that the radar sector image is with presumptive area in the target image or predetermined
It is rotated centered on point, to realize radar animation.
The embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-transient including being stored in
Computer program on computer readable storage medium, the computer program include program instruction, when described program instructs quilt
When computer executes, computer is able to carry out the method that above-mentioned each method embodiment is provided, such as including:If hand is known in judgement
The rotational angular velocity of machine gyroscope reaches the first predetermined threshold value, then shows radar sector image in the target image;Described in acquisition
The current time value of the rotational angular velocity of mobile phone gyroscope and the mobile phone gyroscope according to the rotational angular velocity and described is worked as
The angle position of the radar sector image is arranged in preceding time value, so that the radar sector image is in the target image
It is rotated centered on presumptive area or predetermined point, to realize radar animation.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage
Medium storing computer instructs, and the computer instruction makes the computer execute the side that above-mentioned each method embodiment is provided
Method, such as including:If judgement knows that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, show in the target image
Show radar sector image;Obtain the current time value of the rotational angular velocity and the mobile phone gyroscope of the mobile phone gyroscope, root
The angle position of the radar sector image is set according to the rotational angular velocity and the current time value, so that the radar is fanned
Shape image by the target image presumptive area or predetermined point centered on rotated, to realize radar animation.
One of ordinary skill in the art will appreciate that:Realize that above equipment embodiment or embodiment of the method are only schematic
, wherein can be that physically separate component may not be physically separated for the processor and the memory, i.e.,
A place can be located at, or may be distributed over multiple network units.It can select according to the actual needs therein
Some or all of module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creative labor
In the case of dynamic, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It is realized by the mode of software plus required general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be expressed in the form of software products in other words, should
Computer software product can store in a computer-readable storage medium, such as USB flash disk, mobile hard disk, ROM/RAM, magnetic disc, CD
Deng, including some instructions use is so that a computer equipment (can be personal computer, server or the network equipment etc.)
Execute the method described in certain parts of each embodiment or embodiment.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, it will be understood by those of ordinary skill in the art that:It still may be used
With technical scheme described in the above embodiments is modified or equivalent replacement of some of the technical features;
And these modifications or replacements, various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution spirit and
Range.
Claims (10)
1. a kind of radar animated show method based on mobile phone gyroscope, which is characterized in that including:
If judgement knows that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, show that radar is fanned in the target image
Shape image;
The current time value for obtaining the rotational angular velocity and the mobile phone gyroscope of the mobile phone gyroscope, according to the angle of rotation
The angle position of the radar sector image is arranged in speed and the current time value, so that the radar sector image is with described
It is rotated centered on presumptive area or predetermined point in target image, to realize radar animation.
2. if according to the method described in claim 1, the it is characterized in that, rotational angular velocity for judging to know mobile phone gyroscope
The first predetermined threshold value is reached, then shows radar sector image in the target image, specifically includes:
If judging to know, the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, draws radar sector image, described
The fan angle of radar sector image is default display wide-angle;
Include in the target image by the radar sector image, the radar sector image is in the target image
Position is related to the Z axis position of mobile phone gyroscope, and related to the presumptive area of the target image and predetermined point.
3. according to the method described in claim 2, it is characterized in that, position of the radar sector image in the target image
It sets related to the Z axis position of mobile phone gyroscope, specifically includes:
The fan shape center line of the radar sector image is consistent with the Z axis orientation of mobile phone gyroscope.
4. if according to the method described in claim 2, the it is characterized in that, rotational angular velocity for judging to know mobile phone gyroscope
Reach the first predetermined threshold value, then shows radar sector image in the target image, further include before:
The Z axis rotational angular velocity for obtaining the mobile phone gyroscope, judges whether the Z axis rotational angular velocity reaches the first default threshold
Value.
5. wanting the method described in 4 according to right, which is characterized in that the Z axis rotational angular velocity for obtaining the mobile phone gyroscope,
Judge whether the Z axis rotational angular velocity reaches the first predetermined threshold value, further includes before:
The all the sensors in the mobile phone are obtained, and recognize whether gyro sensor;
If there are the gyro sensor, the gyro sensor is registered;
The corresponding method of the sensor values variation of the gyro sensor is obtained, with right by sensor values variation institute
The method answered obtains the rotational angular velocity and/or time value of the mobile phone gyroscope.
6. according to claim 1-5 any one of them methods, which is characterized in that the rotation for obtaining the mobile phone gyroscope
The current time value of angular speed and the mobile phone gyroscope, according to the rotational angular velocity and current time value setting
The angle position of radar sector image, specifically includes:
Based on prefixed time interval, obtain the mobile phone gyroscope Z axis rotational angular velocity and the mobile phone gyroscope it is current
Time value, and rotational angle is calculated according to the Z axis rotational angular velocity and the current time value;
Repaint the radar sector image so that the radar sector image newly drawn is relative to original radar sector image
Predetermined angle is rotated around the presumptive area and predetermined point, the predetermined angle is the rotational angle.
7. according to the method described in claim 1, it is characterized in that, the rotational angular velocity for obtaining the mobile phone gyroscope and
It is fan-shaped that the radar is arranged according to the rotational angular velocity and the current time value in the current time value of the mobile phone gyroscope
The angle position of image further includes later:
If detecting, the Z axis rotational angular velocity of the mobile phone gyroscope is less than the second predetermined threshold value, does not show the radar fan
Shape image.
8. a kind of radar animated show device based on mobile phone gyroscope, which is characterized in that including:
Radar asorbing paint module, if for judging to know that the rotational angular velocity of mobile phone gyroscope reaches the first predetermined threshold value, in mesh
Radar sector image is shown in logo image;
Radar rotating module, the current time of rotational angular velocity and the mobile phone gyroscope for obtaining the mobile phone gyroscope
Value, the angle position of the radar sector image is arranged according to the rotational angular velocity and the current time value, so that described
Radar sector image by the target image presumptive area and predetermined point centered on rotated, to realize that radar is dynamic
It draws.
9. a kind of radar animated show equipment based on mobile phone gyroscope, which is characterized in that including:
At least one processor;And
At least one processor being connect with the processor communication, wherein:
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy
Enough methods executed as described in claim 1 to 7 is any.
10. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited
Computer instruction is stored up, the computer instruction makes the computer execute the method as described in claim 1 to 7 is any.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810421732.6A CN108683807B (en) | 2018-05-04 | 2018-05-04 | Radar animation display method, device and equipment based on mobile phone gyroscope |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810421732.6A CN108683807B (en) | 2018-05-04 | 2018-05-04 | Radar animation display method, device and equipment based on mobile phone gyroscope |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108683807A true CN108683807A (en) | 2018-10-19 |
CN108683807B CN108683807B (en) | 2020-12-08 |
Family
ID=63803028
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810421732.6A Active CN108683807B (en) | 2018-05-04 | 2018-05-04 | Radar animation display method, device and equipment based on mobile phone gyroscope |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108683807B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013083060A1 (en) * | 2011-12-07 | 2013-06-13 | 东蓝数码股份有限公司 | Data exchange system based on mobile terminal state change |
CN103513788A (en) * | 2013-09-13 | 2014-01-15 | 广东欧珀移动通信有限公司 | Gesture recognition method and system based on gyroscope sensor and mobile terminal |
CN104166464A (en) * | 2013-05-17 | 2014-11-26 | 北京百度网讯科技有限公司 | Method, device and portable terminal for controlling panorama display |
CN104374363A (en) * | 2014-10-29 | 2015-02-25 | 广东欧珀移动通信有限公司 | Orientation method and device of mobile equipment |
CN106648365A (en) * | 2016-12-23 | 2017-05-10 | 网易(杭州)网络有限公司 | Screen anti-shake method and device for three-dimensional image |
CN106921796A (en) * | 2017-02-13 | 2017-07-04 | 上海斐讯数据通信技术有限公司 | A kind of method for controlling mobile terminal based on gyroscope |
-
2018
- 2018-05-04 CN CN201810421732.6A patent/CN108683807B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013083060A1 (en) * | 2011-12-07 | 2013-06-13 | 东蓝数码股份有限公司 | Data exchange system based on mobile terminal state change |
CN104166464A (en) * | 2013-05-17 | 2014-11-26 | 北京百度网讯科技有限公司 | Method, device and portable terminal for controlling panorama display |
CN103513788A (en) * | 2013-09-13 | 2014-01-15 | 广东欧珀移动通信有限公司 | Gesture recognition method and system based on gyroscope sensor and mobile terminal |
CN104374363A (en) * | 2014-10-29 | 2015-02-25 | 广东欧珀移动通信有限公司 | Orientation method and device of mobile equipment |
CN106648365A (en) * | 2016-12-23 | 2017-05-10 | 网易(杭州)网络有限公司 | Screen anti-shake method and device for three-dimensional image |
CN106921796A (en) * | 2017-02-13 | 2017-07-04 | 上海斐讯数据通信技术有限公司 | A kind of method for controlling mobile terminal based on gyroscope |
Non-Patent Citations (1)
Title |
---|
LINGHAI1223: "Android高德地图小图标跟随手机旋转实现", 《HTTPS://JINGYAN.BAIDU.COM/ARTICLE/75AB0BCBB7320CD6864DB205.HTML》 * |
Also Published As
Publication number | Publication date |
---|---|
CN108683807B (en) | 2020-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9842417B2 (en) | Computing device and method for simplifying point cloud of object | |
US10831333B2 (en) | Manipulating a camera perspective within a three-dimensional space | |
KR101625251B1 (en) | Tiltable user interface | |
US10289214B2 (en) | Method and device of controlling virtual mouse and head-mounted displaying device | |
US20160092080A1 (en) | Touch interface for precise rotation of an object | |
JP2016535363A (en) | Tilt motion for scrolling | |
JPH05266167A (en) | Method for controlling movement of graphic object | |
US9836980B2 (en) | Collision avoidance of arbitrary polygonal obstacles | |
WO2020211814A1 (en) | Orbiting flight control method and device, and terminal and storage medium | |
CN107238468A (en) | Discrimination method, device, equipment and the storage medium of mechanical arm tail end instrument barycenter | |
US11662817B2 (en) | Method for controlling gimbal by somatosensory controller, gimbal, somatosensory controller, and system | |
CN104331223A (en) | Intelligent setting method and intelligent setting device for function setting of intelligent wearable device | |
CN112095710A (en) | Excavator pose display method and device and excavator applying same | |
CN103853445B (en) | Method and equipment for controlling icons | |
CN111110272B (en) | Ultrasonic image measurement information display method, device and equipment and readable storage medium | |
CN110709797A (en) | Movable platform control method and device and movable platform | |
CN112181263B (en) | Touch screen drawing operation response method and device and computing equipment | |
CN108683807A (en) | A kind of radar animated show method, apparatus and equipment based on mobile phone gyroscope | |
CN108803669A (en) | Holder rotating direction control method, device, electronic equipment and storage medium | |
CN113626118B (en) | Method, device and equipment for displaying energy consumption in real time | |
CN102707917B (en) | Method and device for visualizing high-dimensional data | |
CN103324530A (en) | Calling method and device for orientation sensors of handheld mobile equipment | |
CN114299809A (en) | Direction information display method, display device, electronic equipment and readable storage medium | |
CN108724173B (en) | Robot motion control method, device and equipment and robot | |
CN112330528A (en) | Virtual makeup trial method and device, electronic equipment and readable storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |