locked
Surface RT Shows HeadingMagneticNorth but not HeadingTrueNorth

    Question

  • I'm running the Windows 8 SDK example that reads the Surface RT compass. I get the HeadingMagneticNorth property value but never the HeadingTrueNorth.

    Is there something I need to switch on to fix this?


    Ken Cox - Microsoft MVP [ASP.NET]

    Monday, February 11, 2013 11:00 PM

Answers

  • Ken,

    Surface RT does not support HeadingTrueNorth, hence the null values.  However, if you need a True North heading, you can derive it from Magnetic North based on the declination, which is basically a lookup according to your current latitude and longitude.  http://www.ngdc.noaa.gov/geomag/declination.shtml

    Regards,

    lisa

    • Marked as answer by Cox, Ken Tuesday, February 12, 2013 2:37 PM
    Tuesday, February 12, 2013 6:39 AM

All replies

  • Hi Ken COx,

    I think it's because the sensor is not providing the HeadingTrueNorth value.

    You can see HeadingMagneticNorth is double and HeadingTrueNorth is Nullable<double>, which indicates HeadingTrueNorth is an optional value for the sensor. Your application should rely on HeadingMagneticNorth and use HeadingTrueNorth only if the sensor support it.

    Best regards,


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 12, 2013 1:08 AM
    Moderator
  • It's obvious that the sensor isn't providing the HeadingTrueNorth.

    How do I determine if a Surface RT is capable of providing a HeadingTrueNorth value?


    Ken Cox - Microsoft MVP [ASP.NET]

    Tuesday, February 12, 2013 1:35 AM
  • Ken,

    Surface RT does not support HeadingTrueNorth, hence the null values.  However, if you need a True North heading, you can derive it from Magnetic North based on the declination, which is basically a lookup according to your current latitude and longitude.  http://www.ngdc.noaa.gov/geomag/declination.shtml

    Regards,

    lisa

    • Marked as answer by Cox, Ken Tuesday, February 12, 2013 2:37 PM
    Tuesday, February 12, 2013 6:39 AM