![]() |
Qt mobility or Maemo bug (regarding accelerometer)
1 Attachment(s)
Hi!
Not sure if this is a bug relating to Qt mobility or Maemo 5 With reading sensor values through mobility and values through "/sys/class/i2c-adapter/i2c-3/3-001d/coord" I've found the Y and Z values to be inverse (apart from other things). Lying the phone face up, it gives me Through Qt Mobility: 0.35, 0.35, 9.5 through reading file: 36, -36, -954 Would this be a maemo bug since according to this page, face up should give a positive z value (http://doc.qt.nokia.com/qtmobility-1.0/sensors-api.html). Additionally why are the values all have different ranges. Qt Mobility on the simulator has -50 to +50, on maemo -10 to +10 while reading the values from that file gives -1000 to +1000. Would other phone models behave similarly (eg would the N8 or N9 have the same ranges as maemo or closer to the simulator)? I've attached the project i used to test it. |
Re: Qt mobility or Maemo bug (regarding accelerometer)
Qt is an abstraction layer between the hardware and you app, the file is basically the raw data. So you'd expect them to be different. Qt Mobility is supposed to provide you with a unified interface to the accel data no matter what platform (symbian, maemo, etc). The ranges are as they are, becuase sysfs is generally full of integers, I'm guessing those are 100th/s of a G, where as Qt mobility is probably scaling it to a real value with a bit more friendly meaning for app devs (which should be unified across platforms).
|
Re: Qt mobility or Maemo bug (regarding accelerometer)
Quote:
|
Re: Qt mobility or Maemo bug (regarding accelerometer)
Quote:
|
Re: Qt mobility or Maemo bug (regarding accelerometer)
Makes sense. I just would have assumed it would try to make it more uniform across platforms to ease in development. Guess to port to another platform you'd have to change the maths slightly.
I guess it also answers why the values are inverse, as Qt would probably try to make all phones face up have positive Z values no matter how their accelerometer is placed inside. thanks :D |
Re: Qt mobility or Maemo bug (regarding accelerometer)
Quote:
|
Re: Qt mobility or Maemo bug (regarding accelerometer)
Quote:
Also I guess the simulator would need to have the limits changed. |
Re: Qt mobility or Maemo bug (regarding accelerometer)
Quote:
The simulator is fine, I'm sure it's possible that some accels can measure 5G |
Re: Qt mobility or Maemo bug (regarding accelerometer)
Quote:
|
All times are GMT. The time now is 16:38. |
vBulletin® Version 3.8.8