Hi, Great, that was fast! Looking forward to see the results of the test and, hopefully, get something to test integration!
> I still have to read all these links Then yet another, better than the other 5: from link [3], click on "resources" tab (goes to http://www.pololu.com/catalog/product/1250/resources ). Second link in "resources" gives the math and geometry too. There is link on mbed Library for the LSM303DLH Thanks, Mayeul Le lundi 19 mars 2012 à 22:29 +0100, Christoph Mair a écrit : > Hi, > > On Mon, Mar 19, 2012 at 1:44 PM, <[email protected]> wrote: > > Hi, > > Thanks Christoph. Comments below: > >> There exists a simple hack that reads the raw > >> acceleration values from the chip and delivers them to userspace using > >> a sysfs file > > > > I've read [0] but could not find it description of this hack. Any pointer > > and sample strings? > > I attached a patch to get some values from the BMA180 accelerometer. > It should apply to the 3.2-gta04 tree. I have not tested it lately, so > it may just fail. When my flat battery is recharged I can test it too. > > > The LSM303DLH combines both 3D compass and accelerometer, so is the > > HMC5883L usefull for this application? > > We planned to use the LSM303DLH but we could not buy it in time. > Therefore we had to find a replacement. The BMA180 and the HMC5883l > have better specs than the LSM303 so the replacement should bring us a > slight improvement in accuracy. > > > So one idea is to put some tilt logic in the code here: > > http://gitorious.org/vala-compass/vala-compass/trees/master/src > > Or write a piece of code that takes the raw data and output tilt-corrected > > magnetic heading. > > I found out some math and code (for Arduino) that could be re-used. Most > > interesting are [3] to [5]: > > > > > > [1] Has nice geometric discussion and code, but cannot correct for tilt > > over 40 degrees. Saysthere are other (more complex) algorithms for tilt > > > 40°. > > [2] Give some pointers to scientific articles, including I believe for 360 > > degrees correction. > > Note that typical use is keeping the device vertical, so code in [1] is not > > OK > > [3] Discusses the LSM303DLH chip included in the GTA04, and gives 2 links > > for code computing the tilt-corrected heading: > > [4] Arduino code for LSM303DLH > > [5] In "Ressources" tab: "library for the ARM mbed development board that > > interfaces with the LSM303DLH 3D compass and accelerometer carrier and > > provides the tilt-compensated magnetic heading" > > > > Isn't [5] the closest to what would be needed? Could it serve as a basis? > > This sound very promising. I still have to read all these links > (hopefully tomorrow) but the last one is probably what you need. > > Christoph > _______________________________________________ > Gta04-owner mailing list > [email protected] > http://lists.goldelico.com/mailman/listinfo/gta04-owner _______________________________________________ Openmoko community mailing list [email protected] http://lists.openmoko.org/mailman/listinfo/community

