FWIW, I just saw the following message on the BasicStamps list. I'm guessing that ARCTAN is new with the Beta version of the editor. How many of you would have used this this year if you had know about it?
Date: Thu, 24 Apr 2003 16:06:13 EDT
Subject: Re: [basicstamps] Re: accelerometer issues and questions (Parallax/Memsic dev...
As I often remind list users ... you should download the data sheet for the
Memsic device. The calculation of angle using both axis of the 2125 is comes
directly from Memsic data. It works because the PBASIC ArcTan function
returns a vector angle for a line that extends from 0, 0 to X, Y -- the
Memsic 2125 returns X and Y in g-force (that's why both sensors are
required). Since the sensor returns positive and negative g force values,
all quadrants of a circle can be covered.
To be fair, ArcTan was not previously documented but is included in the new
PBASIC Help File that will be provided with the compiler update that will be
out soon. Since we're discussing it though, ArcTan returns Brads (0 - 255),
not degrees, so a conversion to degrees is required.
-- Jon Williams