Sunday, February 23, 2014

Watch Operating Systems

This is kinda becoming my Android discussion page, so I'll talk a little about a change that Samsung has made, and why it doesn't matter at all.

Samsung has a couple watches on the market, the Samsung Galaxy Gear and the Gear 2, and the Gear 2 Neo. The Gear 2 watches were announced yesterday, and have some people in a tizzy.

The original Gear watch that Samsung announced over the summer was not well received by most consumers. Partially it was some of the limitations it had initially (I only worked with the Note 3 when it first came out), and partially it was the price (retail was almost $400). The battery only lasted about a day (25hours), and the camera was fairly big in the band.

The one thing that Samsung tried was putting the full Android OS on the watch. I commend them for trying to put a full mobile OS  on a watch. There are several facilities in the Android OS that probably weren't needed for a watch. As an example, the watch didn't have any phone hardware, so that facility could be turned off, but probably there are things that cause the OS to at least check for the hardware.

The new gear 2 watches no longer run Android. The new watches run Samsung's other OS, Tizen. Some folks thought Samsung was using Tizen as a threat to Google. The worry was that Samsung was going to switch all their phones and tablets from Android to Tizen, freezing Google out of that section of the market. Maybe Samsung folks were making that threat to Google, but recently Samsung and Google have put together a more cooperative agreement.

Tizen on the watch will make some people wring their hands. They will say, it is the end of Android, and that Samsung has started the switch. Maybe Samsung will try some Tizen phones, but I don't see them running all their mobile devices on Tizen. The Android/Google eco-system has too many facilities that Samsung would have to duplicate and get 100% right. Some people think Android is inferior to iOS, can you imagine the reaction if the Tizen eco-system isn't as good as iOS on day 1.

At the heart, or at least the lowest level, both Tizen and Android run Linux OS. There are many variants of Linux, and over the last couple (ten?) years the Linux OS has been optimized for lower power. Anything put on top of Linux will use more resources, and more power (IE Battery). Faster processors are generally more power hungry as well.

A watch should last a while before needing a new battery or recharge. How inconvenient to be somewhere without a charger, but needing a watch to work.

A watch doesn't need as much operating system as a smart phone. I played with the TI Chronos watch. That watch didn't have bluetooth or WiFi, but it still had wireless capability, so it could be programmed and get alerts from a computer, using the enclosed USB FOB. It has fitness functions, and tells time, and each segment in the face is programmable. The cool thing is, the battery lasts about a year!

Last week I saw on Hack A Day a watch someone built with an Arduino (ok now this post matches the charter of the blog :-). This watch has bluetooth, and can talk to an Android device. There are no claims on the battery life, but it has a rechargable lithium battery, and would guess, it might last several days at least. Put something like this in a 3D printed case, and some other cleanups, and it could be something I would be proud to wear.

No on seems to care what OS any of the other smart watches run. I've heard Pebble runs the FreeRTOS, but I don't know or care. Sony smart watch, according to Wikipedia runs the Micrium uC/OS-II. Meta watch also seems to run the FreeRTOS according to Wikipedia.

None of the other smart watches run Android. Samsung tried it, and it didn't work. They are smart to try something else.

Sunday, February 9, 2014

Developing For Android

I have been doing a little developing for Android. I've mostly been trying to familiarize myself with Android Developer Studio (ADS). I used to use eclipse, and it worked great. ADS is based on intelliJ, and I kind of like it, I see where it is heading, and can sort of see that it has the potential of making developing something almost anyone could do.

I've also been frustrated with it. It seems every other time I use it, it says there is an upgrade ready. I've upgraded a couple times, and lost hours trying to get it working again. Sure if you are working 8 hours a day on this, you probably know right where to look, and besides what is a couple hours. If you are doing this weekends and nights, and you loose a couple hours, that can quickly translate into days.

The main failing is the build process. Yea, ADS uses Maven, and that doesn't change. What typically breaks though is the Gradle part. Plenty of note on how to fix gradle every time it breaks on StackOverflow and other places. I've just decided I don't need the updates, and I won't have to loose any time. What I got seems to work for me, and I see no reason to upgrade.

My app is using the android devices gyro's. I am not trying to build a glass panel yet, but just trying to understand the sensors and their limitations. I have the accelerometers working, and you can see graphically and textually how the sensors work. The gyros, I am trying something similar. The gyros are rate gyros, meaning they return the degrees per second the unit is changing. A turn coordinator is a rate gyro, where a standard rate turn in a Cessna 172 is 3 degrees per second.

To make something like an attitude indicator, the rate gyro must be integrated over time. Once the device starts a 3degree/second bank change, as long as the gyro is reporting 3 degrees per second, it will keep adding these values. The first second will be 3 degrees, the second 6 degrees and so on. The math can get a little complicated, but there are plenty of examples on line.

