IOS augmented reality with compass and location

I'm trying to develop a mini "Around Me", for example, with a camera, compass and location. I would like to display place images on my screen. At the moment I have my location and my orientation with a compass. I would like to know how to determine the position of the place I want to display.

Thanks for your help;)

+6
source share
4 answers

Once you have the relative distance and bearing that you can determine from two points in the same coordinate space using the algorithms found on this page , figuring out where the known coordinate refers to the known point of view is basically a perspective projection , math is described on this Wikipedia article . The rotation of the camera is set by the compass, and the tilt by the accelerometer (position, of course, GPS).

I am trying to find a better document - there are a few additional things to consider - for example, camera settings, etc., but this is a good starting point.

If this is too important (for example, if it’s not convenient for you with rotation matrices), we can break it down to a simple trigger.

+6
source

The code in the iPhone ARKit project does this and quite a bit. Although you may not be able to use their complete library, this is a great reference to the topic of Augmented Reality.

+1
source

Take a look at 3DAR, it makes it easy to add an AR view to MKMapView. There is a video tutorial on this process, as well as sample code on the 3DAR website, www.3dar.us

0
source

You can create a location-based AR app in Junaio . This is the AR browser. Free to use and deploy (while this is not a regular application in Junaio).

0
source

Source: https://habr.com/ru/post/891455/


All Articles