16
votes

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.

1
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
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
@brian.clear the author promised to put it on GitHub, and with 42 stars today it is still empty and we're still waiting :) github.com/ProjectDent/ARKit-CoreLocationkernelpanic
yes should be interesting to see how he did it. 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. play.google.com/store/apps/…brian.clear
Is there any way that I can save ARKit node position in latitude and logitude. So later I can show on map.Rajesh Maurya

1 Answers

13
votes

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