Addressing issue #70: Version of gps-camera and gps-entity-place using Spherical Mercator p… #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…rojection
What kind of change does this PR introduce?
New components 'gps-projected-camera' and 'gps-projected-entity-place', which use Spherical Mercator projection to calculate the world coordinates of the current GPS location and entity-places relative to the original position.
Can it be referenced to an Issue? If so what is the issue # ?
#70
How can we test it?
Example app at
https://hikar.org/webapp/ (for in-field testing, works throughout Europe and Turkey but data not available elsewhere)
or, use a simulated location to view the gps-projected-entity-places:
https://hikar.org/webapp/?lat=51.049&lon=-0.723
(please disable GPS or test on non-mobile device).
If you look round you can see two nearby entity-places as a-boxes (please View Source for the HTML code) along with road and path data from OpenStreetMap rendered using the gps-projected-camera. See https://github.com/nickw1/hikar.org for source code of this project.
Summary
My use-case for using AR.js is to render OpenStreetMap 'ways' (footpaths, roads) as augmented content, to use in an AR navigation app for hikers. It is simpler in this use-case, due to the larger volume and complexity of data, just to project the whole lot into a metre-based coordinate system (Spherical Mercator) and also project the origin and current GPS position into Spherical Mercator. The projected coordinates can then be used as the basis for the WebGL world coordinates.
Does this PR introduce a breaking change?
No - as original gps-camera and gps-entity-place components are left untouched.
Please TEST your PR before proposing it. Specify here what device you have used for tests, version of OS and version of Browser
In-the-field testing of AR roads and paths: Pixel 3, running Chrome (latest)
Simulated location on a desktop, to test the gps-projected-entity-places: Firefox 74, Linux (Ubuntu 18.04 LTS)
Other information