Well it's a good thing I wasn't relying upon Mr. Gibbs to navigate the ocean! The system had some issues, to say the least. The bad news is I didn't get to gather any usable data over the weekend, and we did not actually get to use the system at all. The good news is the issues are fixable, and I learned some important lessons.
The biggest issue was that the GPS did not work. At the time it didn't make any sense, after all, the GPS was working fine last season right? The problem turned out to be 1 simple setting I forgot to change in my Jessie image, the setting which pipes the serial port to the root console. Essentially what was happening was the gps was dumping NMEA strings into the root console, and the console was dumping error messages back to the GPS. After about 30 seconds or so of this (during which the GPS would appear to work) the stream would go off the rails and the GPS would be rendered useless. Simply disabling the serial port root console fixes this issue. Unfortunately, without GPS data the rest of the system is fairly useless. Why didn't I catch this? Well first of all because I didn't have any time to do much testing last week, and second because when bench testing in my shop I use "simulated" gps, aka NMEA strings read from a file. A hard lesson learned.
The next issue was that I allowed my pebble to pair with Mr. Gibbs, but then later unpaired it from the watch. The problem here is that Mr. Gibbs doesn't know that, it just keeps trying to reconnect as if it was paired. Without a monitor/keyboard there is no way to unpair a Bluetooth device from Mr. Gibbs. I added some exception handling code so that if a connection fails, it will un-pair the device, enable discovery, and attempt to re-pair and reconnect. This should allow me to recover from this situation in the future without needing to "plug in" and poke around.
The final issue was that the wind sensor did not work at all. It was able to connect to the sensor, however the sensor did not report any data. This was the most surprising failure to me. The other two I accepted because I haven't spent any time in that code for a few months. The wind sensor though is what I've been spending most of my copious free time working on, so when it failed utterly it was a bummer. I think the issue is timing. The wind in DC was strong, and the anemometer was spinning faster than I ever tested it on the bench. I believe this created a situation where interrupts were stacking up on the micro controller faster than it could process them, and the clock does not tick between interrupts so there are no deltas to compare, and thus no data. I decided to re-write the wind sensor code to use an existing debounce library, no interrupts, and one big loop.
Lesson learned: test with the full range of sensor input, in this case wind speed. It's surprisingly difficult to generate an artificial 30mph wind to attempt to saturate the microcontroller, but I have a plan involving a leaf blower. On the plus side, we did have a brief capsize that put the wind vane in the water and it survived unscathed so I consider that a victory for the PVC monstrosity I constructed to keep it dry.
Other than Mr. Gibbs, we had a good regatta. We had a number of "first sail of the season"-type gear issues from hardware coming loose to knots coming undone and halyards going up the mast, all of which my crew handled in stride. One unforeseen downside to Mr. Gibbs failure was that not only did we not have that functionality, we also didn't pack a backup stopwatch. The pebble has a stopwatch app, but it is not baked in, it has to be loaded just like any other app, so we were timing our starts based on the minute hand. Suffice to say, our starts were pretty terrible. Lesson learned: pack a backup watch. We ended up 2nd place overall which I was very happy with given the number of hiccups and my poor starts.
Our next regatta is in a few weeks and I hope to be able to gather some useful data with Mr. Gibbs to help steer the future of the project.