http://maps.google.com/?q=http://spirit-plumber.com/life.kml
The places in my life I’ve been to, not counting stays of less than a month or stays where I didn’t do any study or work. Each place is indexed once. I tried to keep them in chronological order. Starts in Milan.
I’ve mostly stuck to the northern emisphere and the Atlantic really… I need to do some more exploring
… especially when you have to contend with the limitations of whatever little microcontroller you’re working with; a lot of micros don’t have trig functions or only have sin/cos/tan. Atan2 is a fundamental function in navigation (it lets you turn two pairs of coordinates, for example where you are and where you’re going, into a heading, for example which way to turn how to get there) but if it’s there it tends to be slow as most microcontrollers don’t have lookup tables for it. You can do Taylor expansion, but it’s very slow — and on microcontrollers that can only do integer math precision is lost very quickly.
With this in mind, I had to come up with ways to approximate atan2 quickly and precisely enough to drive or sail by.
http://spirit-plumber.com/portfolio/math/fastatan2.htm
You can use this formula with a microcontroller that can handle 32 bit floating point numbers, such as the Parallax Propeller. If you’re limited to an even smaller system (say, a Basic Stamp or Picaxe or PIC micro) here’s the 16 bit integer version, accurate to 1 degree in most cases.
http://spirit-plumber.com/portfolio/math/fastatan2_integer.htm
Why the emphasis on using as few divisions as possible? Because micros generally have to do “long division in their head” by means of repeated subtraction; division generally takes long compared to other operations.