[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
apsscale - a calibration tool for the aps(4) accelerometers
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: apsscale - a calibration tool for the aps(4) accelerometers
- From: Chris Kuethe <chris_(_dot_)_kuethe_(_at_)_gmail_(_dot_)_com>
- Date: Thu, 27 Oct 2005 14:43:11 -0600
- Reply-to: ckuethe_(_at_)_nabmwclub_(_dot_)_ca
I had a chance this weekend to go for a rather spirited drive, and I
had my new T42 along for the ride. I tossed together a quick shell of
a program to poll hw.sensors... and off I went with 50Hz samples. The
problem was that aps(4) returns raw accelerometer values with unknown
units ... let's call them fignewtons. The fignewton isn't particularly
useful when doing dead reckoning calculations, or trying to decide
whether you want to put the racing tires on, so I wrote a tool called
apsscale to translate fignewtons into hundredths of a G.
The calibration tool is my own, the manpage and the sysctl support was
blatantly copied from ztsscale. Future revisions of this program may
output in thousandths of a unit, and may generate calibration
constants which scale aps(4) output into m/s^2 or ft/s^s. The reason I
output in hundredths or thousandths is that it's an easy way to do the
math without losing too much precision, and it's "Considered Harmful"
[ ;) ] to do floating point math in the kernel.
Because this list does not permit attachments, interested ThinkPad
users can download the program and the diff from
GDB has a 'break' feature; why doesn't it have 'fix' too?
Visit your host, monkey.org