16

I'm exploring the new ARKit.

Currently all the examples I've seen use the "relative" position of the camera to place objects onto the scene around the origin.

Suppose I have absolute real-world GPS coordinates that I'd like to place as markers in to the scene. How would I go about doing that?

There are some demos and examples starting to pop up that actually do this, but I haven't seen any code or explanation so far.

ARKit on iOS 11 + CoreLocation Demo — GPS with virtual guidance

Any examples would be greatly appreciated.

kernelpanic
  • 2,876
  • 3
  • 34
  • 58
  • You probably need to convert those gps coordinates to relative coordinates. Core Location can get you heading and geolocation. Then you can place your objects relative your user’s location. – Moshe Jul 24 '17 at 08:49
  • 1
    I've seen that video too. The compass, gyroscope and and gps on a iphone are not that smooth. gps on iphone uses local wifi hotspot locations first. I made an app that logged my route home. On a map it bounced all over the place. have a look at any augmented reality from ios7 onwards the map pins floating in the air wobble all over the place. the demo might work if he knew the exact gps of the building hes standing on. and he knew the o2 arena was exact 200 meters at 180 degree. Then hes not using the compass so might get that smooth effect. its fine until he moves to another building. – brian.clear Jul 24 '17 at 13:06
  • @brian.clear the author promised to put it on GitHub, and with 42 stars today it is still empty and we're still waiting :) https://github.com/ProjectDent/ARKit-CoreLocation – kernelpanic Jul 24 '17 at 14:10
  • yes should be interesting to see how he did it. https://twitter.com/AndrewProjDent/status/886916872683343872/video/1 microsoft have a new app that tries to solve the same problem on android but it uses wifi info which ios dev dont have access to. https://play.google.com/store/apps/details?id=com.microsoft.msra.followus.app&hl=en – brian.clear Jul 24 '17 at 14:16
  • Is there any way that I can save ARKit node position in latitude and logitude. So later I can show on map. – Rajesh Maurya Mar 14 '18 at 15:00
  • @Rajesh Do you get any solution to save ARKit node position in latitude and longitude? Is it possible? – BSB Jun 11 '19 at 05:26
  • @Bhakti I completely followed the below the answer. And it works. – Rajesh Maurya Jun 11 '19 at 12:05

1 Answers1

14

Ok, so a few days later the author of that video released the source on GitHub and it available to everyone to enjoy. There are some things to sort out, such as true north position, but it's a good start

kernelpanic
  • 2,876
  • 3
  • 34
  • 58
  • 2
    Is there any way to convert the ARKit node position to latitude and longitude? Need to show the ARKit placed objects in real world on map. We can use the location of the device and calculate the coordinates, but it's not accurate. Any help Thanks. – Raju Nov 22 '18 at 11:00
  • Did you made any progress regarding the true north calibration? I tried the sample with my own location but they aren't precise at all. I'm guessing because the calibration issue. – Macaret Jun 21 '19 at 14:21
  • How did you’ll get the AR navigation to work? From what I understand you use the coordinates from the MapKit API but how exactly would u do that? I can’t find any sample code on that – Junaid Jan 12 '20 at 18:56