A kind of localization method, device and intelligent terminalTechnical field
The application is related to field of locating technology, more particularly to a kind of localization method, a kind of positioner andA kind of intelligent terminal.
Background technology
Location and navigation technology has become one of very important basic technology on mobile terminal.Wherein, pressAccording to region zones, positioning includes indoor positioning and outdoor positioning.Due to indoor positioning and the essence of outdoor positioningDegree is different, it is therefore desirable to use different positioning methods, and such as outdoor positioning generally uses global positioning systemSystem (Global Positioning System, GPS) mode position, and indoors generally using WIFI,The modes such as bluetooth are positioned.
Because indoor and outdoor use different positioning methods, user indoors, outer turnover when need to switch it is fixedPosition mode, therefore be accomplished by differentiating the indoor and outdoor environment residing for user.It is existing to be normally based onFeature is differentiated in image zooming-out room, and it builds common straight line, right angle feature according to indoors artificialTo judge to be in indoor or outdoors.But, above-mentioned decision procedure accuracy rate is relatively low, computationally intensive and veryPower consumption.
Therefore, a technical problem for needing those skilled in the art urgently to solve at present is exactly:Propose oneLocalization method, device and intelligent terminal are planted, accurately to differentiate to indoor and outdoor.
The content of the invention
The embodiment of the present application technical problem to be solved is to provide a kind of localization method, with accurately to roomIt is inside and outside to be differentiated.
Accordingly, the embodiment of the present application additionally provides a kind of positioner and a kind of intelligent terminal, to protectDemonstrate,prove the realization and application of the above method.
In order to solve the above problems, the embodiment of the present application discloses a kind of localization method, including:Collection is extremelyFew two kinds of data, wherein, the data include location data;Room is performed according at least two dataIt is inside and outside to judge, determine indoor and outdoor positioning result.
Optionally, the location data includes:Sensing data and global position system GPS data.
Optionally, the gps data includes:Number of satellites and satellite description information;The sensorData include absolute force;Then it is described collection at least two data, including:Gather number of satellites, satelliteAt least two data in description information and absolute force.
Optionally, the determination step of the gps data includes:Message segment is parsed from gps data,Number of satellites and/or satellite description information are obtained from the message segment.
Optionally, the determination step of the sensing data includes:According to adding that acceleration transducer is measuredVelocity information calculates step number;The absolute force of each step is calculated according to the geomagnetic data that Magnetic Sensor is measured.
Optionally, it is described to perform indoor and outdoor judgement according at least two data, it is determined that indoor outside fixAs a result, including:The first positioning result is determined according to number of satellites, second is determined according to satellite description informationPositioning result, and determine the 3rd positioning result according to absolute force;According to the first positioning result, secondAt least two in positioning result and the 3rd positioning result, which perform indoor and outdoor, judges, it is determined that indoor outside fix knotReally.
Optionally, the step of determining the first positioning result according to the number of satellites includes:Count first pre-Put the first ratio that the number of satellites in the time is more than first threshold;First ratio and first are sentencedDetermine scope to be compared, the first positioning result is determined according to comparative result, wherein, the first positioning knotFruit includes:It is indoor and outdoor or uncertain.
Optionally, the step of determining the second positioning result according to the satellite description information includes:From describedThe corresponding elevation angle of each satellite and signal to noise ratio are obtained in satellite description information;Elevation angle is exceeded into Second ThresholdAnd signal to noise ratio is used as target satellite more than the satellite of the 3rd threshold value;Positioning is performed according to the target satellite,The second positioning result is determined, wherein, second positioning result includes:It is indoor and outdoor or uncertain.
Optionally, positioning is performed according to the target satellite, determines the second positioning result, including:It is determined thatThe number of target satellite, the number of calculating target satellite and the second of satellite description information Satellite total numberRatio;Second ratio and the second judgement scope are compared, determine that second determines according to comparative resultPosition result.
Optionally, the step of determining three positioning results according to the absolute force, including:According to preset stepAbsolute force in number determines the 3rd positioning result, wherein, the 3rd positioning result includes:Indoor,It is outdoor or uncertain.
Optionally, the 3rd positioning result is determined according to the magnetic field intensity in preset step number, including:DescribedThe variance of the magnetic field intensity is calculated in preset step number;The variance is compared with the 4th threshold value, according toThe 3rd positioning result is determined according to comparative result.
Optionally, at least two data are gathered, in addition to:Ambient light is obtained in the second preset time to lead toAmount;Then indoor and outdoor is performed according at least two data to judge, determine indoor and outdoor positioning result, also wrapInclude:The 4th positioning result is determined according to the ambient light fluxes;According to the first positioning result, the second positioningAs a result, at least three kinds in the 3rd positioning result and the 4th positioning result perform indoor and outdoor and judged, determine roomInside and outside positioning result.
Optionally, the 4th positioning result is determined according to the ambient light fluxes, including:Judge the environmentWhether luminous flux is more than the 5th threshold value;When the ambient light fluxes are more than five threshold values, determine that the 4th determinesPosition result is in outdoor;When the ambient light fluxes are not more than five threshold values, the 4th positioning knot is determinedFruit is uncertain.
Optionally, in addition to:Effective gps data is obtained, is sentenced according to the effective gps dataWhether disconnected current location is in geography fence;If current location is in the geography fence, foundation is performedThe step of gps data obtains number of satellites, satellite description information;If current location is not enclosed in the geographyIn column, start outdoor positioning system and perform positioning.
Optionally, current location is judged whether in geography fence according to the effective gps data,Including:The effective gps data correspondence geography fence is determined, the geography fence is obtained at leastTwo geographical location information to angular vertex;Detect the effective gps data whether described diagonalIn the geographical location information correspondence geography fence on summit.
Optionally, in addition to:When indoor and outdoor positioning result is outdoor, start outdoor positioning system and performPositioning;When indoor and outdoor positioning result is interior, start indoor locating system and perform positioning;Work as indoor and outdoorWhen positioning result is does not know, start outdoor positioning system and indoor locating system performs positioning.
Optionally, start outdoor positioning system and indoor locating system is performed after positioning, in addition to:According toThe directional information of current intelligent terminal is determined according to sensor information;Judge currently when according to the directional informationPoint to building, and indoor precision is when being more than outdoor precision, using indoor locating system generation positioning outputAs a result;When judging to not currently point to building according to the directional information, and outdoor precision is not more than interiorDuring precision, using indoor locating system generation positioning output result;Work as when according to directional information judgementPreceding sensing building, and indoor precision is when being not more than outdoor precision, is generated and positioned using outdoor positioning systemOutput result;When judging to not currently point to building according to the directional information, and outdoor precision is more than roomDuring interior precision, using outdoor positioning system generation positioning output result.
The embodiment of the present application also discloses a kind of positioner, including:Acquisition module, for gathering at leastTwo kinds of data, wherein, the data include location data;Indoor and outdoor determination module, for according to describedAt least two data perform indoor and outdoor and judged, determine indoor and outdoor positioning result.
Optionally, the location data includes:Sensing data and global position system GPS data.
Optionally, the gps data includes:Number of satellites and satellite description information;The sensorData include absolute force;The acquisition module, for gathering number of satellites, satellite description information and groundAt least two data in magnetic intensity.
Optionally, the acquisition module, including:GPS gathers submodule, for from gps dataMessage segment is parsed, number of satellites and/or satellite description information are obtained from the message segment.
Optionally, the acquisition module, including:Earth magnetism gathers submodule, for according to acceleration sensingThe acceleration information of device measurement calculates step number;Each step is calculated according to the geomagnetic data that Magnetic Sensor is measuredAbsolute force.
Optionally, the indoor and outdoor determination module, including:Submodule is positioned, for according to number of satellitesThe first positioning result is determined, the second positioning result is determined according to satellite description information, and according to ground magnetic strengthDegree determines the 3rd positioning result;Decision sub-module, for according to the first positioning result, the second positioning resultIndoor and outdoor is performed with least two in the 3rd positioning result to judge, determines indoor and outdoor positioning result.
Optionally, the positioning submodule, including:First positioning unit, for count first it is preset whenThe interior number of satellites is more than the first ratio of first threshold;First ratio and first are judged into modelEnclose and be compared, the first positioning result is determined according to comparative result, wherein, the first positioning result bagInclude:It is indoor and outdoor or uncertain.
Optionally, the positioning submodule, including:Second positioning unit, for being described from the satelliteThe corresponding elevation angle of each satellite and signal to noise ratio are obtained in information;Elevation angle is exceeded into Second Threshold and signal to noise ratioSatellite more than the 3rd threshold value is used as target satellite;Positioning is performed according to the target satellite, second is determinedPositioning result, wherein, second positioning result includes:It is indoor and outdoor or uncertain.
Optionally, the second positioning unit, the number for determining target satellite calculates of target satelliteSecond ratio of number and satellite description information Satellite total number;Second ratio and second are judged into modelEnclose and be compared, the second positioning result is determined according to comparative result.
Optionally, the positioning submodule, including:3rd positioning unit, for according in preset step numberAbsolute force determine the 3rd positioning result, wherein, the 3rd positioning result includes:It is indoor and outdoorOr it is uncertain.
Optionally, the 3rd positioning unit, the side for calculating the magnetic field intensity in the preset step numberDifference;The variance is compared with the 4th threshold value, the 3rd positioning result is determined according to comparative result.
Optionally, the acquisition module, in addition to:Luminous flux gathers submodule, for preset secondAmbient light fluxes are obtained in time;The positioning submodule, is additionally operable to determine according to the ambient light fluxes4th positioning result;The decision sub-module, be additionally operable to according to the first positioning result, the second positioning result,At least three kinds in 3rd positioning result and the 4th positioning result perform indoor and outdoor and judge, determine that indoor and outdoor is determinedPosition result.
Optionally, the positioning submodule, including:4th positioning unit, for judging the ambient lightWhether flux is more than the 5th threshold value;When the ambient light fluxes are more than five threshold values, the 4th positioning is determinedAs a result it is in outdoor;When the ambient light fluxes are not more than five threshold values, the 4th positioning result is determinedIt is uncertain.
Optionally, in addition to:Geography fence determination module, for obtaining effective gps data, according toJudge current location whether in geography fence according to the effective gps data;If current location is in instituteState in geography fence, trigger satellite acquisition module;If current location is not in the geography fence, triggeringLocating module.
Optionally, the geography fence determination module, including:Fence determination sub-module, for determiningEffective gps data correspondence geography fence is stated, at least two pairs of angular vertexs of the geography fence are obtainedGeographical location information;Fence detection sub-module, for detect the effective gps data whetherIn the geographical location information correspondence geography fence to angular vertex.
Optionally, in addition to:Locating module, for when indoor and outdoor positioning result for it is outdoor when, priming chamberOutside fix system performs positioning;When indoor and outdoor positioning result is interior, start indoor locating system and performPositioning;When indoor and outdoor positioning result is does not know, start outdoor positioning system and indoor locating system is heldRow positioning.
Optionally, the locating module, is additionally operable to determine the side of current intelligent terminal according to sensor informationTo information;When judging to currently point to building according to the directional information, and indoor precision is more than outdoor essenceWhen spending, using indoor locating system generation positioning output result;Judge currently when according to the directional informationDo not point to building, and outdoor precision is when being not more than indoor precision, is generated and positioned using indoor locating systemOutput result;When judging to currently point to building according to the directional information, and indoor precision is not more than roomDuring outer precision, using outdoor positioning system generation positioning output result;Judge when according to the directional informationNot currently point to building, and outdoor precision, when being more than indoor precision, it is fixed to be generated using outdoor positioning systemPosition output result.
The embodiment of the present application also discloses a kind of intelligent terminal, and the intelligent terminal includes:It is memory, aobviousShow device, processor and input block;The processor is used to perform any institutes of the claims 1-17The method stated.
Compared with prior art, the embodiment of the present application includes advantages below:
In the embodiment of the present application, at least two data can be gathered, then according to described at least twoData perform indoor and outdoor and judged, determine indoor and outdoor positioning result, and it is fixed to be performed jointly by least two dataPosition, improves the accuracy of positioning, and amount of calculation is less, does not result in the consumption of the resources such as electricity.
Brief description of the drawings
Fig. 1 is a kind of step flow chart of localization method embodiment of the application;
Fig. 2 is the step flow chart of gps data positioning in another localization method embodiment of the application;
Fig. 3 is the step flow chart of another localization method embodiment of the application;
Fig. 4 is the schematic diagram of geography fence in the embodiment of the present application;
Fig. 5 is that the step of the first indoor outside fix judges in another localization method embodiment of the application flowsCheng Tu;
Fig. 6 is the step flow chart of another localization method embodiment Satellite location determination of the application;
Fig. 7 is the step flow chart of magnetic orientation judgement in another localization method embodiment of the application;
Fig. 8 be the application another localization method embodiment in the step flow that judges of second indoor and outdoorFigure;
Fig. 9 is the step flow chart of positioning input judgement in another localization method embodiment of the application;
Figure 10 is a kind of structured flowchart of positioner embodiment of the application;
Figure 11 is the structured flowchart of another positioner embodiment of the application;
Figure 12 is the structured flowchart of positioning submodule in another positioner embodiment of the application;
Figure 13 is a kind of structured flowchart of intelligent terminal embodiment of the application.
Embodiment
To enable above-mentioned purpose, the feature and advantage of the application more obvious understandable, below in conjunction with the accompanying drawingsThe application is described in further detail with embodiment.
One of core idea of the embodiment of the present application is, proposes a kind of localization method, device and intelligence eventuallyEnd, accurately to differentiate to indoor and outdoor.At least two data can be gathered, then according to described in extremelyFew two kinds of data perform indoor and outdoor and judged, determine indoor and outdoor positioning result, common by least two dataPositioning is performed, the accuracy of positioning is improved, and amount of calculation is less, does not result in the consumption of the resources such as electricity.
Embodiment one
Reference picture 1, shows a kind of step flow chart of localization method embodiment of the application, specifically may be usedTo comprise the following steps:
Step 102, at least two data are gathered, wherein, the data include location data.
Step 104, perform indoor and outdoor according at least two data to judge, it is determined that indoor outside fix knotReally.
User, can be based in intelligent terminal when carrying out indoor and outdoor positioning judgement using intelligent terminalHardware gathers at least two data, such as gathers earth magnetism by GPS gathers gps data, by sensorData, and gather in the data such as bluetooth, WIFI, the present embodiment, the data of collection at least include determiningPosition data, location data is included by positioning the data determined, such as above-mentioned gps data, geomagnetic dataDeng.
Then at least two data according to collection perform indoor and outdoor and judged, i.e. every kind of number for collectionAccording to can determine that corresponding positioning result, each positioning result combined, compares and performs indoor and outdoorJudge, it is determined that be indoor and outdoor positioning result, including indoor and outdoor etc..
To sum up, at least two data can be gathered, then indoor and outdoor are performed according at least two dataJudge, determine indoor and outdoor positioning result, positioning is performed jointly by least two data, improve positioningAccuracy, and amount of calculation is less, does not result in the consumption of the resources such as electricity.
In the present embodiment, location data includes:Sensing data and global position system GPS data;The gps data includes:Number of satellites and satellite description information;The sensing data includes earth magnetismIntensity.Further, it is also possible to other data such as ambient light fluxes be gathered, so that passing through a variety of data performs roomIt is inside and outside to judge, improve positioning precision.
Then in the present embodiment, at least two data are gathered, including:Gather number of satellites, satellite description letterAt least two data in breath and absolute force, can also gather other data such as ambient light fluxes.
Embodiment two
When performing indoor outside fix in the present embodiment, positioning can be integrated based on various ways, can includedDetected using building correspondence geography fence, pass through the various ways such as satellite, luminous flux, magnetic informationIndoor outside fix is carried out, indoor or outdoors are currently located at so as to position, to call corresponding alignment system accurateReally positioned.
Exemplified by judgement determines positioning result is performed by the number of satellites in gps data, satellite description information
Reference picture 2, shows the step that gps data is positioned in another localization method embodiment of the applicationRapid flow chart, specifically includes following steps:
Step 202, number of satellites, satellite description information are obtained according to gps data.
User can hold when carrying out indoor and outdoor positioning judgement using intelligent terminal according to gps dataRow judges.In the present embodiment, gps data is first obtained based on GPS location, then from gps dataObtain number of satellites, satellite description information.Wherein, satellite description information includes being used to describe each satelliteData, such as satellite number, position data, signal to noise ratio.
Step 204, indoor and outdoor is performed respectively according to the number of satellites and satellite description information to judge.
Step 206, indoor and outdoor positioning result is determined.
Indoor and outdoor can be performed respectively for number of satellites and satellite description information to judge, i.e., using satelliteNumber performs indoor and outdoor and judged, and is judged using satellite description information execution indoor and outdoor, respectively obtains correspondingThen two positioning results are carried out comprehensive analysis, determine indoor and outdoor positioning result by positioning result, are improvedThe accuracy of positioning.
Wherein, indoor and outdoor positioning result is indoor and outdoor including being positioned at, or does not know indoors stillIt is outdoor.Subsequently according to indoor and outdoor positioning result corresponding alignment system can also be called to be positioned, for examplePositioning result is can start outdoor positioning system and indoor locating system simultaneously when not knowing, so that accuratelyProgress position.
To sum up, number of satellites, satellite description information can be obtained based on existing gps data, thenIndoor and outdoor is performed respectively according to the number of satellites and satellite description information to judge, it is determined that indoor outside fix knotReally, positioned jointly by the different satellite informations of gps data, improve the accuracy of positioning, and calculateAmount is little, does not result in the consumption of the resources such as electricity.
Above-mentioned one kind side that description positioning and indoor and outdoor judge only by taking number of satellites, satellite description information as an example, can also be using collection number of satellites, satellite description information, absolute force and ring in formula, actual treatmentAt least two any combination performs positioning in the luminous flux of border and indoor and outdoor judges, so as to pass through a variety of dataJudgement is performed, positioning precision is improved.
In the present embodiment, not only indoor and outdoor can be performed by the positioning of a variety of data and judged, can also setPut the judgement of the auxiliary positionings such as geography fence.
Reference picture 3, shows the step flow chart of another localization method embodiment of the application, specificallyIt may include steps of:
Step 302, gps data is obtained.
Step 304, judge whether the gps data is effective.
User can use the GPS positioning system of intelligent terminal to be positioned, and GPS positioning system can be withFor the acquiescence alignment system of intelligent terminal, generally positioned using GPS positioning system, so as to obtainGps data, can determine whether be positioned according to GPS according to the gps data.IfIt can be positioned according to GPS, then gps data is effective, conversely, can not be positioned according to GPS,Then GP data invalids.
If so, i.e. gps data effectively, performs step 306;If it is not, i.e. gps data is invalid, holdRow step 308.
Step 306, judge current location whether in geography fence according to the effective gps data.
When gps data is effective, the judgement of geography fence can be performed, that is, whether judges current locationIn geography fence.The present embodiment is pre-configured with the geography fence of each building.As shown in figure 3, buildingBuild the outer certain distance (such as 100 meters) of thing boundary rectangle and set up geography fence, for judging that mobile terminal isNo entrance building near zone.Generally determine that geography fence region principle can include:Outside geography fenceTypically there is relatively good outdoor positioning condition in portion (the open gps signal in such as space is good).Geography fenceCan be using the rectangle shown in Fig. 4, it would however also be possible to employ other polygons, the embodiment of the present application is not done to thisLimit.By taking rectangle geography fence as an example, the northwest corner of geography fence boundary rectangle and the longitude and latitude of southeast cornerSpend coordinate representation, i.e. northwest corner (Fig. 4 upper left corners) P1 (lati1, long1), southeast corner (Fig. 4 right sideInferior horn) P2 (lati2, long2).
Current geographical location information, the longitude and latitude of such as current location are can determine according to the gps dataCoordinate, it is assumed that be (gpsx, gpsy), judge the latitude and longitude coordinates whether in geography fence.With above-mentionedIn Fig. 3 exemplified by P1, P2 correspondence geography fence, if meeting lati1<gpsx<Lati2, and long1<gpsy<Long2, then the latitude and longitude coordinates are in geography fence.
If so, judging current location in geography fence according to the effective gps data, performStep 308;If it is not, current location is judged not in geography fence according to the effective gps data,Perform step 314.
Step 308, indoor outside fix is performed to judge.
When gps data is invalid, or gps data is effective and the effective gps data judges currentPosition can perform indoor outside fix in geography fence, now and judge.In the present embodiment, indoor and outdoor is fixedPosition judges to include the interior according to execution such as number of satellites, satellite description information, luminous flux and magnetic informationsIt is outer to judge.
Wherein, the first positioning result is determined according to number of satellites, determines that second determines according to satellite description informationPosition result, determines the 3rd positioning result, and determine the 4th according to absolute force information according to absolute forcePositioning result, then can be according in the first positioning result, the second positioning result and the 3rd positioning resultAt least two, which perform indoor and outdoor, judges, determines indoor and outdoor positioning result, the first positioning result of acceptable foundation,At least three kinds in second positioning result, the 3rd positioning result and the 4th positioning result perform indoor and outdoor and sentenceIt is fixed, determine indoor and outdoor positioning result.
In the example of hgure 5, based on number of satellites, satellite description information, luminous flux, with ground magnetic strengthIndoor outside fix is performed supplemented by degree to judge.
Reference picture 5, shows that the first indoor and outdoor judges in another localization method embodiment of the applicationStep flow chart, specifically may include steps of:
Step 502, perform indoor and outdoor according to number of satellites to judge, determine the first positioning result.
The present embodiment parses message segment from gps data, and number of satellites is obtained from the message segmentAnd/or satellite description information, the first message segment can be such as parsed from gps data, from described firstNumber of satellites is obtained in message segment, the number of satellites in the first preset time is then counted and is more than the first thresholdFirst ratio of value, first ratio and the first judgement scope are compared.Wherein, when describedWhen one ratio is more than the first judgement scope, the first positioning result is outdoor;When first ratio is less than theDuring one judgement scope, the first positioning result is interior;When the first ratio is in the range of the first judgement, theOne positioning result is uncertain, i.e., can not temporarily be determined as indoor or outdoor.
The first message segment such as $ GPGSA message segments are parsed from gps data such as Gps NMEA messages,Wherein, comprising visible satellite number SV.The present embodiment can set a caching array, and length is firstPreset time such as 10 seconds, then can count SV numbers in nearest 10 seconds and be more than first threshold SV_THRESThe first ratio P_SV, first ratio P_SV characterizes GPS visible satellites number this index in outdoorProbability.Relative set first judges scope S1, and the first judgement scope is used to be used as number of satellites pairOne of standard of indoor and outdoor judgement is answered, so as to which first ratio is compared with the first judgement scopeCompared with determining the first positioning result PR1.Such as first judges scope S1 ∈ (0.2,0.7), then:
So as to by counting the number of satellites in a period of time, judge indoor and outdoor, improve what is judgedAccuracy.
Step 504, the elevation angle and signal to noise ratio according to satellite perform indoor and outdoor and judged, determine the second positioningAs a result.
In the embodiment of the present application, the second message segment can be parsed from gps data, from described secondSatellite description information is obtained in message segment.$ GPGSV message segments are parsed such as from Gps NMEA messages,The message includes to the satellite description information of each tracking satellite:Satellite number SID, elevation angle EA,Azimuth AA, signal to noise ratio snr etc..Room is performed so as to the elevation angle based on each satellite and signal to noise ratioIt is inside and outside to judge, following sub-step is specifically included as shown in Figure 6:
Sub-step 602, parses the second message segment from gps data, is obtained from second message segmentTake satellite description information.
Sub-step 604, obtains the corresponding elevation angle of each satellite and signal to noise ratio from the satellite description information.
Sub-step 606, elevation angle is exceeded Second Threshold and signal to noise ratio more than the 3rd threshold value satellite asTarget satellite.
In actual treatment, the low satellite signal to noise ratio of elevation angle can be reduced first when close to building, based on thisPrinciple the present embodiment pre-sets Second Threshold i.e. elevation angle threshold value EA_THRES, and the 3rd threshold valueThat is snr threshold SNR_THRES.Therefore, $ GPGSV messages are parsed from Gps NMEA messagesSection, information description of the message to each tracking satellite includes:Satellite number SID, elevation angle EA,Azimuth AA, signal to noise ratio snr.
Then elevation angle EA and EA_THRES are compared for each satellite, and by signal to noise ratioSNR is compared with SNR_THRES, is calculated over elevation angle and signal to noise ratio exceedes respective thresholdSatellite is target satellite, i.e. the EA of target satellite>EA_THRES and SNR>SNR_THRES.
Sub-step 608, determines the number of target satellite, calculates the number and satellite description letter of target satelliteCease the second ratio of Satellite total number.
Target satellite Sp number is counted, elevation angle and signal to noise ratio is calculated over more than respective thresholdTarget satellite Sp numbers, account for ratio i.e. the second ratio of satellite description information Satellite Sr total numbersP_elevation_ang, P_elevation_ang are characterized is positioned at the general of outdoor based on elevation angle and signal to noise ratioRate.
Sp=i | EAi>EA_THRES&&SNRi>SNR_THRES}
Sr=i | EAi>EA_THRES}
Sub-step 610, second ratio and the second judgement scope are compared.
When second ratio, which is more than second, judges scope, sub-step 612 is performed;When the described second ratioWhen rate is less than the second judgement scope, sub-step 614 is performed;When the second ratio is in the range of the second judgement,Perform sub-step 616.
Sub-step 612, it is outdoor to determine the second positioning result.
Sub-step 614, it is interior to determine the second positioning result.
Sub-step 616, it is uncertain to determine the second positioning result.
In the present embodiment, the second judgement scope S2 is pre-configured with, the second judgement scope is used to be used as baseOne of standard judged inside and outside elevation angle and signal to noise ratio respective chamber/chambers.Based on the second ratioP_elevation_ang and second judges scope S2 comparison, determines the second positioning result PR2.For exampleSecond judges scope S2 ∈ (0.1,0.7), then:
So as to account for the ratio of total satellite by counting target satellite in satellite description information, indoor and outdoor is carried outJudge, improve the accuracy judged.
Step 506, perform indoor and outdoor according to ambient light fluxes to judge, determine the 4th positioning result.
The present embodiment is additionally contemplates that luminous flux when carrying out indoor and outdoor judgement, can be by the ring of intelligent terminalBorder optical sensor measuring environment luminous flux, and it is pre-configured with the logical threshold value of the 5th threshold value i.e. outdoor opticalLIGHT_THRES.Wherein, it is difficult to judge indoor and outdoor by ambient light fluxes during usual nightShould, i.e., night when ambient light fluxes height to judging that residing indoor and outdoor reference value is relatively low, therefore,The present embodiment can perform indoor and outdoor by ambient light fluxes during the day and judge, can pre-set daytimeCorresponding second preset time is for example daily 7 points to 5 points, and specific set can be according to longitude and latitude, time zoneThe light application time configuration of actual geographic environment.It is to have in the second preset time of solar irradiation on daytime,LIGHT_THRES is configured, such as LIGHT_THRES is 2000lx.
So as to obtain ambient light fluxes in the second preset time, interior is performed according to the ambient light fluxesIt is outer to judge, the 4th positioning result is determined, including:Judge whether the ambient light fluxes are more than the 5th threshold value;When the ambient light fluxes are more than five threshold values, it is in outdoor to determine the 4th positioning result;When describedWhen ambient light fluxes are not more than five threshold values, determine that the 4th positioning result is uncertain.
In the second preset time with solar irradiation, measured by the ambient light sensor of intelligent terminalAmbient light fluxes P_light, when then detecting whether P_light is more than LIGHT_THRES, so as to sentenceIt is fixed whether to be in outdoor, for example configure P_light>LIGHT_THRES, is 1 in outdoor probability, otherwiseDo not know, in outdoor or indoor, accordingly to obtain the 3rd positioning result PR3:
Also, outside the second preset time, the 4th positioning result can also be configured to not know.
So as in the second preset time with solar irradiation, be sentenced by ambient light fluxes to outdoorIt is fixed, provide more basis on location for indoor outside fix.
According in the first positioning result, the second positioning result, the 3rd positioning result and the 4th positioning resultAt least three kinds perform indoor and outdoor and judge, determine indoor and outdoor positioning result, then this example is according to the first positioning knotReally, the second positioning result and the 4th positioning result first carry out step indoor and outdoor judgement, can when performing and judgingSo that each positioning result to be compared, it is determined whether there is identical positioning result, i.e., two or more knotsFruit is indoor and outdoor or uncertain, so that using identical positioning result as indoor and outdoor positioning result, onDecision process alternatively referred to as voting process is stated, it is specific as follows:
Step 508, judge whether to can determine indoor and outdoor positioning result by ballot.
Then the ballot of the first positioning result, the second positioning result and the 4th positioning result is used, to determineIndoor and outdoor positioning result.Wherein, when in the second preset time, the 4th positioning result can be configuredFor uncertain or sky, space-time is being configured to, is only passing through the first positioning result, the second positioning result.
In the present embodiment, ballot can be to determine a kind of mode of indoor outside fix, can be fixed for eachPosition result configures a ticket, then corresponding indoor and outdoor positioning result is including three kinds, i.e., indoor and outdoor and not trueIt is fixed, so which result above-mentioned first, second, the 4th positioning result is, it is that the result throws a ticket,So as to regard the most result of poll as indoor and outdoor positioning result.First positioning result is interior, and second determinesPosition result for interior, the 4th positioning result be it is uncertain, then indoor 2 ticket, outdoor 0 ticket and do not know 1Ticket, indoor and outdoor positioning result is interior.
When being voted using above three positioning result, indoor and outdoor positioning result can be directly determined, alsoThe situation of each ticket of three kinds of results is likely to occur, indoor and outdoor positioning result now can not be directly determined.If thenIt is that indoor and outdoor positioning result can determine by judgement of voting, performs step 512;If it is not, i.e. logicalCross ballot to judge not can determine that indoor and outdoor positioning result, perform step 510.
Step 510, second ballot is performed by the 3rd positioning result of magnetic orientation.
Step 512, indoor and outdoor positioning result is determined.
After ballot is performed by the first, second, the 4th positioning result, it is impossible to it is determined that indoor outside fix knotDuring fruit, magnetic information can be obtained, so that be that the 3rd positioning result performs second ballot by magnetic orientation result,As shown in fig. 7, determining that the 4th positioning result includes following sub-step by magnetic orientation:
Sub-step 702, step number is calculated according to the acceleration information that acceleration transducer is measured.
Intelligent terminal can measure acceleration information using acceleration transducer such as 3 axis accelerometers, thenStep number is calculated based on acceleration information, wherein, acceleration information is { ax, ay, az }, passes through equation below meterCalculate acceleration strength S a:
Then acceleration intensity peak can be searched according to acceleration strength S a, counts corresponding step numberMeter step Stepi, wherein, i is 1,2 ... etc.
Sub-step 704, the magnetic field intensity of each step is calculated according to the geomagnetic data that Magnetic Sensor is measured.
Intelligent terminal can measure geomagnetic data using Magnetic Sensor such as 3 axial magnetic sensors such as { mx, my, mz },Based on geomagnetic data calculating magnetic field strength S m, equation below can be used:
Then n geomagnetic data { Sm is measured in each stepi, i=1...n }, then calculate each step magnetic field it is strongSpend Ss:
Sub-step 706, calculates the variance of the magnetic field intensity in the preset step number.
The present embodiment can calculate the variance of the magnetic field intensity in preset step number, set preset step number pairThe length sliding window (such as 10 steps) answered, it is assumed that sliding window length is b+1, then { Smi, i=n-b...n }, thenCalculate the variance of the magnetic field intensity in the sliding window:
Sub-step 708, calculates the 3rd ratio that the variance is less than the 4th threshold value.
In the present embodiment, one is pre-configured withBuffering queue so that each magnetic field for storing the length is strongThe variance of degree, and the 4th threshold value, i.e. variance threshold values δ _ thres are configured, then count in buffering queueThe 3rd ratio P_MAG_FLUC.
Sub-step 710, the 3rd ratio and the 3rd judgement scope are compared.
Sub-step 712, it is outdoor to determine the 3rd positioning result.
Sub-step 714, it is interior to determine the 3rd positioning result.
Sub-step 716, determines that the 3rd positioning result is uncertain.
The embodiment of the present application is pre-configured with the 3rd judgement scope S3, and the 3rd judgement scope is used to be used as baseOne of standard judged inside and outside the magnetic field intensity respective chamber/chambers of earth magnetism.Then by the 3rd ratioThe judgements of P_MAG_FLUC and the 3rd scope S3 is compared, and determines the 3rd positioning result PR4.For example3rd judges scope S4 ∈ (0.2,0.8), then:
Judged so as to which geomagnetic data performs outdoor, more basis on location are provided for indoor outside fix.
Then second ballot can be performed with the 3rd positioning result, i.e., is the 3rd on the basis of above-mentioned ballotPositioning result configures a ticket, determines indoor and outdoor positioning result.To be indoor and outdoor, uncertain each as beforeOne ticket, the 3rd positioning result is outdoor, then indoor and outdoor positioning result is outdoor.
Sentence according to number of satellites, satellite description information, according to the indoor and outdoor of the execution such as luminous flux and magnetic informationIt is fixed.Indoor and outdoor positioning result can be determined, including:It is indoor and outdoor, uncertain.
Above-mentioned Fig. 5 example, provide only a variety of data and performs a kind of mode that indoor and outdoor judges, actualIn processing, other method can also be used, as shown in Figure 8.
Reference picture 8, shows that second of indoor and outdoor judges in another localization method embodiment of the applicationStep flow chart, specifically may include steps of:
Step 802, perform indoor and outdoor according to number of satellites to judge, determine the first positioning result.
Step 804, the elevation angle and signal to noise ratio according to satellite perform indoor and outdoor and judged, determine the second positioningAs a result.
Step 806, perform indoor and outdoor according to absolute force to judge, determine the 3rd positioning result.
Step 808, judge whether to can determine indoor and outdoor positioning result by ballot.
Step 810, determine that the 4th positioning result performs second ballot by ambient light intensity.
Step 812, indoor and outdoor positioning result is determined.
Each step of this example example corresponding steps corresponding with Fig. 5 are similar, therefore repeat no more, so as to may be used alsoWith using number of satellites, satellite description information, based on absolute force, interior is performed using supplemented by luminous fluxOutside fix judges.And other are combined using the data to collection and perform the side that indoor outside fix judgesFormula, can determine that the present embodiment is not construed as limiting to this according to actual demand.
When indoor and outdoor positioning result is interior, step 310 is performed;When indoor and outdoor positioning result is not trueRegularly, step 312 is performed;When indoor and outdoor positioning result is outdoor, step 314 is performed.
Step 310, start indoor locating system and perform positioning.
Step 312, start outdoor positioning system and indoor locating system performs positioning.
Step 314, start outdoor positioning system and perform positioning.
Wherein, according to above-mentioned positioning method physical location, i.e. indoor and outdoor positioning result can not determined for notWhen determining, while startup outdoor positioning system and indoor locating system perform positioning, indoor and outdoor positioningSystem can export the various information such as position location, positioning precision, can be intelligent end based on the direction of motionThe directional information of operation is held, building is such as directed away from, or towards close building, and according to positioning precisionThe system of comprehensive analysis input positioning, as shown in figure 9, comprising the following steps that:
Step 902, the directional information of current intelligent terminal is determined according to sensor information.
Step 904, judge whether intelligent terminal points to building.
Sensor information according to sensor can determine the direction of motion of intelligent terminal, such as be directed away from buildingBuild, or towards close to building etc..So as to judge whether the motion of intelligent terminal points to building.
If so, i.e. building is pointed in the motion of intelligent terminal, step 906 is performed;If it is not, i.e. intelligence is wholeBuilding is not pointed in the motion at end, performs step 908.
Step 906, judge whether indoor precision is more than outdoor precision.
The positioning precision of indoor locating system is referred to as indoor precision, by the positioning precision of outdoor positioning systemReferred to as outdoor precision.Then judge whether indoor precision is more than outdoor precision.
If so, judging that indoor precision is more than outdoor precision, step 910 is performed;If it is not, judging roomInterior precision is not more than outdoor precision, performs step 912.
Step 908, whether outdoor precision is more than indoor precision.
If so, i.e. outdoor precision is more than indoor precision, step 912 is performed;If it is not, i.e. outdoor precision is notMore than indoor precision, step 910 is performed.
Step 910, using indoor locating system generation positioning output result.
When judging to currently point to building according to the directional information, and indoor precision is more than outdoor precisionWhen, using indoor locating system generation positioning output result.
When judging to not currently point to building according to the directional information, and outdoor precision is not more than indoor essenceWhen spending, using indoor locating system generation positioning output result.
Step 912, using outdoor positioning system generation positioning output result.
When judging to currently point to building according to the directional information, and indoor precision is not more than outdoor precisionWhen, using outdoor positioning system generation positioning output result.
When judging to not currently point to building according to the directional information, and outdoor precision is more than indoor precisionWhen, using outdoor positioning system generation positioning output result.
So as to which the application can realize indoor and outdoor integration positioning, i.e., positioned indoors there is provided one kindThe method that seamless switching is carried out between system and outdoor positioning system (GNSS or architecture etc.), itsIn, indoor locating system can perform positioning using the technology such as WIFI or bluetooth BlueTooth, outdoorAlignment system can using GPS (Global Navigation Satellite System,GNSS), the technology such as architecture performs positioning.
The embodiment of the present application can be applied to the various intelligence for needing positioning service such as mobile phone, tablet personal computer eventuallyOn end, by monitoring multiple sensors such as GPS, ambient light sensor, acceleration that intelligent terminal is carriedSensor, Magnetic Sensor etc., judge residing indoor and outdoor environment, and enable corresponding indoor and outdoor fixedPosition system provides seamless positioning navigation experience.
In the present embodiment, institute can be provided according to the abundant sensing data carried on the intelligent terminals such as mobile phoneLocate indoor or outdoors information, the number of satellites that such as GPS is searched out can as indoor or outdoors judgementInformation, is usually 0 or less than 4 when mobile terminal is in indoor number of satellites;And work as and opened in outdoorWealthy environmental satellite number is more than.And ambient light sensor measuring environment luminous flux, to differentiating that daytime is in roomThere is reference significance outside.
Can also using Magnetic Sensor measure environmental magnetic field fluctuation, when intelligent terminal be in indoor environment,The fluctuation of magnetic field intensity is influenceed to have than larger fluctuation by building, equipment;When in open outdoorEnvironment, magnetic field intensity is more steady.Indoor and outdoor temperature difference is also based on to judge residing indoor or roomOutside;Residing indoor or outdoors are judged based on turning amplitude in motion process and frequecy characteristic;Also utilizeThe indoor feature of image zooming-out image judges residing indoor or outdoors.By judging room to multiple sensorsThe weighted average of interior or outdoor result obtains final indoor or outdoors result of determination, and calls corresponding roomInterior, outdoor positioning system.
In the present embodiment, the development language based on mobile platform such as Java or C++ is realized.
In the embodiment of the present application, intelligent terminal refers to the terminal device with multimedia function, and these setThe standby function of supporting in terms of audio, video, data.The intelligent terminal of this in the present embodiment has touch-screen,Including intelligent mobile terminal such as smart mobile phone, tablet personal computer energy, Intelligent worn device or haveThe equipment such as intelligent television, the personal computer of touch-screen.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it is all expressed as to one it isThe combination of actions of row, but those skilled in the art should know that the embodiment of the present application is not by describedSequence of movement limitation because according to the embodiment of the present application, some steps can using other orders orPerson is carried out simultaneously.Secondly, those skilled in the art should also know, embodiment described in this descriptionBelong to necessary to preferred embodiment, involved action not necessarily the embodiment of the present application.
Embodiment three
Reference picture 10, shows a kind of structured flowchart of positioner embodiment of the application, can specifically wrapInclude following module:
Acquisition module 1002, for gathering at least two data, wherein, the data include location data;
Indoor and outdoor determination module 1004, judges, really for performing indoor and outdoor according at least two dataDetermine indoor and outdoor positioning result.
To sum up, at least two data can be gathered, then indoor and outdoor are performed according at least two dataJudge, determine indoor and outdoor positioning result, positioning is performed jointly by least two data, improve positioningAccuracy, and amount of calculation is less, does not result in the consumption of the resources such as electricity.
Reference picture 11, shows the structured flowchart of another positioner embodiment of the application, specifically can be withIncluding following module:
Geography fence determination module 1100, for obtaining effective gps data, according to described effectiveWhether gps data judges current location in geography fence;If current location is in the geography fence,Triggering collection module 1102;If current location is not in the geography fence, locating module 1106 is triggered.
Acquisition module 1102, for gathering at least two data, wherein, the data include location data.
Indoor and outdoor determination module 1104, judges, really for performing indoor and outdoor according at least two dataDetermine indoor and outdoor positioning result.
Locating module 1106, for when indoor and outdoor positioning result is outdoor, starting outdoor positioning system and holdingRow positioning;When indoor and outdoor positioning result is interior, start indoor locating system and perform positioning;Work as interiorWhen outside fix result is does not know, start outdoor positioning system and indoor locating system performs positioning.
Wherein, the location data includes:Sensing data and global position system GPS data.InstituteStating gps data includes:Number of satellites and satellite description information;It is strong that the sensing data includes earth magnetismDegree.
The acquisition module 1102, for gathering in number of satellites, satellite description information and absolute forceAt least two data.
The acquisition module 1102, including:
GPS gathers submodule 11022, for parsing message segment from gps data, from the messageNumber of satellites and/or satellite description information are obtained in section.
Earth magnetism gathers submodule 11024, and the acceleration information for being measured according to acceleration transducer is calculatedStep number;The absolute force of each step is calculated according to the geomagnetic data that Magnetic Sensor is measured.
The indoor and outdoor determination module 1104, including:
Submodule 11042 is positioned, for determining the first positioning result according to number of satellites, is retouched according to satelliteState information and determine the second positioning result, and the 3rd positioning result is determined according to absolute force.
Decision sub-module 11044, for according to the first positioning result, the second positioning result and the 3rd positioningAs a result at least two in, which perform indoor and outdoor, judges, determines indoor and outdoor positioning result.
Reference picture 12, shows the structural frames that submodule is positioned in another positioner embodiment of the applicationFigure, can specifically include following module:
The positioning submodule 11042, including:
First positioning unit 110422, is more than first for counting the number of satellites in the first preset timeFirst ratio of threshold value;First ratio and the first judgement scope are compared, according to comparative resultThe first positioning result is determined, wherein, first positioning result includes:It is indoor and outdoor or uncertain.
Second positioning unit 110424, for obtaining the corresponding height of each satellite from the satellite description informationSpend angle and signal to noise ratio;Elevation angle is exceeded into Second Threshold and signal to noise ratio is used as mesh more than the satellite of the 3rd threshold valueMark satellite;Positioning is performed according to the target satellite, the second positioning result is determined, wherein, described secondPositioning result includes:It is indoor and outdoor or uncertain.
Second positioning unit 110424, the number for determining target satellite calculates the number of target satelliteWith the second ratio of satellite description information Satellite total number;Second ratio and second are judged into scopeIt is compared, the second positioning result is determined according to comparative result.
3rd positioning unit 110426, for determining the 3rd positioning knot according to the absolute force in preset step numberReally, wherein, the 3rd positioning result includes:It is indoor and outdoor or uncertain.
3rd positioning unit 110426, for calculating the magnetic field intensity in the preset step numberVariance;The variance is compared with the 4th threshold value, the 3rd positioning result is determined according to comparative result.
In the present embodiment, the acquisition module 1102 is additionally operable to obtain ambient light in the second preset timeFlux;The positioning submodule 11042, is additionally operable to determine the 4th positioning knot according to the ambient light fluxesReally;The decision sub-module 11044, is additionally operable to according to the first positioning result, the second positioning result, theAt least three kinds in three positioning results and the 4th positioning result perform indoor and outdoor and judge, it is determined that indoor outside fixAs a result.
Then positioning submodule 11042 also includes:4th positioning unit 110428, for judging the environmentWhether luminous flux is more than the 5th threshold value;When the ambient light fluxes are more than five threshold values, determine that the 4th determinesPosition result is in outdoor;When the ambient light fluxes are not more than five threshold values, the 4th positioning knot is determinedFruit is uncertain.
The geography fence determination module 1100, including:
Fence determination sub-module 11002, for determining the effective gps data correspondence geography fence,Obtain the geographical location information of at least two pairs of angular vertexs of the geography fence;
Fence detection sub-module 11004, for detecting the effective gps data whether described diagonalIn the geographical location information correspondence geography fence on summit.
The locating module 1106, is additionally operable to determine the direction letter of current intelligent terminal according to sensor informationBreath;When judging to currently point to building according to the directional information, and indoor precision is when being more than outdoor precision,Using indoor locating system generation positioning output result;Not currently pointed to when according to directional information judgementBuilding, and outdoor precision is when being not more than indoor precision, using indoor locating system generation positioning output knotReally;When judging to currently point to building according to the directional information, and indoor precision is not more than outdoor precisionWhen, using outdoor positioning system generation positioning output result;Judge currently not when according to the directional informationPoint to building, and outdoor precision is when being more than indoor precision, using the generation positioning output of outdoor positioning systemAs a result.
So as to which the application can realize indoor and outdoor integration positioning, i.e., positioned indoors there is provided one kindThe method that seamless switching is carried out between system and outdoor positioning system (GNSS or architecture etc.), itsIn, indoor locating system can perform positioning using the technology such as WIFI or bluetooth BlueTooth, outdoorAlignment system can using GPS (Global Navigation Satellite System,GNSS), the technology such as architecture performs positioning.
The embodiment of the present application can be applied to the various intelligence for needing positioning service such as mobile phone, tablet personal computer eventuallyOn end, by monitoring multiple sensors such as GPS, ambient light sensor, acceleration that intelligent terminal is carriedSensor, Magnetic Sensor etc., judge residing indoor and outdoor environment, and enable corresponding indoor and outdoor fixedPosition system provides seamless positioning navigation experience.
In the present embodiment, institute can be provided according to the abundant sensing data carried on the intelligent terminals such as mobile phoneLocate indoor or outdoors information, the number of satellites that such as GPS is searched out can as indoor or outdoors judgementInformation, is usually 0 or less than 4 when mobile terminal is in indoor number of satellites;And work as and opened in outdoorWealthy environmental satellite number is more than.And ambient light sensor measuring environment luminous flux, to differentiating that daytime is in roomThere is reference significance outside.
Can also using Magnetic Sensor measure environmental magnetic field fluctuation, when intelligent terminal be in indoor environment,The fluctuation of magnetic field intensity is influenceed to have than larger fluctuation by building, equipment;When in open outdoorEnvironment, magnetic field intensity is more steady.Indoor and outdoor temperature difference is also based on to judge residing indoor or roomOutside;Residing indoor or outdoors are judged based on turning amplitude in motion process and frequecy characteristic;Also utilizeThe indoor feature of image zooming-out image judges residing indoor or outdoors.By judging room to multiple sensorsThe weighted average of interior or outdoor result obtains final indoor or outdoors result of determination, and calls corresponding roomInterior, outdoor positioning system.
In the present embodiment, the development language based on mobile platform such as Java or C++ is realized.
Example IV
On the basis of above-described embodiment, the present embodiment also discloses a kind of intelligent terminal.
Reference picture 13, shows a kind of structured flowchart of intelligent terminal embodiment of the application, can specifically wrapInclude following module:
The intelligent terminal 1300 includes:Memory 1310, display 1320, processor 1330 and defeatedEnter unit 1340.
Wherein, the input block 1340 can be used for the numeral or character information for receiving user's input, andControl signal.Specifically, in the embodiment of the present invention, the input block 1340 can include touch-screen 1341,Collecting touch operation of the user on or near it, (such as user is adapted to using finger, stylus etc. are anyThe operation on touch-screen 1341 of object or annex), and driven according to formula set in advance correspondingAttachment means.Certainly, except touch-screen 1341, input block 1340 can also be set including other inputsIt is standby, such as physical keyboard, function key (such as volume control button, switch key), mouse etc..
Display 1320 includes display panel, optionally, can use liquid crystal display (Liquid CrystalDisplay, LCD) or Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) etc.Form configures display panel.Wherein, touch-screen can cover display panel, form touch display screen,After the touch display screen detects the touch operation on or near it, send to processor 1030 withPerform corresponding processing.
In embodiments of the present invention, by call store the memory 1310 in software program, and/or,Module, and/or, data, processor 1330 is used to gather at least two data, wherein, the dataIncluding location data;Indoor and outdoor is performed according at least two data to judge, it is determined that indoor outside fix knotReally.
Optionally, the location data includes:Sensing data and global position system GPS data.
Optionally, the gps data includes:Number of satellites and satellite description information;The sensorData include absolute force;Then it is described collection at least two data, including:Gather number of satellites, satelliteAt least two data in description information and absolute force.
Optionally, the determination step of the gps data includes:Message segment is parsed from gps data,Number of satellites and/or satellite description information are obtained from the message segment.
Optionally, the determination step of the sensing data includes:According to adding that acceleration transducer is measuredVelocity information calculates step number;The absolute force of each step is calculated according to the geomagnetic data that Magnetic Sensor is measured.
Optionally, it is described to perform indoor and outdoor judgement according at least two data, it is determined that indoor outside fixAs a result, including:The first positioning result is determined according to number of satellites, second is determined according to satellite description informationPositioning result, and determine the 3rd positioning result according to absolute force;According to the first positioning result, secondAt least two in positioning result and the 3rd positioning result, which perform indoor and outdoor, judges, it is determined that indoor outside fix knotReally.
Optionally, the step of determining the first positioning result according to the number of satellites includes:Count first pre-Put the first ratio that the number of satellites in the time is more than first threshold;First ratio and first are sentencedDetermine scope to be compared, the first positioning result is determined according to comparative result, wherein, the first positioning knotFruit includes:It is indoor and outdoor or uncertain.
Optionally, the step of determining the second positioning result according to the satellite description information includes:From describedThe corresponding elevation angle of each satellite and signal to noise ratio are obtained in satellite description information;Elevation angle is exceeded into Second ThresholdAnd signal to noise ratio is used as target satellite more than the satellite of the 3rd threshold value;Positioning is performed according to the target satellite,The second positioning result is determined, wherein, second positioning result includes:It is indoor and outdoor or uncertain.
Optionally, positioning is performed according to the target satellite, determines the second positioning result, including:It is determined thatThe number of target satellite, the number of calculating target satellite and the second of satellite description information Satellite total numberRatio;Second ratio and the second judgement scope are compared, determine that second determines according to comparative resultPosition result.
Optionally, the step of determining three positioning results according to the absolute force, including:According to presetAbsolute force in step number determines the 3rd positioning result, wherein, the 3rd positioning result includes:Indoor,It is outdoor or uncertain.
Optionally, the 3rd positioning result is determined according to the magnetic field intensity in preset step number, including:DescribedThe variance of the magnetic field intensity is calculated in preset step number;The variance is compared with the 4th threshold value, according toThe 3rd positioning result is determined according to comparative result.
Optionally, at least two data are gathered, in addition to:Ambient light is obtained in the second preset time to lead toAmount, then perform indoor and outdoor according at least two data and judge, determine indoor and outdoor positioning result, also wrapInclude:The 4th positioning result is determined according to the ambient light fluxes;According to the first positioning result, the second positioningAs a result, at least three kinds in the 3rd positioning result and the 4th positioning result perform indoor and outdoor and judged, determine roomInside and outside positioning result.
Optionally, the 4th positioning result is determined according to the ambient light fluxes, including:Judge the environmentWhether luminous flux is more than the 5th threshold value;When the ambient light fluxes are more than five threshold values, determine that the 4th determinesPosition result is in outdoor;When the ambient light fluxes are not more than five threshold values, the 4th positioning knot is determinedFruit is uncertain.
Optionally, in addition to:Effective gps data is obtained, is sentenced according to the effective gps dataWhether disconnected current location is in geography fence;If current location is in the geography fence, foundation is performedThe step of gps data obtains number of satellites, satellite description information;If current location is not enclosed in the geographyIn column, start outdoor positioning system and perform positioning.
Optionally, current location is judged whether in geography fence according to the effective gps data,Including:The effective gps data correspondence geography fence is determined, the geography fence is obtained at leastTwo geographical location information to angular vertex;Detect the effective gps data whether described diagonalIn the geographical location information correspondence geography fence on summit.
Optionally, in addition to:When indoor and outdoor positioning result is outdoor, start outdoor positioning system and performPositioning;When indoor and outdoor positioning result is interior, start indoor locating system and perform positioning;Work as indoor and outdoorWhen positioning result is does not know, start outdoor positioning system and indoor locating system performs positioning.
Optionally, start outdoor positioning system and indoor locating system is performed after positioning, in addition to:According toThe directional information of current intelligent terminal is determined according to sensor information;Judge currently when according to the directional informationPoint to building, and indoor precision is when being more than outdoor precision, using indoor locating system generation positioning outputAs a result;When judging to not currently point to building according to the directional information, and outdoor precision is not more than interiorDuring precision, using indoor locating system generation positioning output result;Work as when according to directional information judgementPreceding sensing building, and indoor precision is when being not more than outdoor precision, is generated and positioned using outdoor positioning systemOutput result;When judging to not currently point to building according to the directional information, and outdoor precision is more than roomDuring interior precision, using outdoor positioning system generation positioning output result.
For device embodiment, because it is substantially similar to embodiment of the method, so the comparison of descriptionSimply, the relevent part can refer to the partial explaination of embodiments of method.
Each embodiment in this specification is described by the way of progressive, and each embodiment is stressedBe all between difference with other embodiment, each embodiment identical similar part mutually referring to.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present application can be provided as method, dressPut or computer program product.Therefore, the embodiment of the present application can using complete hardware embodiment, completelyThe form of embodiment in terms of software implementation or combination software and hardware.Moreover, the embodiment of the present applicationCan use can be situated between in one or more computers for wherein including computer usable program code with storageThe computer journey that matter is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)The form of sequence product.
In a typical configuration, the computer equipment includes one or more processors(CPU), input/output interface, network interface and internal memory.Internal memory potentially includes computer-readable mediumIn volatile memory, the shape such as random access memory (RAM) and/or Nonvolatile memoryFormula, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable mediumExample.Computer-readable medium includes permanent and non-permanent, removable and non-removable mediaIt can realize that information is stored by any method or technique.Information can be computer-readable instruction,Data structure, the module of program or other data.The example of the storage medium of computer includes, butPhase transition internal memory (PRAM), static RAM (SRAM), dynamic random is not limited to depositAccess to memory (DRAM), other kinds of random access memory (RAM), read-only storage(ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other inDeposit technology, read-only optical disc read-only storage (CD-ROM), digital versatile disc (DVD) or otherOptical storage, magnetic cassette tape, tape magnetic rigid disk storage other magnetic storage apparatus or it is any itsHis non-transmission medium, the information that can be accessed by a computing device available for storage.According to hereinDefine, computer-readable medium does not include the computer readable media (transitory media) of non-standing,Such as the data-signal and carrier wave of modulation.
The embodiment of the present application is with reference to according to the method for the embodiment of the present application, terminal device (system) and meterThe flow chart and/or block diagram of calculation machine program product is described.It should be understood that can be by computer program instructionsEach flow and/or square frame and flow chart and/or square frame in implementation process figure and/or block diagramThe combination of flow and/or square frame in figure.Can provide these computer program instructions to all-purpose computer,The processor of special-purpose computer, Embedded Processor or other programmable data processing terminal equipments is to produceOne machine so that pass through the computing devices of computer or other programmable data processing terminal equipmentsInstruction produce be used to realize in one flow of flow chart or multiple flows and/or one square frame of block diagram orThe device for the function of being specified in multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable datas to handleIn the computer-readable memory that terminal device works in a specific way so that be stored in this computer-readableInstruction in memory, which is produced, includes the manufacture of command device, and command device realization is in flow chart oneThe function of being specified in flow or multiple flows and/or one square frame of block diagram or multiple square frames.
These computer program instructions can also be loaded into computer or other programmable data processing terminals are setIt is standby upper so that series of operation steps is performed on computer or other programmable terminal equipments in terms of producingThe processing that calculation machine is realized, so that the instruction performed on computer or other programmable terminal equipments provides useIn realization in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square framesThe step of function of specifying.
Although having been described for the preferred embodiment of the embodiment of the present application, those skilled in the art are onceBasic creative concept is known, then other change and modification can be made to these embodiments.So,Appended claims are intended to be construed to include preferred embodiment and fall into the institute of the embodiment of the present application scopeHave altered and change.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational termsIt is used merely to make a distinction an entity or operation with another entity or operation, and not necessarily requiresOr imply between these entities or operation there is any this actual relation or order.Moreover, artLanguage " comprising ", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so thatProcess, method, article or terminal device including a series of key elements not only include those key elements, andAlso include other key elements for being not expressly set out, or also include for this process, method, article orThe intrinsic key element of person's terminal device.In the absence of more restrictions, by sentence " including oneIt is individual ... " limit key element, it is not excluded that at the process including the key element, method, article or endAlso there is other identical element in end equipment.
Above to a kind of localization method provided herein, a kind of positioner and a kind of intelligent terminal,It is described in detail, specific case used herein is carried out to the principle and embodiment of the applicationIllustrate, the explanation of above example is only intended to help and understands the present processes and its core concept;TogetherWhen, for those of ordinary skill in the art, according to the thought of the application, in embodiment and shouldWith will change in scope, in summary, this specification content should not be construed as to the application'sLimitation.