CoraLibre / CoraLibre-android-sdk

CoraLibre-android-sdk fork of prestandard DP-3T to make compatible with the Google/Apple protocol
Mozilla Public License 2.0
127 stars 7 forks source link

Implementation of exposure risk calculating algorithm #20

Closed theScrabi closed 4 years ago

theScrabi commented 4 years ago

This module is completely missing so far. We didn't yet start to implement the algorithm that calculates the probability and risc factor of an exposure. By now we can only tell weather we saw an infected key or not.

Webpage descirbing the algorithm: https://github.com/CoraLibre/CoraLibre-android-sdk/issues/16

Also you can take a look at it here: https://github.com/corona-warn-app/cwa-app-android/issues/75#issuecomment-649665349

Stypox commented 4 years ago

I would like to take this, but I have no familiarity with the repo. Could you please point me to the place where we currently decide whether we saw an infected key or not?

Stypox commented 4 years ago

Resources:

Stypox commented 4 years ago

In the CWA app the ExposureConfiguration with all the parameters to feed to the algorithm is downloaded here, but this is not something that should be handled in the sdk

theScrabi commented 4 years ago

As long as I know we get the parameters supplied from the app through the API which we expose to the app. @haitrec is that right?

Stypox commented 4 years ago

Shall the algorithm take as the parameter an object of the still-unmerged IntervalOfCapturedData? Theoretically it has all of the data needed for the calculation: the average rssi/attenuation can be calculated, the exposure date can be taken from the last object in the CapturedData list, and the exposure time is just the number of CapturedDatas multiplied by 5 minutes. Correct me if I'm wrong ;-)

theScrabi commented 4 years ago

In my understanding you are right. We already provide all necessary information. All other things can be calculated based on what we provide.

Should I merge it now so you can use it, or would you use a dummy as long as bluetooth stack is not part of master yet?

theScrabi commented 4 years ago

This got done by https://github.com/CoraLibre/CoraLibre-android-sdk/pull/24. Is this a sufficient implementation?