Implement wifi ranging for suggested APs without scanning them #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements wifi ranging for suggested APs that the locate endpoint now returns that are around the last known position without the need to scan them first by using the MAC address and frequency of the AP.
Also lowers the ranging interval to range more often. With the default 30s scanning rate, ranging is done in an up to 3s interval if ranging is fast enough. This has been tested successfully to work.
Wifi scanning and ranging task is decoupled so that opportunistic ranging could be used to find a location faster than scanning if it scanning is very slow e.g. during first app startup.
When moving fast you still need to wait for scanning sometimes so more work in the selection of the suggested peers might be needed.
Open TODOs for this PR:
Since the location is updating a lot more often now it would be really nice if the web UI would animate the location changing instead of just instantly moving the point.
Also in locations where the floor level is not entirely stable (e.g. near the open area in the CCH east entrance with the escalators) it also jumps a lot and it would be nice to smooth that out and only change level if it was consistent for e.g. 10 seconds. That might be fixed with averaging of the ranging values tho.