Azure / azure-spatial-anchors-samples

Azure Spatial Anchors sample code
Other
293 stars 139 forks source link

Is it possible use coarsereloc device near watcher to locate nearby anchors ? #139

Closed skypu3 closed 4 years ago

skypu3 commented 4 years ago

Hi All, I am developing the spatial anchors app on Unity, is it possible to achieve following scenarios ?

  1. Create anchor A, and use same CloudManager to create anchor B and C (follow the nearBy example)
  2. Try to locate anchor A use near device watcher based on GPS and wifi sensors etc.
  3. Finish locate anchor A then the question is coming -> which one is true or there is new option? The near device watcher can help me to automatically locate anchor B and C... Or I need to stop near device watcher, and create new watcher to pass anchor A's ID to locate anchor B and C...

Thank you for your clarification.

TobiasPott commented 4 years ago

Hi @skypu3, if I understand your question correct, you want to know if you can locate anchors created within the same session as A using the NearDeviceCriteria class in another session.

As far as I understood and used the SDK so far the NearDeviceCriteria will take care of locating all anchors you created in you scenario, thus said it will only detect those anchors you have created with an instance of PlatformLocationProvider is active with your session as this will gather and accumulate the GPS/Wifi/Bluetooth data stored with each created anchor.

Please note that the NearDeviceCriteria allows you to locate all anchors A, B and C (or others) which can be found according to your LocateStrategy and whether they have the above information for GPS/Wifi/BT stored with them. It will keep locating anchors close to your device as long as the watcher is active and you don't need to stop it after locating anchor A and continue with a NearAnchorCriteria.

I actually can't say whether the approach of locating every anchor by NearDeviceCriteria affects the use of the service more than detect only one anchor and continue using the NearAnchorCriteria. The documentation isn't that clear about how different criteria affect the service usage and we have faced some repeated throtteling due to high request counts when we started testing our application with a larger number of anchors. So unless you experience any limitations by your own use, you may be good to go by only using the NearDeviceCriteria setup.

skypu3 commented 4 years ago

Thanks, I had tried near device watcher, and actually it could resolve all anchors that created with same cloud session, that's really cool as I want.

TobiasPott commented 4 years ago

@skypu3 You're welcome. I would consider this issue closed and perhaps you are able to close it or one of the contributors can close this issue.