Re: Re : Re: accelerometer calibration

2010-12-27 Thread W. B. Kranendonk


--- On Sat, 12/25/10, Timo Juhani Lindfors  wrote:
> "W. B. Kranendonk"  writes:
> > I found it after searching for accelerometer-dump, but (the FR)
> Just capture the data on FR but run it on your PC. Like
> 
> li...@sauna$ ssh neo cat /dev/accelerometer-top |
> accelerometer-dump
I get that far on my PC :-) 

> > Any idea what to do about the diversion? I bought that
> FR second
> > hand, and it has had this "feature" ever since I got
> it.
> 
> I guess you could fix it by software but such a fix is
> probably not
> going to be accepted upstream since it is so ugly :-)
> 
My coding skills are about the right level for compiling accelerometer-dump.c, 
so I do not think anything I fix is going to get accepted upstream anytime soon 
;-)

Coming back to the initial question, can those accelerometers be calibrated or 
is it a black box that emits (timestamps and) coordinates?


Boudewijn


  

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Re : Re: accelerometer calibration

2010-12-25 Thread W. B. Kranendonk
--- On Sat, 12/25/10, Iain B. Findleton  wrote:
> The output from
> the chip is quite noisy. 
The problem is not that the signal is not reliable: it is. It is just that it 
is off by a few degrees. 

> There is a script I wrote in TCL
> on the
> SourceForge web site under the fltkwish project page. It
> may give you
> some ideas about that can be done. In my experience, the
> results vary
> depending on which of the chips you use.
I have used the (a?) waterpas before, when there was such a program in the SHR 
repositories. I just had a shot at gravity, but there are some missing 
dependencies. 

It complains about libtcl8.4.so:
# gravity 
fltkwish: error while loading shared libraries: libtcl8.4.so: cannot open 
shared object file: No such file or directory

I tcl, fltk and fltkwish installed and libtcl8.5.so.0 is available
I symlinked it to libtcl8.4.so:
 # ls -latr /usr/lib/libtcl8.*
-r-xr-xr-x1 root root663504 May 29  2010 /usr/lib/libtcl8.5.so.0
lrwxrwxrwx1 root root14 Dec 23 20:17 /usr/lib/libtcl8.4.so 
-> libtcl8.5.so.0

Now it aborts with just that:
# gravity 
Aborted

Perhaps another time :-)

> 
> Note that on the iPhone, some versions of which used the
> same chip, you
> only get access to the 100/sec samples, 
On a sidenote: long live closed platforms

> The other issues is there was at one time some confusion
> about how the
> driver reported through the event mechanism. I forget the
> details now,
> but working code depended on how up to date your kernel
> was. If you have
> a kernel of recent vintage, should not be an issue.
It's the latest SHR:
# uname -a
Linux om-gta02 2.6.34.7 #1 Sun Dec 5 23:10:39 CET 2010 armv4tl GNU/Linux

I wonder (..doubt..) if the issue is in the software, because it has been like 
this over the last half year or so, with different distro's and no problems on 
the other FR with the same version of a distro.

Thanks for the insight anyway!

Boudewijn


  

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Re : Re: accelerometer calibration

2010-12-25 Thread Timo Juhani Lindfors
"W. B. Kranendonk"  writes:
> I found it after searching for accelerometer-dump, but (the FR)
> didn't have gcc installed and don't know yet which packages to
> install to make it useful. At least a reason now to dive into
> figuring that out :-)

Just capture the data on FR but run it on your PC. Like

li...@sauna$ ssh neo cat /dev/accelerometer-top | accelerometer-dump

> Any idea what to do about the diversion? I bought that FR second
> hand, and it has had this "feature" ever since I got it.

I guess you could fix it by software but such a fix is probably not
going to be accepted upstream since it is so ugly :-)


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Re : Re: accelerometer calibration

2010-12-25 Thread W. B. Kranendonk


--- On Sat, 12/25/10, Timo Juhani Lindfors  wrote:
> "W. B. Kranendonk" 
> writes:
> > Would that mean that (one of) the meter(s) is
> connected at an angle?
> > Are they not calibrated in software?
> 
> top and bottom accelerometers are oriented differently
> anyway.
Yes, now you say it I recall reading about it. I actually meant: could it be 
that it is installed at an incorrect angle, i.e. not perpendicular or paralell 
to the case, but slanted.

> > Is the accelerometer-dump standalone, and do you have
> a binary version available? 
> 
> http://iki.fi/lindi/openmoko/accelerometer-dump.c
I found it after searching for accelerometer-dump, but (the FR) didn't have gcc 
installed and don't know yet which packages to install to make it useful. At 
least a reason now to dive into figuring that out :-)

Any idea what to do about the diversion? I bought that FR second hand, and it 
has had this "feature" ever since I got it.

Regards,

Boudewijn


  

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Re : Re: accelerometer calibration

2010-12-25 Thread Timo Juhani Lindfors
"W. B. Kranendonk"  writes:
> Would that mean that (one of) the meter(s) is connected at an angle?
> Are they not calibrated in software?

top and bottom accelerometers are oriented differently anyway.

> Is the accelerometer-dump standalone, and do you have a binary version 
> available? 

http://iki.fi/lindi/openmoko/accelerometer-dump.c



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Re : Re: accelerometer calibration

2010-12-25 Thread W. B. Kranendonk
--- On Sat, 12/25/10, Timo Juhani Lindfors  wrote:
> li...@ginger:~$ accelerometer-dump < event4.log | head |
> cut -d ';' -f2-|tr ';' ' '
> x y z
> 108 36 900
> 144 36 900
> 126 36 900
> li...@ginger:~$ accelerometer-dump <
> /dev/accelerometer-top | head | cut -d ';' -f2-|tr ';' ' '
> x y z
> 36 0 990
> 54 0 972
> 36 0 990
> 36 18 990
> 18 18 1008
> 36 18 990
> If I look at the top accelerometer and lift the bottom of
> the phone a
> little and tilt it to the right I get the same readings as
> you.

