Posts Tagged “Ruby”

REDIS

After a lunchtime conversation with a friend of mine, I ditched some of the earlier design considerations around message-passing and MQ-based systems in favour of the NoSQL database Redis.

Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

That’s according to the official blurb on the web site, at least. It has several interesting components which are useful for Beoga Beag. It has a rudimentary pub/sub architecture pattern, it is extremely lightweight, it stores its database in memory rather than on a disk (so it’s less likely to burn through the Compact Flash file system), and it has an “append-only file” (AOF) archive mechanism.

Read More

The Software...

The FreeBSD Daemon, ready to take on Neptune and his cohorts.
The FreeBSD Daemon, ready to take on Neptune and his cohorts.

I’ve been asked recently, about the software platforms used on board Beoga Beag. This seems as good a time as any, to talk about the various layers. As mentioned previously, the lower layer is a custom board, running an ATmega8 Atmel processor. The software (Igor and Otto) is custom-written in C for the boat.

Read More

Five Degrees of Wrong.

So, as I mentioned, the virtual boat was too eager to tack. If you’re dead downwind of the mark, and you set off on a starboard tack, within a metre of being on the left-hand side of the course, the other tack is favoured.

I added code that essentially stated “unless the other tack is at least five degrees better than the existing one, ignore it.” So, if I’m at 44 degrees TWA and the other tack is better by a degree (-43 say), stay where you are. This works quite nicely. If you look at the plotted course, it shows the boat sailing nice upwind legs, to the waypoint. As Henry would say, “it’s sailing up the ladder.”

Without that little extra piece of code, it would tack repeatedly, attempting to sail directly upwind by constantly tacking. A strategy that’s doomed to fail because tacking slows the boat down, and isn’t something you should do too often.

Read More