Last updated: Dec-2012, although it was recently re-compiled to make it compatible with the Android 5.0, and renamed to Barodroid.

This app was first written when barometric pressure sensors were first added to Android phones. At that time, this app was called "Barometric Altimeter" and was accepted by Google. Since then, many more similar apps have appeared and the app name I had used was deemed by Google to be in an excluded list, and had to be changed. So on re-compilation, it got renamed to "Barodroid".

Click here to find it on Google Play.

 Version 1.23

Important note on Data Recording: Since the Android O/S is does not seem to easily support an App running continuously as a background process, the only reliable way I could find to continuously record data with this app, is to ensure that it is always a foreground process.

Cycling through the screens

Barometric Altimeter


Data Recording

When the data recording option is turned on, a CSV file (Comma Separated Value file) is created on the SD card in a directory called /mnt/sdcard/Altimeter. This file can be opened with any text editor or Microsoft Excel. When data recording is active, the numbers displayed on the plot screen are shown in yellow font. If the Wake-Lock is turned on, they are in green font.


Data Recording issues

The data recording option has introduced a few software challenges, hence the reason I haven't issued any updates for a while. I think I have got the app in a stable state now, but it is still going to need a major re-write soon to get it working the way I want (and also becoming more skilled in the art of Android programming). One day I will do this, but I don't have the time at the moment.

If the Data Record option is NOT turned on, then this app should function the same as before.

Data recording only starts when the Plot Screen is in the foreground. Navigating from the Plot Screen back to the Main Screen will cause the data recording to stop, and it will be re-allowed again when returning back to the Plot Screen.

There are 2 main issues that you'll see with the Data Recording option. These are:

  1. Gaps in the recorded data. These will occur at times when the phone sleeps. The data gaps are much more likely to occur in Airplane mode.
  2. The activity gets terminated by the Android O/S when the App is in the background. The reason this happens, is that the Android system may want to free up memory for other foreground activities, and any background activity is fair game for termination... and I haven't figured out how to handle this situation properly yet.

To stop gaps in the recorded data, there are two options

  • Plug the phone into an external power source and this will stop the phone from going into Deep Sleep mode. Either a charger or an external battery pack is OK.
  • Click on the check box to enable the CPU Wake-Lock in the settings menu. This will stop the phone from going into Deep Sleep mode while on battery power. However, the battery life of the phone will be reduced..

The screen will still turn off as normal, and the Wake-Lock will only stop the CPU going into Deep Sleep mode. A good App to monitor whether the phone can achieve Deep Sleep mode or not, is "CPU SPY".

To stop this App from getting terminated by the Android O/S, dont overload the phone with other running apps, and preferentially, keep the Barometric Altimeter in the foreground. If it is in the foreground, it should not ever get terminated by the Android O/S (unless you get a phone call !)

There is a chance that an occasional force close may occur, although I do hope I have fixed these bugs. If these happen, then it is when other foreground process are running and the Altimeter App has got pushed further down the stack into the background, and wasnt terminated cleanly when the Android O/S decided to kill it.

If you do get a Force-Close error, and the Wake-Lock was on prior to the Force Close, then it's possible that the Wake-Lock may not have got turned off. One way to clear the Wake-Lock off, is to turn the phone off and on again. Another way is use the app that is called "Wake Lock" (see below), and activate, and then de-activate the PARTIAL_WAKE_LOCK..


CSV files and file format

The CSV file can be copied to a PC and plotted using Microsoft Excel or similar. Note that by default, Excel doesnt display the full time format, so you got to select an alternative format to see the complete time value. The are also several text file viewers on Android that can view these files, and there is even a "CSV Viewer" in the Play Store, however, this only displays the values.

I do have a CSV Plotting program for Android in progress, but havent completed it yet. It currently exists in the Play store as "LAS Viewer", which will get updated to support CSV files as well as LAS files in the near future. The LAS Viewer in it's current form will not plot CSV files.

CSV File Format.....

  • Column-1: Time stamp at the end of the data averaging period.
  • Column-2: Time in seconds from when recording started, referenced to mid-way thru the data averaging period.
  • Column-3: Average barometric pressure.
  • Column-4: Computed altitude.
  • Column-5: Computed rate of elevation change.

The CSV filename is composed of the current date and time. For example, a file called "20120805_082931.CSV" was created on 5-Aug-2012 at 08:29:31.



Below is a plot of 8 hours of barometric pressure recorded overnight with the phone on a charger, and using an averaging interval of 1 second. This has resulted in over 23000 data samples. Data is plotted using Microsoft Excel.

Barometric Altimeter 

Below are some plots of the data recorded whilst the phone was in Airplane mode, and travelling from Ho Chi Minh City to Bangkok (flight time equals 1 hour). An aircraft cabin is a controlled pressure environment, so even though the plane reached 10,000 metres altitude, the cabin pressure never exceeded the equivalent pressure value for 2200 metres altitude. Interestingly, the cabin pressure remained at the ground level value until about 5 minutes into the flight, after which is was allowed to vary. The sudden jump at the end, is when the pressure was equalized to the outside pressure, probably just before opening the doors !

Barometric Altimeter

Barometric Altimeter


Useful Auxiliary Apps

  • CPU SPY (by storm717) : for checking if the phone can achieve Deep Sleep mode, several minutes after the phone becomes in-Active
  • Wake Lock - Power Manager (by darken): A manual way of turning on the Wake Lock. Note the WakeLock used in the Altimeter App is a PARTIAL_WAKE_LOCK. It seems that this app can also be used to manually turn of the Wake-lock that is set by other apps (but I'm not 100% certain on this)
  • CSV Viewer (by Shiratori): For viewing CSV files data.