A.M. Got a stomach bug. As an interesting coincidence I happened to read Pres. Bensons talk on missionary work from the 1974 General Conference shortly after getting it. This helped me feel thankful for my afflictions. The missionaries in the early days of the Church would have gladly traded a few months of my stomach bug for their illnesses and other forms of adversity.
Dragged myself through 12.5 miles. Benjamin did 8, Jenny 1, Julia and Joseph 2, Jacob 1, William 0.5, Sarah 1. At the end of everything I was running with Benjamin and he heard lots of groans. It was just easier to deal with the pain if I groaned. Have not eaten anything today except an apple, and I am still not hungry, although I am feeling weak.
Coded up the battery usage feature in the Fast Running Friend, made version 1.1 release, and got to test it. Some observations:
- Battery life of Fast Running Friend on MotoACTV with GPS and Bluetooth on is around 2:30 h. So I would have to do some tricks to make it usable for racing a marathon.
- When the battery drops to 5% the GPS signal first becomes low quality (I got 1:28 per mile pace at the end) and then the GPS is shut off by somebody outside of the application control (kernel or firmware, I imagine). With the GPS off the battery life is much longer, and it can go at 5% for some time.
- The current Fast Running Friend distance algorithm needs fixing to deal with a cloudy day and other bogus GPS data. I do need to gather the data to a file to be able to come up with a good one, though, and I really did not want to do it in Java. So I learned how to use JNI with Android build, and started writing a C implementation of periodically flushing my circular GPS data buffer into a file.
- I am very pleased that aside from GPS signal and battery issues the Fast Running Friend has been reliable so far. I have tried a few GPS apps on Android before, and every single one of them ended up freezing my phone after about 4-5 miles. I have not debugged but I have an idea why. My phone is a low-end, the cheapest Android I could find with only 160 MB RAM. An app that is not careful with memory allocation will quickly run it out of memory and bring the whole thing to a grinding halt, and it is easy to be sloppy with memory allocation in Java when storing large amounts of data. Well, there is no such thing as freeing memory in Java except running the garbage collector, and it tempts me to use profanity. MotoACTV has 256 MB RAM, so a little better, but still you need to be careful, you cannot just run any app off the shelf and expect good results.