×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    2

    Magnetometer issue

    Hi,

    I am writing an application for WP7 utilizing the compass sensor. And there is a problem with the raw magnetometer reading vector. In HTC I get such a vector that when taken its length I get magnetic field intensity in micro Teslas. Recently I have got a Nokia Lumia 800 and it shows the magnetometer readings vector as a scaled vector with values from -1 to +1.
    The question is how it is scaled or how to make it working as it is in HTC?

    Regards,
    Marcin

  2. #2
    Registered User
    Join Date
    Nov 2010
    Posts
    10

    Re: Magnetometer issue

    Hello Marcin,

    The easiest way is to make your own calibration routine that determines all maximum value's of the axis.
    (the Y as reading is the max when X and Z are close to zero, etc, etc)
    In both cases for Nokia (Lumia) and HTC you could then normalize the X, Y and Z max reading to your own preference.
    Using your own normalization; the post calculation code and displaying could be made the same for all WP7 phones.

    regards,

    Kangaderoo

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    926

    Re: Magnetometer issue

    Quote Originally Posted by marcin.kukielka View Post
    Hi,

    I am writing an application for WP7 utilizing the compass sensor. And there is a problem with the raw magnetometer reading vector. In HTC I get such a vector that when taken its length I get magnetic field intensity in micro Teslas. Recently I have got a Nokia Lumia 800 and it shows the magnetometer readings vector as a scaled vector with values from -1 to +1.
    The question is how it is scaled or how to make it working as it is in HTC?

    Regards,
    Marcin
    I'm way over my head here because I never did anything with those sensors for Windows Phone. The first thing I would like to ask you is that if the HTC you'r using is a Windows Phone Device? I was under the impression that when it comes to sensor data, the raw information that reaches you thought the API is the same on any Windows Phone device. Can you confirm this?

    I'm not sure if this helps but I found a few articles after reading your post that may be of use. You probably already stumbled on them but here it is anyway:

    http://msdn.microsoft.com/en-us/libr...=vs.92%29.aspx

    And specially this one:

    http://blog.falafel.com/blogs/11-11-...NA_Silverlight

  4. #4
    Registered User
    Join Date
    Apr 2012
    Posts
    2

    Re: Magnetometer issue

    Hi,

    Firstly, thanks for help, I really appreciate it.
    Kangaredoo, in fact it could be some solution. Anyway, the main problem is that I will have to check all the available phones to get universal solution. I'd rather get a scale notation or an other way to do achieve universal data. But it's a good start point.
    Joaocardoso, yes it is a WP device. The problem comes when reading raw data from sensor. In HTC (and LG - I tried two days ago) it's different than in Lumia (using the same OS version). It's weird that it is not standarized... Thanks for articles but I have already read almost the whole Internet

    Regards,
    Marcin

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    926

    Re: Magnetometer issue

    Quote Originally Posted by marcin.kukielka View Post
    Joaocardoso, yes it is a WP device. The problem comes when reading raw data from sensor. In HTC (and LG - I tried two days ago) it's different than in Lumia (using the same OS version). It's weird that it is not standarized... Thanks for articles but I have already read almost the whole Internet

    Regards,
    Marcin
    Sorry it didnt helped. Would love to know more about this if you figure it out Do share with us your findings.

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    926

    Re: Magnetometer issue

    Quote Originally Posted by joaocardoso View Post
    Sorry it didnt helped. Would love to know more about this if you figure it out Do share with us your findings.
    Today I found a connect issue that was submited by someone else regarding the Magnetometer. Take a look at it may also be important for your project:
    https://connect.microsoft.com/Visual...-reading-error

  7. #7
    Registered User
    Join Date
    May 2012
    Posts
    2

    Re: Magnetometer issue

    This is not the only problem with the Lumia sensors, as I posted here: http://www.developer.nokia.com/Commu...n-in-Lumia-900

  8. #8
    Nokia Developer Champion
    Join Date
    Aug 2008
    Location
    Vadodara, India.
    Posts
    910

    Re: Magnetometer issue

    did you try diagnostic tools to get more details on sensor reading in Lumia 800?

    To access the tools in Lumia, simply enter "##634#" on the call screen and it'll load up. There you can see readings of Magnetometer.

    I also found a related magnetometer issue thread on General Dibo for End User. Please read thread if it can give you more details if the problem is same.
    http://discussions.europe.nokia.com/...m/td-p/1265483

    But if you are facing issue in your app that you have developed then you should follow this link as joaocardoso suggested.
    http://msdn.microsoft.com/en-us/libr...(v=vs.92).aspx
    Nokia Developer Wiki Moderation team
    World's Greatest Speeches for Windows Phone is now available on WP Marketplace.

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    926

    Re: Magnetometer issue

    Quote Originally Posted by chintandave_er View Post
    But if you are facing issue in your app that you have developed then you should follow this link as joaocardoso suggested.
    http://msdn.microsoft.com/en-us/libr...(v=vs.92).aspx
    Also I would recommend to share the link with anyone that cares about this issue, because the more people vote for this connect entry, the more MS will care about it also

Similar Threads

  1. Magnetometer data
    By torsak1 in forum General Development Questions
    Replies: 13
    Last Post: 2012-06-12, 19:01
  2. How to calibrate magnetometer?
    By smitis in forum [Archived] Qt Mobility Project
    Replies: 1
    Last Post: 2011-12-08, 15:39
  3. Magnetometer how to use it?
    By Tiger54 in forum [Archived] Qt Mobility Project
    Replies: 0
    Last Post: 2011-06-17, 10:24
  4. Magnetometer
    By drindt in forum Mobile Java General
    Replies: 2
    Last Post: 2010-05-13, 07:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×