[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6823":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":33,"discoverSource":34},6823,"ARKit-CoreLocation","AndrewHartAR\u002FARKit-CoreLocation","AndrewHartAR","Combines the high accuracy of AR with the scale of GPS data.",null,"Swift",5525,727,188,37,0,2,6,1,39.59,"MIT License",false,"develop",true,[25,26,27,28,29],"arkit","augmented-reality","corelocation","gps-data","north-calibration","2026-06-12 02:01:30","![ARKit + CoreLocation](https:\u002F\u002Fgithub.com\u002FProjectDent\u002FARKit-CoreLocation\u002Fblob\u002Fmaster\u002Farkit.png)\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Ftravis-ci.org\u002FProjectDent\u002FARKit-CoreLocation\">\n        \u003Cimg src=\"https:\u002F\u002Ftravis-ci.org\u002FProjectDent\u002FARKit-CoreLocation.svg?branch=develop\" alt=\"CI Status\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FProjectDent\u002FARKit-CoreLocation.svg\"\n             alt=\"MIT License\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcocoapods.org\u002Fpods\u002FARCL\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FARCL.svg?style=flat\"\n             alt=\"Pods Version\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage\">\n        \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCarthage-compatible-brightgreen.svg?style=flat\"\n             alt=\"Carthage Compatible\">\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n**ARKit**: Uses camera and motion data to map out the local world as you move around.\n\n**CoreLocation**: Uses wifi and GPS data to determine your global location, with a low degree of accuracy.\n\n**ARKit + CoreLocation**: Combines the high accuracy of AR with the scale of GPS data.\n\n![Points of interest demo](https:\u002F\u002Fgithub.com\u002FProjectDent\u002FARKit-CoreLocation\u002Fblob\u002Fmaster\u002Fgiphy-1.gif) ![Navigation demo](https:\u002F\u002Fgithub.com\u002FProjectDent\u002FARKit-CoreLocation\u002Fblob\u002Fmaster\u002Fgiphy-2.gif)\n\nThe potential for combining these technologies is huge, with so many potential applications across many different areas. This library comes with two major features:\n- Allow items to be placed within the AR world using real-world coordinates.\n- Dramatically improved location accuracy, using recent location data points combined with knowledge about movement through the AR world.\n\nThe improved location accuracy is currently in an “experimental” phase, but could be the most important component.\n\nBecause there’s still work to be done there, and in other areas, this project will best be served by an open community, more than what GitHub Issues would allow us. So I’m opening up a Slack group that anyone can join, to discuss the library, improvements to it, and their own work.\n\n**[Join the Slack community](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Farcl-dev\u002Fshared_invite\u002FenQtNTk4OTg4MzU0MTEyLTkyNGZjMDc3NDZlOGZmZTVlNWY1MWYxODg1MTA4ZWMzOThjZDM0ZmY1NGZlZjNiYmE1OGM3MDFkZTNjNjI5ODc)**\n\n## Requirements\nARKit requires iOS 11, and supports the following devices:\n- iPhone 6S and upwards\n- iPhone SE\n- iPad (2017)\n- All iPad Pro models\n\niOS 11 can be downloaded from Apple’s Developer website.\n\n## Usage\nThis library contains the ARKit + CoreLocation framework, as well as a demo application similar to [Demo 1](https:\u002F\u002Ftwitter.com\u002FAndrewProjDent\u002Fstatus\u002F886916872683343872).\n\n[Be sure to read the section on True North calibration.](#true-north-calibration)\n\n### Building with Swift:\n\n```bash\nswift build \\\n        -Xswiftc \"-sdk\" -Xswiftc \"`xcrun --sdk iphonesimulator --show-sdk-path`\" \\\n        -Xswiftc \"-target\" -Xswiftc \"x86_64-apple-ios12.1-simulator\"\n```\n\n### Setting up using Swift Package Manager\n\n\n### Setting up using CocoaPods\n1. Add to your podfile:\n\n`pod 'ARCL'`\n\n2. In Terminal, navigate to your project folder, then:\n\n`pod update`\n\n`pod install`\n\n3. Add `NSCameraUsageDescription` and `NSLocationWhenInUseUsageDescription` to plist with a brief explanation (see demo project for an example)\n\n### Setting up manually\n1. Add all files from the `ARKit+CoreLocation\u002FSource` directory to your project.\n2. Import ARKit, SceneKit, CoreLocation and MapKit.\n3. Add `NSCameraUsageDescription` and `NSLocationWhenInUseUsageDescription` to plist with a brief explanation (see demo project for an example)\n\n### Quick start guide\nTo place a pin over a building, for example Canary Wharf in London, we’ll use the main class that ARCL is built around - `SceneLocationView`.\n\nFirst, import ARCL and CoreLocation, then declare SceneLocationView as a property:\n\n```swift\nimport ARCL\nimport CoreLocation\n\nclass ViewController: UIViewController {\n  var sceneLocationView = SceneLocationView()\n}\n```\n\nYou should call `sceneLocationView.run()` whenever it’s in focus, and `sceneLocationView.pause()` if it’s interrupted, such as by moving to a different view or by leaving the app.\n\n```swift\noverride func viewDidLoad() {\n  super.viewDidLoad()\n\n  sceneLocationView.run()\n  view.addSubview(sceneLocationView)\n}\n\noverride func viewDidLayoutSubviews() {\n  super.viewDidLayoutSubviews()\n\n  sceneLocationView.frame = view.bounds\n}\n```\n\nAfter we’ve called `run()`, we can add our coordinate. ARCL comes with a class called `LocationNode` - an object within the 3D scene which has a real-world location along with a few other properties which allow it to be displayed appropriately within the world. `LocationNode` is a subclass of SceneKit’s `SCNNode`, and can also be subclassed further. For this example we’re going to use a subclass called `LocationAnnotationNode`, which we use to display a 2D image within the world, which always faces us:\n\n```swift\nlet coordinate = CLLocationCoordinate2D(latitude: 51.504571, longitude: -0.019717)\nlet location = CLLocation(coordinate: coordinate, altitude: 300)\nlet image = UIImage(named: \"pin\")!\n\nlet annotationNode = LocationAnnotationNode(location: location, image: image)\n```\n\n`LocationAnnotationNode` can also be initialized using a UIView. Internally, the UIView is converted into UIImage, so you cannot update the content dynamically.\nHowever, this methods allows you to easily show complex layout as POI.\n\n```swift\nlet coordinate = CLLocationCoordinate2D(latitude: 51.504571, longitude: -0.019717)\nlet location = CLLocation(coordinate: coordinate, altitude: 300)\nlet view = UIView() \u002F\u002F or a custom UIView subclass\n\nlet annotationNode = LocationAnnotationNode(location: location, view: view)\n```\n\nIt can also be initialized with CALayer. You can use this when you want to update the contents live.\n\n```swift\nlet coordinate = CLLocationCoordinate2D(latitude: 51.504571, longitude: -0.019717)\nlet location = CLLocation(coordinate: coordinate, altitude: 300)\nlet layer = CALayer() \u002F\u002F or a custom CALayer subclass\n\nlet annotationNode = LocationAnnotationNode(location: location, layer: layer)\n```\n\nBy default, the image you set should always appear at the size it was given, for example if you give a 100x100 image, it would appear at 100x100 on the screen. This means distant annotation nodes can always be seen at the same size as nearby ones. If you’d rather they scale relative to their distance, you can set LocationAnnotationNode’s `scaleRelativeToDistance` to `true`.\n\n```swift\nsceneLocationView.addLocationNodeWithConfirmedLocation(locationNode: annotationNode)\n```\n\nThere are two ways to add a location node to a scene - using `addLocationNodeWithConfirmedLocation`, or `addLocationNodeForCurrentPosition`, which positions it to be in the same position as the device, within the world, and then gives it a coordinate.\n\nSo that’s it. If you set the frame of your sceneLocationView, you should now see the pin hovering above Canary Wharf.\n\nIn order to get a notification when a node is touched in the `sceneLocationView`, you need to conform to `LNTouchDelegate` in the ViewController class. \n\nThe `annotationNodeTouched(node: AnnotationNode)` gives you access to node that was touched on the screen. `AnnotationNode` is a subclass of SCNNode with two extra properties: `image: UIImage?` and `view: UIView?`. Either of these properties will be filled in based on how the `LocationAnnotationNode` was initialized (using the constructor that takes UIImage or UIView).\n\nThe `locationNodeTouched(node: LocationNode)` gives you instead access to the nodes created from a `PolyNode` (e.g. the rendered directions of a `MKRoute`).\n```swift\nclass ViewController: UIViewController, LNTouchDelegate {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \u002F\u002F...\n        self.sceneLocationView.locationNodeTouchDelegate = self\n        \u002F\u002F...\n    }\n\n    func annotationNodeTouched(node: AnnotationNode) {\n        \u002F\u002F Do stuffs with the node instance\n\n        \u002F\u002F node could have either node.view or node.image\n        if let nodeView = node.view{\n            \u002F\u002F Do stuffs with the nodeView\n            \u002F\u002F ...\n        }\n        if let nodeImage = node.image{\n            \u002F\u002F Do stuffs with the nodeImage\n            \u002F\u002F ...\n        }\n    }\n\n    func locationNodeTouched(node: LocationNode) {\n        guard let name = node.tag else { return }\n        guard let selectedNode = node.childNodes.first(where: { $0.geometry is SCNBox }) else { return }\n\n        \u002F\u002F Interact with the selected node\n    }\n\n}\n```\n## Additional features\nThe library and demo come with a bunch of additional features for configuration. It’s all fully documented to be sure to have a look around.\n\nSceneLocationView is a subclass of ARSCNView. Note that while this gives you full access to ARSCNView to use it in other ways, you should not set the delegate to another class. If you need to use delegate features then you should subclass `SceneLocationView`.\n\n## True North calibration\nOne issue which I haven’t personally been able to overcome is that the iPhone’s True North calibration currently has an accuracy of 15º at best. This is fine for maps navigation, but when placing things on top of the AR world, it starts to become a problem.\n\nI’m confident that this issue can be overcome by using various AR techniques - it’s one area I think can really benefit from a shared effort.\n\nTo improve this currently, I’ve added some functions to the library that allow adjusting the north point:\n- `sceneLocationView.moveSceneHeadingClockwise`\n- `sceneLocationView.moveSceneHeadingAntiClockwise`\n- `sceneLocationView.resetSceneHeading`\n\nYou should use these by setting `sceneLocationView.useTrueNorth` to `false`, and then pointing the device in the general direction of north before beginning, so it’s reasonably close. With `useTrueNorth` set to true (default), it would continually adjust as it gets a better sense of north.\n\nWithin the demo app, there’s a disabled property called `adjustNorthByTappingSidesOfScreen`, which accesses these functions, and, once enabled, allows tapping on the left and right of the screen to adjust the scene heading.\n\nMy recommendation would be to fine a nearby landmark which is directly True North from your location, place an object there using a coordinate, and then use the `moveSceneHeading` functions to adjust the scene until it lines up.\n\n## Improved Location Accuracy\nCoreLocation can deliver location updates anywhere from every 1-15 seconds, with accuracies which vary from 150m down to 4m. Occasionally, you’ll receive a far more accurate reading, like 4m or 8m, before returning to more inaccurate readings. At the same time, AR uses motion and camera data to create a map of the local world.\n\nA user may receive a location reading accurate to 4m, then they walk 10m north and receive another location reading accurate to 65m. This 65m-accurate reading is the best that CoreLocation can offer, but knowing the user’s position within the AR scene when they got that 4m reading, and the fact that they’ve walked 10m north through the scene since then, we can translate that data to give them a new coordinate with about 4m of accuracy. This is accurate up to about 100m.\n\n[There is more detail on this on the wiki](https:\u002F\u002Fgithub.com\u002FProjectDent\u002FARKit-CoreLocation\u002Fwiki\u002FCurrent-Location-Accuracy).\n\n### Issues\nI mentioned this was experimental - currently, ARKit occasionally gets confused as the user is walking through a scene, and may change their position inaccurately. This issue also seems to affect the “euler angles”, or directional information about the device, so after a short distance it may think you’re walking in a different direction.\n\nWhile Apple can improve ARKit over time, I think there are improvements we can make to avoid those issues, such as recognising when it happens and working to correct it, and by comparing location data with our supposed location to determine if we’ve moved outside a possible bounds.\n\n### Location Algorithm Improvements\nThere are further optimisations to determining a user’s location which can be made.\n\nFor example, one technique could be to look at recent location data, translate each data point using the user’s travel since then, and use the overlap between the data points to more narrowly determine the user’s possible location.\n\n[There is more detail on this on the wiki](https:\u002F\u002Fgithub.com\u002FProjectDent\u002FARKit-CoreLocation\u002Fwiki\u002FCurrent-Location-Accuracy).\n\n## Going Forward\n\nWe have some Milestones and Issues related to them - anyone is welcome to discuss and contribute to them. Pull requests are welcomed. You can discuss new features\u002Fenhancements\u002Fbugs either by adding a new Issue or via [the Slack community](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Farcl-dev\u002Fshared_invite\u002FenQtNTk4OTg4MzU0MTEyLTkyNGZjMDc3NDZlOGZmZTVlNWY1MWYxODg1MTA4ZWMzOThjZDM0ZmY1NGZlZjNiYmE1OGM3MDFkZTNjNjI5ODc).\n\n## Help \u002F Examples\n- [360 iDev 2019: Eric Internicola - Build immersive experiences with ARKit and CoreLocation](https:\u002F\u002Fvimeo.com\u002F361883047)\n    - What if you could create objects and set a real-world (fixed) location for them and view those objects using ARKit? A library called ARCL combines the power of CoreLocation with ARKit and lets you do just that! Allow users to use their device to look in the direction of a landmark. Allow users to see location-bound objects on their device using AR. Show you users directions as they walk the streets!\n- [360iDevARNavigation - Reference Navigation App](https:\u002F\u002Fgithub.com\u002Fintere\u002F360iDevARNavigation)\n    -  Draws blue lines on the road for navigation (similar to the demo video at the top of this README)\n- [GeoTrackKit - ARCL Integration](https:\u002F\u002Fgithub.com\u002Fintere\u002FGeoTrackKit\u002Fpull\u002F19)\n    - Integrates ARCL with a tracking library `GeoTrackKit` and has some useful demo screencasts\n\n## Thanks\nLibrary created by [@AndrewHart](https:\u002F\u002Fx.com\u002Fandrewhart), but a community effort from here on.\n\nAvailable as open source under the terms of the [MIT License](http:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT).\n","该项目结合了ARKit的高精度与CoreLocation的大规模GPS数据，实现了增强现实中的精准定位。其核心功能包括允许用户基于真实世界坐标在AR环境中放置物品以及通过结合最近的位置数据点和AR环境中的移动知识来显著提高位置准确性。该技术目前处于实验阶段，但显示出巨大的潜力。适合应用于需要高精度地理位置信息的场景，如导航、旅游导览或基于位置的游戏等。项目使用Swift语言开发，并支持iOS 11及以上版本的设备。","2026-06-11 03:09:04","top_language"]