Hi there. I'm currently working on a smartphone app that can record the vertical position of my phone. More specifically, I will leave my smartphone inside an elevator for a day and I'd like to see at the end of the day all the elevator calls that have occurred. To understand from which floor the elevator has been called, I think I could use my phone’s accelerometer and gyroscope. Also, my phone doesn't have a barometer and the altitude sensor is not precise enough (constantly changing without moving the phone). However:
- I'm not able to erase the gravity force from the z acceleration sensed by my phone. To distinguish where the elevator is going I need to see the variation (positive for up, negative for down) of the acceleration only when the call arrives. Here is the code I used:
- My phone crashes when I try to create and write on a file.
Is there any extension that could help me? Do you know if there is any solution for my academic project? Thanks a lot.