That actually sounds like it is working properly.

On the G1 accelerometer, (and all other HTC devices), the positive Z
axis is face up, the positive X axis is from the center of the screen
to the right, and the positive y axis is from the center of the screen
to the mouthpiece.

Hence, if you are pointing the display with the earpiece to the north,
I would expect to see a negative Y value.

I actually wrote a Sensor API for the Windows Mobile line of phones,
and one of the things I needed to do with the HTC implementation of
their sensor vector was to reverse the Y axis so that positive Y
points is in the direction of the earpiece.

http://www.koushikdutta.com/2008/07/using-htc-touch-diamond-sensor-sdk-from.html


On Dec 3, 7:05 am, Jean-Baptiste Queru <[EMAIL PROTECTED]> wrote:
> There are quite a few significant issues with the sensor API as it
> currently exists in the G1, where many aspects were too loosely
> defined, and where there are a few bugs.
>
> A later version of the Android API is expected to resolve those issues
> (and to provide backward-compatibility with the current API).
>
> At this point your best bet is to modify your code based on what you
> see on the device until it does what you expect. I realize that's a
> sad recommendation, but it's pretty much the only realistic one.
>
> JBQ
>
> On Wed, Dec 3, 2008 at 7:00 AM, Ian <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to make sense of the SENSOR_MAGNETIC_FIELD sensor values on
> > the G1 phone.  It looks to me like the X and Y values are pointing to
> > magnetic south, while the Z value is pointing north.  In other words,
> > if I hold the phone with the earpiece end pointing north, I get a
> > negative Y value; if I hold it with the face of the display pointing
> > north, I get a positive Z value.
>
> > Looking at the accelerometer X, Y and Z values, they behave as I
> > expect.
>
> > Is anyone else seeing this, or am I missing something?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to