Would that mean that (one of) the meter(s) is connected at an angle? Are they 
not calibrated in software? 

Is the accelerometer-dump standalone, and do you have a binary version 
available? 

Thanks so far!

Regards,

Boudewijn


  

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Re : Re: accelerometer calibration

2010-12-25 Thread Timo Juhani Lindfors
"W. B. Kranendonk"  writes:
> See attachment.

li...@ginger:~$ accelerometer-dump < event4.log | head | cut -d ';' -f2-|tr ';' 
' '
x y z
108 36 900
144 36 900
126 36 900
126 36 882
144 36 900
126 36 900
126 18 900
126 36 900
126 36 882
li...@ginger:~$ accelerometer-dump < /dev/accelerometer-top | head | cut -d ';' 
-f2-|tr ';' ' '
x y z
36 0 990
54 0 972
36 0 990
36 18 990
18 18 1008
36 18 990
36 18 1008
36 18 990
36 0 1008
li...@ginger:~$ accelerometer-dump < /dev/accelerometer-bottom | head | cut -d 
';' -f2-|tr ';' ' '
x y z
54 54 972
36 54 954
54 72 972
54 72 954
54 72 972
54 54 972
54 72 954
54 54 972
54 72 972

If I look at the top accelerometer and lift the bottom of the phone a
little and tilt it to the right I get the same readings as you.

-Timo


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Re : Re: accelerometer calibration

2010-12-24 Thread Timo Juhani Lindfors
"W. B. Kranendonk"  writes:
> Is that useful? This is while the FR is lying flat on its back. I
> haven't compared it to output from the other FR yet.

Raw binary output would be a lot easier to parse.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Re : Re: accelerometer calibration

2010-12-24 Thread W. B. Kranendonk

> Le 23 déc. 2010 10:11, Timo Juhani Lindfors  
> a écrit :
> >"W. B. Kranendonk" writes: 
> > > One of my FRs is dizzy: the accelerometers are off. 
> > Can you send a sample of the accelerometer data? (Preferably in
> > the binary format that you can read from /dev/input/) 

> On Thu, 12/23/10, sylvain.p...@gmail.com  wrote:
> With a command line like this :
>   cat /dev/input/event4 | od -c (or -b or -d dont remember and i am
>  not on my laptop)
Thanks for the hint, it would have been my next question I suppose ;-)

I used od -b, which gives octal byte representation: 

0017720  230   ] 022   M 371   H 005  \0 003  \0 001  \0 022  \0  \0  \0
0017740  230   ] 022   M  \0   I 005  \0  \0  \0  \0  \0  \0  \0  \0  \0
0017760  230   ] 022   M 220   m 005  \0 003  \0  \0  \0   ~  \0  \0  \0
002  230   ] 022   M 260   m 005  \0  \0  \0  \0  \0  \0  \0  \0  \0
0020020  230   ] 022   M 035 267 005  \0 003  \0 001  \0   $  \0  \0  \0
0020040  230   ] 022   M   K 267 005  \0  \0  \0  \0  \0  \0  \0  \0  \0
0020060  230   ] 022   M 234  \0 006  \0 003  \0 001  \0 022  \0  \0  \0
0020100  230   ] 022   M 305  \0 006  \0  \0  \0  \0  \0  \0  \0  \0  \0
0020120  230   ] 022   M 234 223 006  \0 003  \0 001  \0   $  \0  \0  \0
0020140  230   ] 022   M 273 223 006  \0 003  \0 002  \0 226 003  \0  \0
0020160  230   ] 022   M 277 223 006  \0  \0  \0  \0  \0  \0  \0  \0  \0
0020200  230   ] 022   M 310 270 006  \0 003  \0 002  \0 204 003  \0  \0
0020220  230   ] 022   M 330 270 006  \0  \0  \0  \0  \0  \0  \0  \0  \0
0020240  230   ] 022   M 231 335 006  \0 003  \0  \0  \0   l  \0  \0  \0
0020260  230   ] 022   M 244 335 006  \0 003  \0 001  \0 022  \0  \0  \0
0020300  230   ] 022   M 254 335 006  \0  \0  \0  \0  \0  \0  \0  \0  \0
0020320  230   ] 022   M 352 001  \a  \0 003  \0  \0  \0   ~  \0  \0  \0
0020340  230   ] 022   M 031 002  \a  \0 003  \0 001  \0   $  \0  \0  \0
0020360  230   ] 022   M 037 002  \a  \0  \0  \0  \0  \0  \0  \0  \0  \0
0020400  230   ] 022   M   4   p  \a  \0 003  \0 001  \0 022  \0  \0  \0
0020420  230   ] 022   M   b   p  \a  \0  \0  \0  \0  \0  \0  \0  \0  \0



Is that useful? This is while the FR is lying flat on its back. I haven't 
compared it to output from the other FR yet.

Best regards,

Boudewijn



  

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re : Re: accelerometer calibration

2010-12-23 Thread sylvain.pare
With a command line like this :cat /dev/input/event4 | od -c (or -b or -d dont remember and i am not on my laptop)Le 23 déc. 2010 10:11, Timo Juhani Lindfors  a écrit : "W. B. Kranendonk"  writes:
> One of my FRs is dizzy: the accelerometers are off. 

Can you send a sample of the accelerometer data? (Preferably in the
binary format that you can read from /dev/input/)





___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community