Determine if current location is inside or outside building with IndoorAtlas

核能气质少年 提交于 2020-01-15 08:00:47

问题


I'm using indoorAtlas SDK. I already succed to show current location and floorplan using indoorAtlas. But it has some weird result.

If i'm inside building that i listed the floorplanid and venue id, it gives the correct current location. But when i'm outside that building and i'm trying to locate current location it gives the result in the floorplan map but it gives some random location.

Is there any way to give some notification or action that i'm outside in area that i'm listed floorplanid and venueid ?


回答1:


In current SDK there is nothing that would give you straight answer to your question. I'd say that your best tools at the moment are the getUncertainty() -method in returned location update (ServiceState -class) combined with platform locations. Experiment with uncertainty value (radius in meters) to see when it would be best to start trusting platform locations over IndoorAtlas's indoor locations and to conclude that user has exited the building. In a more advanced version, when moving towards the edges of your floor plan (or better yet towards the exits) you could be more sure that transition (in->out, out->in) is likely to take place.

You could also combine this logic with geofences (http://developer.android.com/reference/com/google/android/gms/location/GeofencingApi.html) in one or more ways. E.g. use geofence as an indication that IndoorAtlas services should be turned on as user may enter a building and when entered, dynamically create a larger geofence as a safeguard to help your algorithm to detect that user has exited building and IndoorAtlas service can be turned off.

Hope this helps to find your solution.



来源:https://stackoverflow.com/questions/30419995/determine-if-current-location-is-inside-or-outside-building-with-indooratlas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!