-
Notifications
You must be signed in to change notification settings - Fork 21
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
Landtype Boosting #789
Landtype Boosting #789
Conversation
- initialize hexes without a landtype assignment - load landtype disktree - update tests to match HIP-103 chart with all 3 data sets
HexAssignemnts wrap and labels Assignments. The order Assignments are considered is not always clear unless you have HIP-103 up next to the code. So we try to funnel all uses of the fields together into one place, and callers deal with Assignments as a collection.
This is an attempt to simplify the trait soup hex boosting was starting to become. Until there is a concrete need for more traits, I believe this flow is easier to follow, and easier to mock at the level desired in tests.
This command makes sure all values in a disktree file can be turned into Assignment.
Now a geofence can be constructed directly without needing to go through a file if you have a HexTreeSet.
The tables in HIP-103 list the assignments (AAA, ABC, etc,.) in the order (footfall, landtype, urbanized). Having the Debug repr of Assignments print in the same order makes it easier to cross reference with the tables.
This test will break if the logic for deriving scores changes. If the break is on purpose, the test should be updated.
This forces us to go through the proto enum, but provides a stronger contract for going between types. very nice
// gray - Outside of USA | ||
(_, _, C) => dec!(0.00), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that all radios outside of the USA won't receive any coverage points?
What about Mexico?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HIP-103 contains this paragraph, so radios in Mexico only get PoC if they are in a boosted hex and the oracle_multiplier is auto set to 1.
Further, the HIP authors acknowledge that areas that Service Providers boost through hex boosting are areas where coverage is needed the most. Therefore, if a res12 hex is boosted by a Service Provider of ≥1, the Oracle Multiplier will automatically be 1.00X, regardless of what combination value it is assigned.
helium/proto#398
Add Landtype to Hex Boosting.
struct HexAssignments
Assignments
are never considered individually, nor should they be. This type packs them together, allowing any code that requires specific use ofAssignment
order to attach itself here.It also allows
boostring_oracles/mod.rs
to reduce it's reliance on traits. There is now a single exportedBoostedHexAssignments
that allows for getting aHexAssignments
.HexBoostData
andCoverageDaemon
With only exporting a single trait from
boosting_oracles/mod.rs
, theCoverageDaemon
now takes the concrete structHexBoostData
with no generic arguments.Downstream from the
CoverageDaemon
, functions will takeimpl BoostedHexAssignments
so they can be used in tests.verify-disktree --path <PATH> --type <TYPE>
CLI CommandA CLI command was added to
mobile-verifier
.It verifies a
.h3tree
file by making sure that every cell can be turned into anAssignment
.Current only
Landtype
is supported.NOTE: In release mode, this function took about 8 minutes to run on my 2.3GHz Intel MacBook Pro for a 28gb file.
Other
Geofence::new
withGeofence::from_paths
sonew
could used without touching the filesystem.