Accel digital spirit-level wanted

Joel Newkirk freerunner at newkirk.us
Sat Nov 29 03:40:04 CET 2008


On Fri, 28 Nov 2008 20:17:17 -0500, Joel Newkirk <freerunner at newkirk.us>
wrote:
> On Fri, 28 Nov 2008 03:28:32 -0800 (PST), bytestore <bytestore at yandex.ru>
> wrote:
>>
>> :) Many thanks, I did not know
>>
>>
>> Stroller-2 wrote:
>>>
>>>
>>> On 28 Nov 2008, at 07:02, bytestore wrote:
>>>> anybody, write programm digital "building" level
>>>
>>> The English word for this is a digital "spirit level".
>>>
>>> http://en.wikipedia.org/wiki/Spirit_level
>>>
>>> HTH,
>>>
>>> Stroller.
> 
> I explored this a couple months ago.  My conclusion was that we didn't
get
> enough precision and stability from the accelerometers for this purpose,
> without smoothing computations I didn't explore.  My testing indicated,
> for
> example, that if the FR is laying on a 4-foot long shelf, you can raise
or
> lower one end of that shelf by about an inch before being certain via
> /dev/input/event3 that you've in fact tilted the FR that direction.  At
> about a half-inch it's clear that the values are changing, but the
> constant
> low-level fluctuations drown out your certainty, short of quite a bit
more
> work (computationally, smoothing and comparing) than I was interested in
> putting into the project at the time.
> 
> j

I tarballed up my work-in-progress. It's a short python program and a
couple image files, at http://newkirk.us/om/testing/level.tar.gz - extract,
'python bubble.py' to run, tap screen to exit. (depends on python-pygame) 
After starting up it calibrates by averaging the first 17 samples it takes,
calls that 'level' and proceeds to show deviation from that.  Obviously
this is useless in the actual use of a spirit level / bubble level, it's
set that way for testing. 

j





More information about the community mailing list