8. Conclusion
The barometer is one of the least frequently used sensors on smartphones, but is also one of the most promising. In this work, we demonstrated the advantages of the use of barometric pressure data from sensors embedded in mobile phones to recognize verti- cal displacement activities. We evaluated the performance of three different models to infer user activities and found that the LSTM recurrent neural network has a very high accuracy rate. How- ever, J48 decision tree algorithm is a good choice for resource- constrained devices owing to its fairly high accuracy, its low com- putational overhead, and (consequently) its low energy consump- tion. We implemented an Android application that integrates the J48 decision tree algorithm and infers the activity performed by a user. The application uses barometric pressure data to provide information on the vertical distance travelled by a user and also shows it instantaneously on a graph. We also showed that baro- metric pressure sensors have many advantages over sensors tradi- tionally used for activity recognition (namely, accelerometers and GPS) in terms of accuracy, energy efficiency, indoor effectiveness and independence from the phone position. The use of baromet- ric data for activity recognition is very advantageous, as many ap- plications that cannot be correctly recognized with accelerometer can be easily inferred with pressure data. Furthermore, the baro- metric sensor can enhance the quality of accelerometer sampling whenever a vertical displacement is present but is not the main movement. Finally, the barometer can also be used as a trigger to accelerometer sensing when the barometer itself cannot achieve a sufficient quality, resulting in a more power-efficient approach. Future work includes the use of multiple sensors for activity detection and the implementation of a mechanism for switching between sensors – and their underlying methodology – depending on geo-position, predominant activity, and objective functions like e.g., battery life and accuracy optimization.