Thanks R.S.  I think you are talking about the special case. But for
the time being, I feel this doesn't need to be considered that much.
so may I know exactly the physics formulas (or other methods) that can
be used to calculate yaw,pitch and roll solely based on the data given
by the magnetometer.

Yeah, you mentioned to combine the mag readings with other sensors and
to use the APIs in Android. Actually, this is just the reason why I
brought this question up. I have seen the APIs that actually calculate
yaw,pitch and roll by the mag AND the accelerometer. From my
experiments, I found that yaw,pitch and roll were strongly affected by
the acceleration, for example, if you move the phone horizontally with
a very big acceleration, the screen orientation is probably changed,
meaning the yaw,pitch and roll changes much as the accelerations
change.

This is why I want to see if I can use the mag alone to get the
orientation(yaw, pitch, roll) so that the orientation readings are
independent on the accelerations.


Thank you very much.

On Oct 12, 7:22 pm, RS <rajeshs...@gmail.com> wrote:
> DD, there are a few special cases that won't work:
>
> If mag a sensor's first axis (say x) is already pointing mag north
> exactly, the mag components on the other two axis (say y,z) would be
> zero.
>
> here your x axis is not just towards north but is exactly tangential
> to one of the field lines connecting south-north.
>
> The Earth and hence the mag field *curves* being too large in
> comparison to the tiny sensor, this x axis is essentially parallel to
> the local field *line* and not just tangential at a point.
>
> While you continue to point the x axis to mag north if you try to
> cause a roll alone (around the x axis here), the readings won't change
> in any way. Also, the y,z components would continue to remain zero.
>
> Combine it with another sensor and you are in luck. Android does these
> internally already. Further there are APIs available to remap
> coordinates, get rotation matrices etc.
>
> You'll have to read the sensor related stuff on d.android.com for
> that.
>
> Cheers,
> R.S
>
> On Oct 12, 10:25 am, DD <daviddiaofri...@gmail.com> wrote:
>
>
>
> > Hi, is it possible to calculate yaw,pitch,roll solely from x,y,z
> > magnetic field values obtained from the magnetometer, for example,
> > according to physics? How? Thanks a lot!- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to