For what it's worth, it might be useful to clarify whether you are working on a something that is intended to be shipped as a production device, or porting to some existing hardware. If the latter, I'd say just report whatever sensors you have and that is fine.
If you are working on a device that will be shipped as a production unit to users, though, at this point I would very strongly encourage you to do what you can to report sensor information equivalent to the G1. This is required to be an Android compatible platform, and though that may change in the future, I couldn't tell you when. (At the very least it would require platform work for apps to declare what kinds of sensors they need so we can detect when an app isn't compatible with a particular piece of hardware.) On Fri, Jan 9, 2009 at 5:31 AM, Sean McNeil <[email protected]> wrote: > > What you are trying to do cannot be done. Accelerometers give you a > vector to GC whereas the G1 has a compass which gives you yaw/pitch/roll > to north. > > 伊泽 wrote: > > hi pramod gurav, > > > > I think we have the same problem,the lis302/lis331 sensor cannot provide > > yaw/pitch/roll data while we feel hard to emulate G1's compass feature. > > > > But I thought there would be some method to emulate that,,,we get the > > x/y/z > > and change them to yaw/pitch/roll through a model... > > > > hmm,,that's not easy,i think. > > > > thanks > > --wxc200 > > > > > > > > ============ > > 自由之精神,独立之人格 > > ============ > > Zsa Zsa Gabor - "I'm a great housekeeper. I get divorced. I keep the > > house." > > > > On Fri, Jan 9, 2009 at 6:59 PM, pramod gurav <[email protected] > > <mailto:[email protected]>> wrote: > > > > On Fri, Jan 9, 2009 at 3:27 PM, 伊泽 <[email protected] > > <mailto:[email protected]>> wrote: > > > hi > > > > > > why not port your driver to android? > > > That would not be too hard. G1 has a compass and > > > gravity accelerometer sensor,it can detect pitch/roll/rotation > > and motion. > > > Also Iphone ,Borqs and Openmoko has the LIS3XX chip as their > sensor. > > > this is openmoko's: Accelerometer data retrieval > > > But lis3xx sensor is a gravity accelerometer sensor,it has > > > not function as G1's compass,when you put phone on the flat > > table ,it cannot > > > detect rotation. > > > > > > Ofcourse,you should choose your sensor depend on the app design. > > > > > > thanks > > > --wxc200 > > > > > > > > Hi I have ported the drivers according to android. > > The sensors on my h/w are ak8973(magnetic x,y,z) and lis302dl(acc > > x,y,z). > > They do not give the yaw, pitch roll. > > I could get the values on my android application. > > But cant get the yaw, pitch and roll. I was expecting that Android > can > > calibrate > > these values as my h/w have no support. > > > > > > > > > ============ > > > 自由之精神,独立之人格 > > > ============ > > > Joan Crawford - "I, Joan Crawford, I believe in the dollar. > > Everything I > > > earn, I spend." > > > > > > On Fri, Jan 9, 2009 at 3:26 PM, Mathias Agopian > > <[email protected] <mailto:[email protected]>> > > > wrote: > > >> > > >> Hi, > > >> > > >> Android doesn't "require" yaw / pitch / roll per se. In theory, > > well > > >> written applications should check for the presence of these > > sensors. > > >> Unfortunately, in Android 1.0 there wasn't an easy way to > > integrate a > > >> new sensor h/w. > > >> > > >> I think it is more sane to target the "cupcake" release of > Android, > > >> which a work in progress is available in the main git repository. > > >> > > >> Future (cupcake) applications will be able to use the > SensorManager > > >> to calculate the yaw / pitch / roll from the acceleration and > > magnetic > > >> data (this is actually more precise than the data coming out of > the > > >> driver!). Additionnaly, there is a HAL module to implement your > > sensor > > >> h/w which describes precisely what is expected from the higher > > layers > > >> (see sensors.h). > > >> > > >> A sensor h/w can expose yaw/pitch/roll if it wants to, but is not > > >> technically required; the framework will expose a "fake" > > >> yaw/pitch/roll sensors if one is not published by the sensor > > HAL and > > >> if Acceleration and Magnetic data are available. > > >> > > >> Note that the definition of the axis at the h/w level have changed > > >> between 1.0 and cupcake, so be sure to read carefully the > > >> documentation in sensors.h. > > >> > > >> > > >> Android doesn't do ANY calibration on its own. The drivers > > and/or HAL > > >> modules are expected to do this. > > >> > > >> > > >> In "theory", all you need to do is implement a sensor HAL module > > >> properly (as documented in sensors.h. pay extreme attention to the > > >> definition of the axis and units). Unfortunately, in the > > current git > > >> repository there are no sample code of a sensor HAL module, which > > >> makes this task more difficult; however we will fix this > > problem soon > > >> by including the G1 HAL module source code, stay tuned. > > >> > > >> I hope this helps. > > >> > > >> Mathias > > >> > > >> > > >> On Thu, Jan 8, 2009 at 9:45 PM, pramod gurav > > <[email protected] <mailto:[email protected]>> > > >> wrote: > > >> > > > >> > Hi All, > > >> > I am trying to integrate my compass and accelerometer sensors > > into > > >> > android. > > >> > These are two different sensors which support only providing > > magnetic > > >> > x, y, z and > > >> > acceleration in x, y and z direction. As I gone through the > > HAL layer > > >> > of android I > > >> > could know that android expects yaw, pitch, row also from the > > under > > >> > lying driver. > > >> > I just wanted to conform this as the sensors we are using > > does not > > >> > give any values > > >> > other than above mentioned. > > >> > I would also like to know whether android does any > > calibration on its > > >> > own to get these > > >> > values in case these are not supported by hardware. > > >> > Please let me know if I need to provide more details regarding > my > > >> > sensors. > > >> > > > >> > > > >> > -- > > >> > Best Regards > > >> > Pramod > > >> > > > >> > > > > >> > > > >> > > >> > > > > > > > > > > > > > > > > > > > > > -- > > Best Regards > > Pramod > > > > > > > > > > > > > > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
