Sample altimeter C# code for Android and Wear devices with barometer
I've created two sample Visual Studio projects (in C#) that turn your Android or Wear device equipped with a pressure sensor into a simple altimeter showing current altitude above mean sea level in feet. I hope some jumpers with at least basic understanding of software development might find this interesting and poke around the code, customize it to their likes, and maybe even develop their own ideas. It's a very simple app - all the code, including the barometric formula, is in MainActivity.cs. We now have quite a few smart devices equipped with a pressure sensor, some of them are even very affordable, for example, Moto 360 Sport was available a year or two ago at Walmart and Target for ridiculous closeout price of $50; it has an excellent transflective screen which is very readable in direct sun; GPS, barometer (with 25 measurements per second!), accelerometer, etc. ZTE Quartz, I believe, is about 80 bucks. LG G Watch R (barometer at 90Hz) can be found used for about same price. Nixon Mission is the absolute king of sensors: a mind-boggling pressure sensor at 167Hz (!!!), accelerometer, gyro, magnetometer, thermometer and humidity sensors, all in this mean-looking mens watch. ($300-450, though)
I've been using Android Wear smartwatches (LG G Watch R initially, then Moto 360 Sport and Nixon Mission) on every skydive since late 2015, and they've been performing wonderfully (running my own simple, but very precise altimeter app, Smart Altimeter). I also use them on wingsuit BASE jumps for exit altitude measurements, as a quick performance gauge by checking the altitude right after opening, for rockdrop measurements (using my Rockdrop Pro app), and for specialized lift-to-drag ratio measurements (using my L/D Vario app, see https://www.youtube.com/watch?v=9Oj8SXvs4GU).
Some Android phones (mostly high-end) also have a barometer, but the sample rate is usually not that high as in smartwatches (go figure). The highest (30Hz) numbers were reported for Google Nexus 4 and Samsung Galaxy S8.
I hope this sample code will spur interest in developing awesome apps for smart devices using their sensors and computing power. The amazing, affordable multi-purpose hardware is here; round pucks the size of an Oreo with incredible array of sensors and high level software development (very similar to desktops, unlike the low level embedded programming). It's the specialized software for jumpers that is almost nonexistent.
Steps to creating an altimeter app for your Android/Wear device:
1. Install Visual Studio Community 2017: https://visualstudio.microsoft.com/vs/
(available for both Windows and Mac)
2. When installing, make sure you select options for mobile app development.
3. Open the solution - Altimeter_Android.sln, or Altimeter_Wear.sln.
4. Make sure Packages in solution are up-to-date. Also, update Tools/SDK Manager.
5. Build the project.
6. On your device, click 7 times on system build number (System->About), you will get Developer Options, turn on USB debugging (Android) or ADB debugging (Wear).
7. Connect your device to computer, confirm debugging permission in a dialog, and choose your device in VS on top in the list of devices.
8. Click on project and in the Run menu select Upload to Device.
9. That's it! On your device, a new app "Altimeter" will appear, now you can experiment with code!
Good luck! Please share how you're using your smart device for skydiving or BASE jumping with your own app or other apps.