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

ENF: Fix average RSSI calculation #1656

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

transistortim
Copy link
Contributor

Correctly discard new measurements when the reported timestamp is older
than the timestamp in the database.
Fixes #1655.

Correctly discard new measurements when the reported timestamp is older
than the timestamp in the database.
Fixes microg#1655.
@Elsensee
Copy link
Contributor

Elsensee commented Feb 1, 2022

Also, the first RSSI value is always discarded, because MINIMUM_EXPOSURE_DURATION_MS is 0 and there is rssi * timestamp (=0).
Maybe that should be set to 250? (Advertisements are sent every 250ms, so I would assume that this is the minimal value)

@mar-v-in
Copy link
Member

mar-v-in commented Feb 1, 2022

Indeed the first value is discarded, but that doesn't really matter. What matters is the time between the scan periods (3-5 minutes), where we do not have any RSSI data (as we are not scanning) so we are approximating it based on the first occurrence in the following scan period. This is similar to the behavior in GMS. (IIRC they approximate based on the previous scan period, which would mean they effectively discard the last measured rssi value.)

@mar-v-in mar-v-in merged commit 75aaeb1 into microg:master Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENF: RSSI 0 dBm
3 participants