Patent Publication Number: US-2016223682-A1

Title: Method and device for activating and deactivating geopositioning devices in moving vehicles

Description:
CROSS REFERENCE TO RELATED APPLICATION 
     This application claims the benefit of European Patent Application No. 15382021.2, filed on Jan. 29, 2015, application which is incorporated herein by reference in its entirety for all purposes. 
     FIELD OF THE INVENTION 
     The present invention has its application within the telecommunication sector, more specifically, relates to energy-efficient strategies for the automatic activation of geopositioning devices (e.g., Global Positioning System —GPS—receivers) located in a mobile phone which, in turn, can be in a moving vehicle. 
     The present invention is a mobile user device and method for activating and deactivating geopositioning receivers of the mobile device depending on whether the mobile device is riding in a moving vehicle or not, which can be driven or not by the user. 
     BACKGROUND OF THE INVENTION 
     Today&#39;s smartphones are equipped with embedded geopositioning devices (mainly GPS, Global Positioning System), which allow the development of new location-based services (LBSs) and applications suited to the context and activities the user is involved on. 
     A major issue in the development of location-based services (LBSs) for smartphones is the important battery consumption of geopositioning devices. In many applications, LBSs are only needed when the user is involved in a specific context, as, for example, while driving a vehicle. 
     However, a frequent use of LBS applications in smartphones can result in severe battery drain making a serious impact on user experience. Several strategies are being proposed to effectively reduce the energy consumption for smartphones running LBSs, such as the approach described by Kyu-Han Kim et al. in “Improving energy efficiency of location sensing on smartphones” (Proceedings of the 8th international conference on Mobile systems, applications and services, ACM, 2010). Some of these strategies are based on the use of alternative positioning technologies (e.g., network-based location sensing) that consumes lower power than GPS, as described by Kyu-Han Kim et al. in “Energy-efficient positioning for smartphones using cell-id sequence matching” (Proceedings of the 9th international conference on Mobile systems, applications and services, ACM, 2011). 
     Other approaches consider that, in some scenarios, more than one LBS application may be running in a single smartphone at the same time. In those scenarios some strategies have been proposed, such as the former approach described by Kyu-Han Kim et al. in “Improving energy efficiency of location sensing on smartphones”, where a middleware manages the efficient use of positioning resources shared among several LBSs, thus avoiding unnecessary GPS invoking events. 
     In other cases, when applications only require “trajectory information” instead of specific single positions, trajectory simplification approaches have been proposed, as disclosed in “Entracked: energy-efficient robust position tracking for mobile devices” by Mikkel Baun Kjægaardet al. (Proceedings of the 7th international conference on Mobile systems, applications and services, ACM, 2009). In trajectory simplification only a small subset of positions are needed to obtain the overall motion information. 
     Some additional approaches are directed to minimize the frequency update of sampling positions (i.e. GPS positions) taking into account the uncertainty in the user position, context or activity. In the above-mentioned approach described by Mikkel Baun Kjægaardet al., a process firstly obtains a GPS position and then uses a certain method to determine the user state (i.e. whether the device is moving or not). If the device is not moving, the logic waits for movement. When the device is moving, the acquisition of GPS positions is scheduled based on an estimation of its speed. Also, dynamic tracking strategies have been proposed in “Impact of sensor-enhanced mobility prediction on the design of energy-efficient localization” by Chuang-Wen You et al. (p.p. 1221-1237, Ad Hoc Networks 6.8, 2008), taking into account a constant positioning accuracy and delay, target speed and acceleration to detect if the target is moving or not. 
     Similarly, the alternative engagement or disengagement of a geopositioning receiver depending on whether a mobile device is in motion or at rest, has been disclosed in US20130085861. When the geopositioning receiver is disengaged, the accelerometer may be engaged to monitor whether the device is put back in motion. 
     Finally, several procedures have also been proposed for detecting when a mobile is travelling in association with a vehicle, as described in US20130245986. These procedures are usually based on the combination of sensor data (accelerometers, gyroscopes, magnetometers, etc.) together with GPS data to identify different states and motion patterns corresponding to different user&#39;s activities, such as walking, stepping out the car, sitting, etc. 
     Disadvantages of prior existing proposals are the following:
         Existing procedures for the automatic activation of geopositioning receivers (i.e. GPS) depending on whether a mobile device is in motion or at rest, as the one presented in US20130085861 and in the aforementioned approach described by Mikkel Baun Kjægaardet al., only consider general movement patterns for the device.   Without considering specific movement patterns associated to a moving vehicle, prior art (US20130085861 and Mikkel Baun Kjægaardet al.) does not allow the use of existing energy-efficient activation of geopositioning receivers for a wide range of LBS applications in vehicles.   Prior art also provides procedures for detecting when a mobile is travelling in association with a vehicle, as US20130245986. However these procedures do not include strategies for energy-efficient activation of geopositioning receivers.       

     Therefore, it is highly desirable to develop low-energy procedures for the automatic activation of geopositioning devices only in specific contexts. 
     SUMMARY OF THE INVENTION 
     The present invention solves the aforementioned problems and overcomes previously explained state-of-art work limitations by providing an energy-efficient method for the automatic activation and deactivation of the geopositioning receivers in a mobile user&#39;s terminal (e.g., a smartphone, tablet, etc.) depending on whether its user is moving in a vehicle or not. The invention also considers the case in that the user of the mobile terminal/device is the driver of the vehicle. 
     In the context of the invention, the following concepts are used:
         Geopositioning device: a device, such as GPS (Global Positioning System) device, providing geographical information related to the current position of the user.   Location-based services (LBSs): applications that require and exploit knowledge about where the device is located.   Short-time probes: sequential tests scheduled at a given rate to collect a small amount (short-time) of low-energy sensor data to detect possible patterns of a moving vehicle.   Long-time probes: tests over larger sequences of sensor data (e.g. collected over one minute) data to confirm patterns of a moving vehicle.   Un-calibrated sensor data: biased measurements from sensors due to inaccuracies in the sensor devices.   Uncompensated global energy: energy measurement of sensor data without compensating possible bias effects in un-calibrated sensor data.   Compensated global energy: energy measurement of sensor data after compensating bias effects in un-calibrated sensors.       

     The present invention provides a configurable strategy for automatic activation of geopositioning devices, following a sequence of short-time and long-time probes for vehicle movement detection, which allows a customizable trade-off between precision and energy consumption. Short-time probes are defined to provide a first quick test to identify or discard possible moving of the vehicle in which the smartphone with geopositioning devices is located, while long-time probes are used to confirm that there is a situation, in accordance with a pattern, where the vehicle is certainly moving. 
     In particular, the invention provides an activation strategy which is implemented following a sequence of tests, referred to as probes, in order to detect sensor (probe) patterns that could correspond to a moving vehicle. More specifically, the geopositioning receiver activation uses short-time probes to provide a first quick identification or discard of possible moving vehicle patterns, followed by long-time probes to confirm moving vehicle situations (patterns). Furthermore, once the geopositioning receiver has been activated, the geopositioning receiver deactivation combines both positioning data (for example, speed data from GPS) and low-energy sensor data to cope with situations where, once in motion, the smartphone loses positioning information (and so GPS information is not available). 
     The present invention uses low-energy procedures for the automatic activation/deactivation of geopositioning devices and location-based services of users in vehicles, when the user uses these devices and services through a smartphone which is moving in a vehicle. More specifically, the low-energy procedure for detecting that the smartphone is inside a moving vehicle is based exclusively on data from embedded low-energy consumption sensors (not GPS) provided by the smartphone: accelerometers, gyroscopes, magnetometers, etc. The algorithm for the detection of moving vehicles is implemented, with low-power consumption, in the smartphone. 
     A first aspect of the present invention refers to a method for activating and deactivating geopositioning devices of mobile user terminals which can be in moving vehicles (and, in a possible scenario, the user of the mobile terminal maybe drive the vehicle), which comprises the following steps:
         i) A detection step of detecting whether, at least one, geopositioning device of the mobile user terminal is located in a moving vehicle. The detection is based only on data from low-energy consumption sensors provided by the mobile user terminal.   ii) If the previous step detects that the user terminal is located in the moving vehicle, a step of identifying at least one probe pattern related to a situation of the moving vehicle is performed (by the user terminal in the moving vehicle);   iii) Based on the data from the low-energy consumption sensors of the user terminal and at least one identified probe pattern, in order to confirm that the user terminal is riding in the moving vehicle, a step of verifying moving vehicle situations identified before is performed. The situation is verified to correspond either to the user terminal riding in the moving vehicle either to the user terminal being stopped in the moving vehicle.   iv) After verifying if the situation corresponds to the mobile user terminal riding in the moving vehicle, the geopositioning device is activated. Then, the steps i)-iii) of detection, identification and verification of the user terminal in moving vehicle situations are repeated, in order to detect a change in the situation.       

     In a second aspect of the present invention, a mobile user terminal or device for activating and deactivating geopositioning devices in moving vehicles is disclosed. The mobile user terminal with al least one geopositioning device and a plurality of low-energy consumption sensors, comprises means for implementing the method described before, which are:
         At least a location detector, which is a module for detecting, based on data from the low-energy consumption sensors, whether a geopositioning device is located in a moving vehicle and, if so, identifying at least one probe pattern related to a situation of the moving vehicle.   Processing means for verifying, based on the identified probe pattern(s) and the data from low-energy consumption sensors, whether the situation corresponds to the mobile user terminal riding in the moving vehicle or to the mobile user terminal being stopped in the moving vehicle. Depending on the result from the verification, the processing means deliver triggers an actuator (activator/deactivator) module on the geopositioning device.       

     In a last aspect of the present invention, a computer program is disclosed, comprising computer program code means adapted to perform the steps of the described method, when said program is run on processing means of a user terminal (e.g., smartphone or tablet). 
     The method and user terminal in accordance with the above described aspects of the invention has a number of advantages with respect to prior art, which can be summarized as follows:
         Compared to prior art approaches, the present invention allows the automatic activation as well as the deactivation of the geopositioning receivers in a smartphone based on detecting whether the user is moving in a vehicle or not. Furthermore, the invention considers application scenarios where the smartphone belongs to the driver of the vehicle.   A flexible configuration of short-time and long-time probes both in terms of activation times and detection parameters provides a customizable trade-off between precision and energy consumption. It is through the combination of two features, the use of simple patterns based on data from low-energy consumption sensors (i.e. accelerometers, gyroscopes, etc) and a configurable detection strategy based on short-time and long-time probes, thanks to which the present invention represents a powerful solution for energy-efficient automatic activation of geopositioning receivers suitable for a wide range of LBSs and applications in vehicles.   The present invention is energy-efficient since the activation/deactivation of the geopositioning device in the smartphone is based on data from embedded low-energy consumption sensors provided by the smartphone itself: accelerometers, gyroscopes, magnetometers, etc.   The method does not require any restriction on the actual position of the smartphone inside the vehicle (i.e. it does not require the smartphone to be mounted or located on any particular place or device inside the vehicle). An important feature in this invention is that, as activation and deactivation procedures are based on global energies of three-axis sensors (accelerometers, gyroscopes, . . . ) and not on specific energies acting on specific axis, the present invention does not impose any restriction on the actual position of the smartphone. Therefore, the smartphone may be situated and be moved from different positions inside the vehicle.   Once a smartphone in a moving vehicle is detected, the deactivation algorithm is robust against smartphone in-vehicle movements and uncontrolled changes of position.   The deactivation strategy is also robust to situations where the smartphone may lose its positioning information, as it always considers both positioning data and sensor data.       

     These and other advantages will be apparent in the light of the detailed description of the invention. 
    
    
     
       DESCRIPTION OF THE DRAWINGS 
       For the purpose of aiding the understanding of the characteristics of the invention, according to a preferred practical embodiment thereof and in order to complement this description, the following Figures are attached as an integral part thereof, having an illustrative and non-limiting character: 
         FIG. 1  shows a block diagram of a method for activating and deactivating geopositioning devices in a smartphone, according to a preferred embodiment of the invention. 
         FIG. 2  shows short-time and long-time probes used for activating geopositioning devices in a smartphone riding in a moving vehicle, according to a possible embodiment of the invention. 
         FIG. 3  shows long-time probes used for deactivating geopositioning devices in a smartphone riding in a moving vehicle, according to a possible embodiment of the invention. 
         FIG. 4  shows a block diagram of a method for activating geopositioning devices in a smartphone when detected as riding in a moving vehicle, according to a possible embodiment of the invention. 
         FIG. 5  shows a block diagram of a process for detecting a smartphone probably riding in a moving vehicle during a short-time probe, according to a possible embodiment of the invention. 
         FIG. 6  shows a block diagram of a process for collecting and compensating or calibrating data from low-energy consumption sensors of a smartphone, according to a possible embodiment of the invention. 
         FIG. 7  shows a block diagram of the use of collected data for detection process of a smartphone riding in a moving vehicle during a long-time probe, according to a possible embodiment of the invention. 
         FIG. 8  shows a block diagram of the use of collected data for detection process of a smartphone not riding in a moving vehicle through a long-time probe, according to a possible embodiment of the invention. 
     
    
    
     PREFERRED EMBODIMENT OF THE INVENTION 
     The matters defined in this detailed description are provided to assist in a comprehensive understanding of the invention. Accordingly, those of ordinary skill in the art will recognize that variation changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, description of well-known functions and elements are omitted for clarity and conciseness. 
     Of course, the embodiments of the invention can be implemented in a variety of architectural platforms, operating and server systems, devices, systems, or applications. Any particular architectural layout or implementation presented herein is provided for purposes of illustration and comprehension only and is not intended to limit aspects of the invention. 
       FIG. 1  presents a block diagram of the method for activating and deactivating geopositioning devices ( 13 ) of a mobile user terminal ( 1 ) which can be in moving vehicles. Furthermore, in a possible scenario, the user of the mobile terminal ( 1 ) may be driving the vehicle. The method is running in the mobile user terminal ( 1 ), e.g., a smartphone, performing the following steps:
         data from low-energy consumption sensors ( 11 ), such as accelerometers and gyroscopes, of the mobile user terminal ( 1 ) are used to automatically detect whether the mobile user terminal ( 1 ) is riding in a vehicle ( 12 );   once the mobile user terminal ( 1 ) is detected moving in a vehicle, its geopositioning devices ( 13 ), e.g., a GPS receiver, are engaged or activated ( 18 ); additionally, one or more location-based services ( 14 ) may be also activated ( 18 );   a deactivation process is started to detect when the mobile user terminal ( 1 ) stops riding in the vehicle ( 15 );   once the mobile user terminal ( 1 ) is detected to be stopped or not to be in the vehicle ( 15 ), all the previously activated geopositioning devices ( 13 ) are disengaged or deactivated ( 16 ) and location-based services ( 14 ) informed;   the automatic detection for the mobile user terminal ( 1 ) in a moving vehicle is then re-started ( 17 ).       

       FIG. 2  shows in more detail the activation strategy, which is based on two key aspects:
         1) The use of simple patterns derived from global energies ( 21 ) of the low-energy consumption sensors ( 11 ), e.g., accelerometers and gyroscopes, to detect a moving vehicle. Moving vehicles are usually subjected to slowly changing acceleration and turning forces that present a characteristic behavior different from other user activities such as walking, standing, watching a video, etc.   2) The use of a sequence of short-time and long-time tests or probes for vehicle movement detection. Short-time probes ( 22 ) analyze global energies from low-energy consumption sensors ( 11 ) over a relatively short period of time, while long-time probes ( 23 ) combine global energies ( 21 ) from both short and long periods of time.
           2.1) A sequence of consecutive short-time probes ( 22 ), triggered at configurable time intervals ( 24 ), allows to implement an energy-efficient quick discard strategy for situations clearly not related to moving vehicles, such as walking, running, motionless, etc.   2.2) Long-time probes ( 23 ) are activated only after a short-time probe detects a possible pattern ( 25 ) of a moving vehicle following an efficient energy consumption strategy. Long-time probes ( 23 ) confirm ( 28 ) that the smartphone is in a moving vehicle based on both, the combination of the detection results from a consecutive sequence of short-time probes ( 26 ) and a pattern ( 27 ) of global energies ( 21 ) of low-energy consumption sensors ( 11 ) for a longer time segment represented by the long-time probe.   
               

     The strategy for automatic activation of the geopositioning receiver in the mobile user terminal ( 1 ) shown in  FIG. 2  can be configured to work with different trade-offs between precision and energy consumption. More specifically, through the definition of different values for:
         lengths for short-time and long-time probes;   time interval to trigger consecutive short-time probes;   number of consecutive short-time probes inside a long-time probe.       

     The strategy for the deactivation of the geopositioning receiver, shown in  FIG. 3 , presents the following features:
         Although after detecting the smartphone is in a moving vehicle the geopositioning receiver is activated, it is considered that there may be situations where the receiver may lose its positioning information. Consequently the deactivation strategy always considers not only geopositioning data ( 31 ), if available, but also sensor data ( 32 ), i.e., from accelerometers, gyroscopes, etc.   To detect that the smartphone is no longer moving in a vehicle, the deactivation strategy may only consider long-probes that are continuously tested once the smartphone has been detected to be in a moving vehicle.   The deactivation decision ( 35 ) is based on: available geopositioning data, such as the estimated speed from GPS, and detection results from a consecutive sequence of short-time probes ( 33 ) together with patterns of global energies of accelerometers and gyroscopes for the whole time segment represented by the long-time probe ( 34 ).       

       FIG. 4  illustrates a broad implementation of the strategy to activate a geopositioning device in a smartphone when it is moving in a vehicle. Short-time probes are triggered at configurable time intervals ( 401 ). Short-time probes implement a fast and energy efficient algorithm to detect when it is probable that the smartphone is riding in a vehicle ( 402 ). Also as shown in the figure, following positive short-time detection a long-time probe is initiated to provide a more reliable detection test ( 403 ). The detection algorithm in long-time proves is based on the analysis of data from a longer period of time. 
     Different implementations of this invention can use different ways to activate short-time and long-time probes. For example, even in situations where no short-time positive detections are present, long-time probes can be randomly activated after a variable number of short-time probes. This will provide more precise detection results at expenses of higher battery consumptions. In another implementation, context information available in the smartphone, such as Wi-Fi connection, can be used to define different short-time or long-time activation schedules ( 404 ). Also other sources of information as the time of the day or particular user profiles, if available, could be used to implement different ad-hoc activation strategies. 
     After detecting the smartphone riding into a moving vehicle, the geopositioning receiver is activated ( 405 ). This allows the subsequent activation of a variety of in-vehicle location-based services (LBSs) as insurance telematics, in-vehicle information systems (IVIS), advanced driving assistant systems (ADAS), etc. At this point the embodiment of this invention will provide a strategy to detect that the smartphone is no longer moving in the vehicle ( 406 ), making this information available to the active LBSs, disengaging the geopositioning receiver ( 407 ) and re-starting the short-time probe scheduler ( 410 ). Again any other sources of contextual information can be used to implement the deactivation algorithm, for example the detection of Wi-Fi connections, or the activation of some particular smartphone applications or activities defined in specific user profiles. 
     Detecting moving vehicle patterns in both short-time and long-time probes can be implemented using different data from low-power sensors available in the smartphone ( 408 ), such as accelerometers, gyroscopes, magnetometers, etc. In a preferred implementation, data from three-axis accelerometers and gyroscopes can be combined. 
     Once the geopositioning receiver is activated, detecting that smartphone is no longer in a moving vehicle can use estimated speed information provided by the geopositioning device ( 409 ). However there may be situations where the geopositioning receiver may lose accuracy and information (for example entering into a tunnel, an area with high buildings, etc.), thus similarly as in the activation algorithm other available data ( 408 ) from sensors, accelerometers, gyroscopes, magnetometers, . . . , may be used. 
     In a possible embodiment, the algorithm for detecting a smartphone in a moving vehicle may be based on measurements of global energies from three-axis acceleration and gyroscope sensors, as shown in  FIG. 5 . A data collection component ( 51 ) receives three axis accelerations (ax, ay, az) and three gyro angular velocities (vx, vy, vz) from the smartphone and implements resampling and interpolation algorithms to have a stable and consistent sampling frequency for all data. Before using these sampled and interpolated data to obtain global acceleration and gyroscopes energies ( 53 ,  54 ), a pre-processing component ( 52 ) may be applied to compensate possible un-calibrated sensor behavior, usually present in smartphone sensors—accelerometers, gyroscopes, magnetometers, etc.-. In some cases, this compensation may be applied on each of the accelerometer signals ( 53 ) and gyroscope signals ( 54 ) corresponding to each one of the smartphone orientation axis (x,y,z); in other embodiment, it can be applied on the un-calibrated global energy. 
     In this latter case, using un-calibrated global energy, a compensation process suitable for both accelerometer and gyroscope data may be implemented following a procedure illustrated in  FIG. 6 , comprising the following steps:
         1) All the sampled data ( 61 ) from accelerometer and gyroscope sensors corresponding to a given segment of time, generally the short-time probe length, is used to measure ( 62 ) the uncompensated global energy (uGE):       

     
       
         
           
             uGE 
             = 
             
               
                 1 
                 N_STP 
               
                
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   N_STP 
                 
                  
                 
                   E 
                   i 
                 
               
             
           
         
       
     
     where N_STP is the number of sensor samples corresponding to a short-time probe, and E i  is the energy of each sensor sample i, which is vector of coordinates (s x (i), s y (i), s z (i)) measured as the module of the three-axis sensor vector: 
         E   i =√{square root over ( s   x ( i ) 2   +s   y ( i ) 2   +s   z ( i ) 2 )}
 
     As pointed out before, in the previous expression, the module of the three-axis sensor vector is used as an Energy-related measure. Other embodiments can use different energy measurements, for example using the sum of the squared values, log-energies, etc. Also energies from different frequency bands obtained through filtering or using Fourier Transforms may be used. 
     A threshold (Th_cal) is used ( 63 ) on the uncompensated global energy (uGE) to check whether this global energy corresponds, with a high probability, to a situation where the smartphone is not moving. In those cases, un-calibrated sensor data can lead to unrealistic global energy values. Consequently a compensated global energy is obtained by subtracting the mean un-calibrated value (uGE) to each sample before the global energy calculation ( 65 ). 
     
       
         
           
             cGE 
             = 
             
               { 
               
                 
                   
                     
                       
                         1 
                         
                           N 
                           STP 
                         
                       
                        
                       
                         
                           ∑ 
                           
                             i 
                             = 
                             1 
                           
                           
                             N 
                             STP 
                           
                         
                          
                         
                           ( 
                           
                             
                               E 
                               i 
                             
                             - 
                             uGE 
                           
                           ) 
                         
                       
                     
                   
                   
                     
                       
                         if 
                          
                         
                             
                         
                          
                         uGE 
                       
                       &lt; 
                       Th_cal 
                     
                   
                 
                 
                   
                     uGE 
                   
                   
                     otherwise 
                   
                 
               
             
           
         
       
     
     It is through this process that compensated energy measurements can be obtained for different sensor data ( 66 ,  67 ) such as three-axis gyroscopes (cGE_gyr) and three-axis accelerometers (cGE_acc). In other embodiments, the compensation process can use information from the sequence of short-time or long-time probes. For example, the accumulated average of energies obtained from data over several past short-time probes may be stored and used to compensate future energy measurements. 
     Going back to the detection process in  FIG. 5 , compensated energy ( 53 ,  54 ) measurements for three-axis accelerometers (cGE_acc) and three-axis gyroscopes (cGE_gyr) respectively are used to detect whether or not the smartphone is in a moving vehicle in both short-time and long-time probes. Different classification techniques can be used: as Linear Discriminant Analysis, Bayesian Classification, Classification and Regression Tree (CART) etc. In other embodiments instead of implementing a detection algorithm based on global energy measurements, a variety pattern matching algorithms, as, for example, Dynamic Time Warping (DTW), may be applied on trajectories described by the time sequence of energy values Ei measured over several sensor data. 
     In some embodiments, the detection algorithm during short-time probes may be based on the application of simple thresholds on compensated energies ( 53 ,  54 ) from accelerometers (cGE_acc) and gyroscopes (cGE_gyr). For example, in the detection process illustrated in  FIG. 5 , during the short-time probe ( 55 ) two high thresholds (Th_highAcc, Th_highGyr) for cGE_acc and cGE_gyr, respectively, are used to discard a moving vehicle detection when high acceleration and gyroscopes energies are measured; as this situation is generally found when the user is walking, running, or simple manipulating the smartphone. On a complementary way, in the short-time probe ( 55 ) two low energy thresholds (Th_lowAcc, Th_lowGyr) are used to detect situations where low acceleration and gyro energies may correspond to situations where the smartphone is at rest. Consequently, when a short-time probe does not detect a possible high energy ( 56 ) or motion-less situation ( 57 ), a possible situation of moving vehicle is detected ( 58 ). 
     In several implementations of the invention —after detecting a possible moving vehicle situation in a short-time probe— the processing of a long-time probe starts, as shown in  FIG. 4 . Long-time probes ( 403 ) use sensor data corresponding to a longer period of time, thus providing a more reliable detection result. In various embodiments different ways of processing available sensor data can be implemented. 
     For example, one implementation, illustrated in  FIG. 7  may consider the combination of four types of information:
         a) Processing a long-time probe as a sequence of N_ST contiguous short-time probes ( 701 ) may provide a metric for moving vehicle detection as the percentage ( 702 ) of short-time probes with positive detection result, P_ST_PR:       

     
       
         
           
             
               P_ST 
                
               _PR 
             
             = 
             
               
                 1 
                 N_ST 
               
                
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   N_ST 
                 
                  
                 
                   PR 
                   i 
                 
               
             
           
         
       
       
         
           
             where 
              
             
               : 
             
           
         
       
       
         
           
             
               PR 
               i 
             
             = 
             
               { 
               
                 
                   
                     1 
                   
                   
                     
                       
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             positive 
                              
                             
                                 
                             
                              
                             dectection 
                              
                             
                                 
                             
                              
                             result 
                           
                         
                       
                       
                         
                           
                             in 
                              
                             
                                 
                             
                              
                             short 
                              
                             
                               - 
                             
                              
                             time 
                              
                             
                                 
                             
                              
                             probe 
                              
                             
                                 
                             
                              
                             i 
                           
                         
                       
                     
                   
                 
                 
                   
                     0 
                   
                   
                     
                       
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             negative 
                              
                             
                                 
                             
                              
                             detection 
                              
                             
                                 
                             
                              
                             result 
                           
                         
                       
                       
                         
                           
                             in 
                              
                             
                                 
                             
                              
                             short 
                              
                             
                               - 
                             
                              
                             time 
                              
                             
                                 
                             
                              
                             probe 
                              
                             
                                 
                             
                              
                             i 
                           
                         
                       
                     
                   
                 
               
             
           
         
       
         
         
           
             b) Also considering the long-time probe as a sequence of N_ST short-time probes, a metric for moving vehicle detection may be the number of consecutive short-time probes results ( 703 ) detecting high energy situations N_MP_ST. A high value for N_MP_ST may indicate that the user is walking or manipulating the smartphone so she is not probably driving a vehicle. Consequently this metric can be also suitable to detect that the smartphone user is not the driver of a vehicle. 
             c) Similarly to b) another measure to detect that the smartphone is not in a moving vehicle may be the number of short-time probe results ( 704 ) indicating that the smartphone is at rest, N_R_ST. Even though some short-time probes can detect that the smartphone is at rest when the vehicle is stopped, the period of time evaluated by the long-term probe should be longer than frequent short vehicle stops, for example when it is waiting under a red traffic light. It is also important to note that, as described before, a short-time probe detects that the smartphone is at rest using both accelerometer and gyroscope sensors, this will prevent failures to detect a peaceful moving vehicle that will barely generate acceleration measurements but can drive gyroscope signals due to frequent turns in roads. 
             d) Besides previous metrics provided as outcomes of successive short-time probes inside a long-time probe, all the sampled data from sensors, i.e. accelerometers, gyroscopes, . . . , gathered during the whole long-time probe duration ( 705 ) can be used to detect a pattern PMV_LT of a vehicle in motion ( 706 ). As in the case of short-time probes, various embodiments may use different pattern matching algorithms to detect a moving vehicle using sensor data. For example, a detection process may use Linear Discrimination Analysis (LDA) on a 2D vector ( 707 ) composed by compensated energy measurements ( 53 ,  54 ) from accelerometers cGE_acc and gyroscopes cGE_gyr, now obtained during the whole duration of a long-time probe. As illustrated in  FIG. 7 , through Linear Discriminant Analysis techniques (LDA) different regions excluding a moving vehicle situation may be detected, for example:
           d.1 A region with low acceleration energy, cGE_acc, but higher gyroscope energy, cGE_gyr, may represent different situations ( 710 ) not compatible with a smartphone use by a vehicle driver, for example: standing, rising to standing from sitting, watching a video, etc.   d.2 A region with both low cGE_acc and cGE_gyr may correspond to situations ( 709 ) where the smartphone is at rest.   d.3 A region with both high cGE_acc and cGE_gyr values generally corresponds to other situations ( 708 ) not compatible vehicle movements as when the user is walking, running, or simple manipulating the smartphone.   
         
             In other embodiments, different classification techniques as Classification and Regression Tree (CART) can be used and they can also have as input sensor energies obtained in a variety of ways (log energies, frequency-band energies, etc.) and from different sensors. Also a variety of pattern matching algorithms, as Dynamic Time Warping (DTW) or Hidden Markov Models (HMM) may be applied on trajectories described by the time sequence of sensor energy values obtained through the whole duration of the long-time probe. 
           
         
       
    
     Once several metrics have been obtained, a fusion algorithm ( 711 ) combines them to provide a final decision ( 712 ) on whether the smartphone is into a moving vehicle or not: 
         LT _movement_detection= f ( P _ST_ PR, N _ MP _ST,  N _ R _ST,  PMV _ LT ) 
     In some embodiments, decision rules may be used by applying different thresholds on P_ST_PR, N_MP_ST, N_R_ST and then combining these partial results with PMV_LT to take the final decision. In some other embodiments different fusion algorithms as Bayesian Networks (BN) or Logistic Regression (LR) may be use to fuse all the available information. 
     The block diagram in  FIG. 8  describes an implementation of the algorithm for detecting that the smartphone is no longer in a moving vehicle. In various embodiments, similarly to the activation algorithm, the deactivation algorithm may be implemented using measurements of compensated global energies ( 801 ) from three-axis acceleration and gyroscope sensors (cGE_acc, cGE_gyr). Differently to activation, contiguous long-time probes may be processed  802  to obtain a more reliable metric D_PREV_LT based on decisions taken over longer periods of time. For example, in an implementation may be D_PREV_LT the number of previous long-term probes ( 802 ) detecting that the smartphone has left the moving vehicle. Also differently from the activation algorithm, there is the possibility of using information provided by the activated geopositioning device, for example, the estimated speed information ( 803 ). 
     Therefore, in various embodiments, the estimated speed information ( 803 ), SPEED_LT, from the geopositioning device may be combined with the same four metrics used by the activation algorithm based on the results ( 804 ) from N_ST contiguous short-time probes: a) P_ST_PR, percentage of short-time probes with positive detection result ( 805 ); b) N_MP_ST, number of consecutive short-time high energy situations ( 806 ); c) N_R_ST, the number of short-time probe results indicating that the smartphone is at rest ( 807 ):, and d) PMV_LT, detecting a pattern of a vehicle in motion using all data in the long-time probe ( 808 ). A fusion algorithm ( 809 ) combines all the available information to detect when the smartphone is no more into a moving vehicle ( 810 ): 
         LT _no_in_vehicle_detection= g ( P _ST_ PR, N _ MP _ST,  N _ R _ST,  PMV _ LT,  SPEED_ LT, D _PREV_ LT ) 
     In some embodiments, decision rules may be used. For example, the estimated speed information SPEED_LT may be enough to decide that the smartphone is still into a moving vehicle, but there may be situations where the geopositioning receiver may lose information (for example when entering into a tunnel, or an area with high buildings, etc.) making SPEED_LT not reliable or unavailable. In those situations different thresholds may be applied on P_ST_PR, N_MP_ST, N_R_ST, so that these partial results can be combined with PMV_LT to take the final decision. In some other embodiments different fusion algorithms as Bayesian Networks (BN) or Logistic Regression (LR) may be use to fuse all the available information. Other implementations may also wait for several positive decisions (i.e. smartphone is not in a moving vehicle) from consecutive long-time proves D_PREV_LT before deciding the disengagement of the geopositioning receiver. 
     Note that in this text, the term “comprises” and its derivations (such as “comprising”, etc.) should not be understood in an excluding sense, that is, these terms should not be interpreted as excluding the possibility that what is described and defined may include further elements, steps, etc.