jeromeetienne / AR.js

Efficient Augmented Reality for the Web - 60fps on mobile!
MIT License
15.78k stars 2.22k forks source link

Location-Based Algo: Tests for Relative vs Absolute Heading? #665

Closed evaristoc closed 4 years ago

evaristoc commented 4 years ago

Describe the bug There is a chance for the current location-based implementation not to be universal. According to this reference, the orientation algorithm of some devices might be based on a frame of reference that is not absolute to Earth's North, but rather to the position of the device by the time the page opens (relative reference).

So far there is no evidence that the error is present and when. This issue is to explore that the current solution is generalizable.

Expected behavior

  1. "For every device it is possible to get a reference to the Earth's North; geolocation of marks are correct for every device".
  2. "If not, a list of non-working devices should be on hand. When required, please share any solution you might know".

Screenshots Please check the aforementioned reference for more information.

To Reproduce

We can start by using the test suggested in the reference, checking the outcome, and then seeing if that might explain what it is observed from opening @nicolocarpignoli examples. A detailed procedure could be as following:

  1. Test for Relative vs Absolute heading using the following link: http://www.grantholtes.com/compass.html (see the aforementioned reference for details) Take note of the result.

  2. Whatever the result, test one of the examples below as given by @nicolocarpignoli at the original repository of the location-based component:

  3. See if the expected result from activty 1 matches what it is seen from activty 2.

  4. In case of results not being as expected by point 1 of EXPECTED BEHAVIOUR, please report? We would interested in the following: Smartphone (please complete the following information):

    • Device: [e.g. iPhone6]
    • OS: [e.g. iOS8.1]
    • Browser [e.g. stock browser, safari]
    • Version [e.g. 22] Additional context Add any other context about the problem here.

NOTE Based on this discussion: https://github.com/jeromeetienne/AR.js/issues/663#issuecomment-560033972, #663

evaristoc commented 4 years ago

@nicolocarpignoli

  1. Test for Relative vs Absolute heading: RELATIVE; also the North indicator moves while testing heading and its position changes even more drastically after rotating device relative to ground
  2. Basic Example: locations don't stay in place and are wrongly located, even under high accuracy
  3. Not expected behaviour: Wrong geolocation; North indicator moves widely
  4. Samsung 7/8; Android; [Samsung Internet, Chrome]; last versions to date

Tested outdoors, directly connected to provider (no wifi). Google Maps won't affect behaviour.

evaristoc commented 4 years ago

The following seems to be the implementation suggested for the existing project:

Are these references to be taken in consideration in order to work around a solution to this issue (in case more tests show it is actually an issue...)?:

Other relevant references:

evaristoc commented 4 years ago

My TESTS:

Comparing Properties and Algos for True North for Device's Attitude

Stability

evaristoc commented 4 years ago

Although I will still check some aspects of this issue, I am turning it into a Closed Issue.

Some aspects of my tests were already worked on in a different project. That project didn't solve the inaccuracies faced with the Location-Based AR.JS, despite of being an improved version. Going further with my tests might "not be like raining but pouring".