Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force accuracy for region enter where the location±accuracy is still not inside the region #841

Closed
zacwest opened this issue Jul 27, 2020 · 1 comment · Fixed by #926
Closed

Comments

@zacwest
Copy link
Member

zacwest commented Jul 27, 2020

For example, from a user's logs:

variable value
distance from center 104.88060968179875
distance from perimeter 4.88060968179875
gps accuracy 4.864775783559363
distance w/accuracy from center 100.015833898
distance w/accuracy from perimeter 0.015833898

What we should send is max(4.864775783559363, 4.864775783559363 + 0.015833898) or 4.880609682, probably rounded up. The active zone check on the core side of things uses accuracy when deciding whether the user is in a zone, and fibbing the accuracy a bit feels a lot better than the location.

@zacwest
Copy link
Member Author

zacwest commented Aug 19, 2020

Another example which I ran into earlier:

variable value
distance from center 166.631
distance from perimeter 11.631
gps accuracy 5.0299951269562744
distance w/accuracy from center 161.601004873
distance w/accuracy from perimeter 6.601004873

Distance from center, according to Core Location's distance math: 166.631097374025.

zacwest added a commit that referenced this issue Aug 20, 2020
- Fires `ios.zone_entered` and `ios.zone_exited` directly from monitored regions. This will include keys `"zone" = zone.xyz"` and sometimes `"multi_region_zone_id" = "180"` when the zone (<100m at the time of writing this) require multiple regions. Refs #924 which asked for this.
- Fixes passive beacon zones being sent up as definite zones, rather than GPS producers. I'm not sure when this regressed, this behavior looks the same to my eye to before it was reported broken, but it's an easy fix. Fixes #924.
- Fixes cases where a region monitoring enter event might not produce an in-region location update when the accuracy and position do not show the current location as being in the region. When this occurs, we fudge the accuracy to be larger than given such that the GPS location is inside the region. Fixes #841.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant