The invention belongs to field of locating technology, particularly relate to a kind of pedometer and assist GPS localization method.
Background technology
Along with increasing of cellphone subscriber, mobile phone positioning function is extensively by customer acceptance and use.Mobile phone is provided with GPS (Global Position System, global positioning system), can be obtained the position of oneself by GPS consumer positioning on cell phone map.
GPS is the satellite navigation and location system set up by the U.S., utilizes this system, and user can realize round-the-clock, continuous, real-time three-dimensional navigation location in the world and test the speed; In addition, utilize this system, user can also carry out high-precision Time Transmission and high-precision precision positioning.The whole system of GPS is made up of space segment, ground control segment and User Part.
The space segment of GPS is made up of 24 GPS operational satellites, and these GPS operational satellites constitute gps satellite constellation jointly, wherein 21 for can be used for navigate satellite, 3 be activity backup satellite.These 24 satellite distribution are that the track of 55 ° runs around the earth at 6 inclination angles.The cycle of operation of satellite was about for 12 sidereal time.Every GPS operational satellites all sends the signal for navigator fix.GPS user utilizes these signals to carry out work just.
The control section of GPS is made up of the supervisory control system be made up of several tracking stations being distributed in the whole world, and according to the difference of its effect, these tracking stations are divided into again master station, monitoring station and injection station.According to the observation data of each monitoring station to GPS, calculate the ephemeris of satellite and the correction parameter etc. of satellite clock, and these data are injected in satellite by injection station go.
The User Part of GPS by GPS, data processing software and corresponding subscriber equipment as computer meteorologic instrument etc. form.Its effect is the signal that reception gps satellite sends, and utilizes these signals to carry out the work such as navigator fix.
Cellphone GPS, as the User Part belonging to GPS, receives the signal of GPS and processes.
The principle of gps signal process is calculate pseudorange between user and satellite by gps signal information, orients the position of user according to the pseudorange result of 4 or above number of satellites.Whole process comprises seizure satellite, tracking satellite, resolves three processes such as distance.Cellphone GPS is consuming time longer in the process catching satellite, the mobile phone electricity that whole process consumption is a large amount of.
The mode that GPS starts has cold start-up and startup temperature, and cold start-up refers to when GPS opens directly to be carried out again search of satellite and catches satellite, tracking satellite and resolve the processes such as distance.The locator data that startup temperature refers to according to last time when GPS opens continues compute location, and during startup temperature, GPS location just eliminates the process catching satellite.Relative to the locate mode of cold start-up, startup temperature mode locating speed is faster, but when user twice shift position is larger, this locate mode can cause position location to make mistakes.
Locate mode provided by the invention for being completed first time location by GPS, after determining customer location, re-use distance that pedometer calculates user movement determine user again mobile after position.With only use compared with GPS locate mode, computational process is more succinct, can save the electricity of mobile terminal.
In sum, existing uses the technology consumption mobile phone resources of GPS location many, position fixing process calculation of complex.Locate mode position fixing process of the present invention is simple, and positioning precision is high, reduces the resource consumption of cellphone GPS location.
Summary of the invention
The object of the embodiment of the present invention is to provide a kind of pedometer to assist GPS localization method, is intended to solve GPS and locates the large problem of opponent's machine energy consumption.
The embodiment of the present invention is achieved in that GPS localization method assisted by a kind of pedometer, comprising:
Starting hand-set GPS, location uses GPS to locate separately using the positional information of the user of acquisition as datum mark first, and this datum mark is as the reference point of again locating, and user locates as a reference point with the position location data of last time at every turn again after moving;
Start pedometer and mobile phone compass, pedometer and mobile phone compass are the application program be arranged on inside mobile phone, and pedometer is used for the step number of recording user movement, direction when mobile phone compass user judges that user moves;
According to the step number of pedometer recording user walking, mobile phone compass is used to obtain the direction of user's walking;
User walks one section when stopping, and pedometer calculates the displacement of user according to the step number of recording user movement, according to the direction of mobile phone compass record, determines the distance of user's movement in particular directions;
According to the result calculated, in user mobile phone map, find out corresponding position display to user, complete location.
In embodiments of the present invention, use GPS closes GPS after completing first time location.After this use pedometer calculating distance and mobile phone compass to determine the direction of user's movement, after user is at every turn mobile, all complete this process, again during running fix, the result choosing location last time is as a reference point.
In the present embodiment, user closes after using positioning function, and when again needing to use positioning function to open GPS, adopt the mode of GPS cold start-up, this mode can make the result of location more accurate.
With the Measures compare only using GPS to locate, the beneficial effect of the present embodiment is: the computational process simplifying GPS location, reduces the consumption of GPS location to mobile phone resources, improves the precision of mobile phone location.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
In embodiments of the present invention, use GPS to complete and locate first, close GPS after position receiver first, use pedometer and mobile phone compass colocated, the mobile phone resources consumption of GPS location can be reduced at this localization method.
The realization flow of GPS localization method assisted by the pedometer that Fig. 1 shows the embodiment of the present invention to be provided, and details are as follows:
In S101, location uses GPS to locate separately first, obtains the positional information of user as datum mark.
In the present embodiment, when user uses cellphone GPS to locate at every turn, GPS adopts the mode of cold start-up.After user completes mobile phone location, closing hand phone GPS, this method can reduce the resource consumption of GPS to mobile phone.
In the present embodiment, GPS completes positioning instant first and completes and catch satellite, tracking satellite, resolve the process of distance.It is that use four or above satellite resolve that GPS completes the necessary condition resolving distance, if GPS catch number of satellite also need again to catch satellite less than 4 until number of satellite reach 4 or more than.
In the present embodiment, GPS time of having located first time and speed and the computing capability of mobile phone and the number of satellite relevant with signal.
In S102, start pedometer and mobile phone compass, for the Distance geometry direction of recording user movement.
Before S102 implements, user installation pedometer and be mobile phone compass application program.
In S102 implements, user can select pedometer and mobile phone compass whether running background, or runs in current page display.
In S103, use the step number of pedometer recording user walking, use mobile phone compass to obtain the direction of user's walking.User can select pedometer as required, and pedometer needs record step number and calculates the function of distance, and mobile phone compass can respond to direction when user moves, and determines the direction of user's movement and the square distance moved up, owing to determining the position of user.
In S104, user walks one section when stopping, and pedometer calculates the displacement of user according to the step number of recording user movement, according to the direction of mobile phone compass record, determines the distance of user's movement in particular directions.
In embodiments of the present invention, pedometer and mobile phone compass coordinate the distance calculating user's movement in different directions.
In S104 implements, once user changes direction, pedometer just records the step number on new direction.
Before S104 implements, user sets pedometer and stops meter step to the time interval starting to calculate distance, after the time interval exceeding this setting when user's walking, start the distance calculating user's movement, determine a location point, complete one-time positioning, using this location point as the reference point of locating next time.
Before S104 implements, user's setting is after mobile phone compass senses user defence line this changes, and the distance of calculating user movement at once, determines the location point of user, using the reference point of this location point as location Calculation next time.
In S105, according to the result calculated, in user mobile phone map, find out corresponding position display to user, complete location.
Before S105 implements, user installs or preserves map in mobile phone, when marking out positional information on map behind the position determining user, is supplied to reference to user.
In embodiments of the present invention, the first time location that user uses cellphone GPS to complete, use pedometer and mobile phone compass to calculate the relative distance of user afterwards, the location point of locating according to first time and relative distance calculate the new location information of user.The method of locating owing to only using GPS is compared, and this process simplify the process of cellphone GPS location, improves positioning precision, reduces the consumption of GPS location to mobile phone resources.
With reference to figure 2, introduce an alternative embodiment of the invention in detail:
User closes GPS, pedometer and mobile phone compass after using pedometer assistance GPS location first time; If also need to use mobile phone location, again during starting hand-set GPS, adopt cold start-up GPS, open pedometer and mobile phone compass.The flow process location of S105 is reached afterwards again according to S101.
In the present embodiment again starting hand-set positioning function time, GPS adopt cold start-up be intended to the position more accurately determining user, prevent Wrong localization.
With reference to figure 3, in the embodiment of the present invention, the distance using and calculate user's movement in a particular direction worked in coordination with by pedometer and mobile phone compass, specific as follows:
In S301, mobile phone compass induction user moving direction.
Before the present embodiment, user opens mobile phone compass application program, the direction of mobile phone compass induction movement when the user is mobile.
In S302, pedometer recording user moves step number.
Before the present embodiment, user opens pedometer application program, after the direction of mobile phone compass induction movement when the user is mobile, and the step number of pedometer record the party upwards user's movement.
In S303, when user changes direction, mobile phone compass induction direction changes.
In the present embodiment, change direction in user's moving process, such as turn left, turn right, mobile phone compass at once respond to user side to change.
In S304, use the distance that pedometer calculating user moves up a upper side, pedometer starts to record user on new direction and moves step number.
In the present embodiment, when mobile phone compass senses that user changes direction, pedometer calculates the step number that a upper direction is used for movement, calculates the distance of user's movement.Afterwards, the distance of user's movement on pedometer record new direction.
GPS absolute fix and pedometer relative positioning combine location by the embodiment of the present invention, and cellphone subscriber only uses GPS position fixing process complicated, and it is many to consume mobile phone resources; Integrated positioning simplifies the process of mobile phone location, reduces the consumption of GPS to mobile phone resources, and can improve precision.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.