So right in the middle of that, the emulator was working great, but the phone kinda quit working. It would paint the screen once, and the crash. The dreaded "Unfortunately, ExampleMain has stopped". message. (No I haven't created a cool name for this app yet). The emulator doesn't have real sensors, so it is hard to figure out why this is crashing.

I tried to connect the phone to the computer using USB, and debugging that way. Wow, that took more than I thought it would take. Samsung's web site was no help, try searching their site for "windows 7 usb android drivers", and you'll get taken to the laptop support page where you can download USB drivers for samsung laptops.

After many hours, I finally found this site: Just by the name you can tell it is what I am looking for. This is supposed to be the drivers that will allow debugging adb and the phone! Yes, finally the phone shows up in the list, but it is listed "Off-Line".  If I click on it, the debug window just says "Waiting for device.". Finally someone said stop ADS and restart it. That was the magic.

Now I can debug on the phone. I am getting the same results, "Unfortunately, ExampleMain has stopped". message, and even the debugger isn't pointing me in a direction. Dang it, but at least I can set breakpoints in places I think there might be trouble. The two thread main loops don't seem to be the target yet. Next I'll try some of the new code I added.

Friday, February 7, 2014

More Aviation Software For Android

That last post got some good hits, and then I looked at my tablet, and realized I forgot a whole bunch of apps. I'll include the same categories, and list 10 more titles.

Moving Maps

To get good reliable moving maps in most aircraft will take an external GPS unit. These external GPS receivers can be mounted somewhere with a clear view of the sky. Sometimes the tablets will be used in places where they are unable to get a full view of the sky, making them unreliable. The external GPS receivers may have other capabilities (IE WAAS or ADS/B) as well.  

I forgot the biggest of the big names. Garmin has and Android app, Garmin Pilot. The tag line "Plan, File, Fly" is what it seems it can do. There is a 30 day trial with this app, and requires a $9.99 monthly subscription. It includes charts (VFR, low and high IFR, approach plates and airport diagrams. Gets weather from NWS, including METARs TAF, winds aloft, PIREPs and various maps. Allows flight plan filing via DUATs.

Avilution AviationMaps is another application that seems really nice for maps. Allows breifing and filing through DUATS. Advertises that it can  get weather including NEXRAD through ADS/B receiver, making it a very handy tool. Can get weather maps, METARs, TAFs, PIREPs and NOTAMs while in flight, or on the ground. Icing, winds and area forecasts are only available on the ground (this is a ADS/B limitation, not the software). All the same maps, VFR, Hi/Lo IFR, approach plates and airport diagrams. The subscription is either $74.95/year or 149.90/yr premium.

AirNavigation Pro includes maps and instruments.The instrument looks like an HSI, which I have always preferred for telling me where to go, or if I am on course or not. The charts they say are free and cover the whole world. The cost is $26.95 to buy, and doesn't really mention any subscriptions. This may be an app to keep an eye on.


AirWX Aviation Simple layout, enter an airport, the tabs appear for METAR, TAF, PIREPS, Charts and Plates. A really simple thing to be able to check as you get to an airport, not sure how useful it will be when flying for a couple hours (doesn't say ADS/B receivers are supported). No subscription fee, but will cost you $6.99 to buy it.

Weather Pilot Simple organization, allowing looking at text weather for multiple airports at a time. Very light weight, seems pretty fast and reliable. Still limited to mobile data, and not ADS/B receivers. It is free, and no subscription is required.

Avilution E6B Flight Computer - Real basic conversions, but seems well organized. Enter what you know, and it will figure out the rest. It is $4.95 to purchase it. It is likely you will not be able to use this on a test, since the proctors will confiscate your tablet and phone before going into the testing area.


Trade-A-Plane I used this weekly for a while on my old phone. Really handy for looking up used plane prices, or avionics or whatever you used to see in the yellow paper. Loved it, but I am not looking to buy things these days, so sadly, I haven't used it in a while. This app is free.

Aviation Exam just had a huge upgrade, it is very pretty now. I most recently used their app to earn my AGI rating. The Flight/Ground instructor review was really helpful, and allowed me to get a good grade the first time. The app is free, but you need to buy the test you want to study from. The tests are mostly $9.99-13.12 for 2 months, and can be had in bundles (IE PPL, IR, CPL). The tests are for EASA and FAA. Hooks into and allows sync'ing tests and results.

GPS Status isn't just for aviation, but if you use GPS for anything, it may give you more insight about the accuracy of your GPS receiver. It shows the receivers in the sky right and their relative position. On the bottom, it shows the relative signal strength in a bar graph. Most Androidn GPS receivers will allow picking up US GPS and Russian GLONASS GNSS satellite signals and use them to give even more accurate position reports. This will show most of the relative position information the device can provide, including error information (DOP/HDOP/VDOP and absolute error in ft).

Ultimate Flight Checklist Mobile is a huge name, and will put it in the bottom of any alphabet list, but it is a great checklist tool. It allows adding any number of checklists for various aircraft. It comes with the three popular training aircraft; Cessna 172, Piper Cherokee 180, and Socata TB-10. You may add your aircraft and customize the checklist for any particular aircraft. Set your checklists in a way that works for you and be safe.

This again is not an exhaustive list of the aviation apps out there for the Android. It is a collection of some that I have used, or thought were interesting. If you have a favorite, let me know, and I'll take a look. Authors, users, doesn't matter to me, I'd love to hear what your favorites are.