Skip to content

Conversation

@nickw1
Copy link
Collaborator

@nickw1 nickw1 commented Apr 3, 2020

…rojection

⚠️ All PRs have to be done versus 'dev' branch, so be aware of that, or we'll close your issue ⚠️

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

@nicolocarpignoli
Copy link
Member

@nickw1

I will first merge this, on dev, so I can test it better on my machine.
I will ask you to add some documentation/more stuff on the issue. Thank you in the meantime! Will quote you on the issue for more :)

Great work indeed!

@nicolocarpignoli nicolocarpignoli merged commit 450580b into AR-js-org:dev Apr 9, 2020
@nickw1 nickw1 deleted the dev branch April 9, 2020 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants