Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Compass Functionality in Consumer Version - Workarounds for Developer Version?

CODE

if UNITY_UWP

    var compass = Windows.Devices.Sensors.Compass.GetDefault();

    Debug.Log(compass == null ? "Compass is Null." : "Compass is not null.");

    var mag = Windows.Devices.Sensors.Magnetometer.GetDefault();

    Debug.Log(mag == null ? "Magnetometer is null" : "Magnetometer is not null");

RESULT

Compass is Null.

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: 45)

Magnetometer is null

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/UnityEngineDebugBindings.gen.cpp Line: :smile:

--------------------------:smile:
I didn't see a magnetometer that I remember from the Hardware descriptions, so I don't expect this UWP code will work in a future flight....can HoloLens confirm whether Microsoft is considering including a compass on the consumer version?

Seems like extra way to disambiguate similar scenes and to make it easy for developers to label anchors based on general cardinal directions.


Does anybody have a method for inferring compass directions indirectly on the hololens today? (Time of day and direction of the sun through windows during the day? - Old school? :) Some sort of wifi triangulation?

Best Answer

Answers

  • Options

    yes, probably have to do. This nice to have for my purposes so probably ignore it for now to avoid more complexity.

  • Options

    Oh, part of it was also curiosity...when learning about the self-driving car, part of the reliability came from having independent sources for SLAM, e.g. LIDAR and vision cameras...it would seem like having another evidence stream would help increase the reliability of mapping or reduce lost tracking when there are changes to the environment or ambiguity. E.g. take the case of a square room, with nothing on the walls or floors (and somehow doors in the exact same places for this thought experiment). However identical visually, a compass could disambiguate the situation.

  • Options

    @holovr said:
    why not just do the compass part on a phone?

    How to get the data from a phone compass to one's Hololens app?

  • Options
    holovrholovr ✭✭

    @grommit said:

    @holovr said:
    why not just do the compass part on a phone?

    How to get the data from a phone compass to one's Hololens app?

    use something like websockets

Sign In or Register to comment.