-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial work * Add higher level of granularity to reward output * Clippy * ...clippy * Move location_trust_score_multiplier into database * Fix tests * Update helium-proto * Fmt * Update proto branch to master --------- Co-authored-by: Matthew Plant <[email protected]>
- Loading branch information
Showing
17 changed files
with
423 additions
and
344 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
mobile_verifier/migrations/24_location_trust_multiplier.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
ALTER TABLE wifi_heartbeats ADD COLUMN location_trust_score_multiplier DECIMAL; | ||
|
||
UPDATE wifi_heartbeats SET location_trust_score_multiplier = | ||
CASE WHEN location_validation_timestamp IS NULL THEN | ||
0.25 | ||
WHEN distance_to_asserted > 100 THEN | ||
0.25 | ||
ELSE | ||
1.0 | ||
END; | ||
|
||
ALTER TABLE wifi_heartbeats ALTER COLUMN location_trust_score_multiplier SET NOT NULL; | ||
|
||
ALTER TABLE cbrs_heartbeats ADD COLUMN location_trust_score_multiplier DECIMAL; | ||
|
||
UPDATE cbrs_heartbeats SET location_trust_score_multiplier = 1.0; | ||
|
||
ALTER TABLE cbrs_heartbeats ALTER COLUMN location_trust_score_multiplier SET NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.