Yes. There is dedicated APIs to track compass data. You can use Compass class, register ReadingChanged event, and retrieve specific data dynamically.
See also Retrieving compass data in complex applications (Windows Store apps) for more details.
Robin [MSFT] 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.