Hi, On Tuesday 05 February 2013 11:33:29 Paul Olav Tvete wrote: > One of the major features for Qt 5.1 is Android support. We have been > doing the work in a feature branch, and are now getting ready to > integrate to the dev branch. To beat the rush of integrations before > feature freeze, we aim to start the integration in two weeks time. > > Most of the changes are android-specific, but there are a few changes > touching cross-platform code. To make the integration go smootly, we ask > approvers and maintainers to check the android changes in their areas now, > so we can fix any problems before the merge. To see the changes, check out > (or diff against) the "wip/android" branch. > > I have appended a list of changed files for the following repositories: > qtsensors
I had a very quick look at QtSensors, and there are some inconsistency with units. For example, according to https://developer.android.com/reference/android/hardware/SensorEvent.html#values, the Android API reports magnetic field values in microteslas, whereas the units of QMagnetometerReading are teslas. There doesn't seem to be a conversion in AndroidMagnetometer::onSensorChanged(), so the reported units in QtSensors will be off by a factor of 1000. This should be fixed for several reasons, like portability, documentation being wrong and to have proper functioning sensor gestures, which rely on correct units. I'd advise you to check the other sensors as well, there is no conversion anywhere, that seems too easy to be true to me. Also, please double-check if the axes are correct. Many sensors like the accelerometer have a x, y and z axis. Do these have the same coordinate system as in QtSensors? Do these have the same angle representation (radians vs degrees)? Also, my most beloved sensor, the rotation sensor, uses euler angles (Tait– Bryan, to be exact, IIRC). For euler angles, the order or rotation matters(!). Is that the same in Android? is the unit range the same (for example QRotationReading's y goes from -180 to +180, whereas x goes from -90 to 90)? For the Blackberry backend, I had to convert from the OS sensor service's Z- Y'-X'' system to QtSensor's Z-X'-Y'' system, for example. The documentation of the reading classes in Qt, for example QRotationReading, have quite informative pictures, and in the case of QRotationReading, are even animated, to understand things better. This needs testing. I tested by waving/rotating my phone around (to the amusement of the rest of the office) and comparing the reading values to what the documentation tells they should be. Regards, Thomas -- Thomas McGuire | thomas.mcgu...@kdab.com | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-independent software solutions
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development