locked
Getting raw readings from Compass

Answers

  • That is correct, you cannot get the raw readings from the magnetometer from a metro application.  We did not have a scenario where the raw magnetometer data would be necessary.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, August 14, 2012 8:05 PM

All replies

  • The magnetometer is not exposed through the WinRT interface.  You can access it through the Sensor API:  http://msdn.microsoft.com/en-us/library/windows/desktop/dd318953(v=vs.85).aspx

    Why do you need to access the magnetometer?


    This posting is provided "AS IS" with no warranties, and confers no rights.

    • Marked as answer by A. Sham Wednesday, August 08, 2012 9:33 PM
    • Unmarked as answer by A. Sham Tuesday, August 14, 2012 5:16 PM
    Wednesday, August 08, 2012 7:43 PM
  • It looks like sensor manager (CLSID_SensorManager) is if-def out with WINAPI_PARTITION_DESKTOP on metro apps, is there any other way to interact with the sensors without using sensor manager?

    thanks!

    Tuesday, August 14, 2012 5:16 PM
  • You cannot use the Win32 Sensor API from a metro application.  You can only access it from a desktop application.


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, August 14, 2012 5:43 PM
  • Does that mean there's no way for me to get raw readings from the magnetometer? if so, is there a reason why the raw reading isn't part of the WinRT compass API?
    Tuesday, August 14, 2012 6:46 PM
  • That is correct, you cannot get the raw readings from the magnetometer from a metro application.  We did not have a scenario where the raw magnetometer data would be necessary.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, August 14, 2012 8:05 PM