Skip to main content

Simple gain-lost irating calculator.

Project description

ircalculator

Implements the iRating calculator formula used in https://github.com/SIMRacingApps/SIMRacingApps/files/3617438/iRacing.SOF.iRating.Calculator.v1_1.xlsx to estimate final ratings giving the results.

Example

from ircalculator.calculator import IRatingCalculator, IRatingResult

# results of the race in order (final positions)
results = [
        #             Name        ir    started
        IRatingResult("Driver 1", 8653, True),
        IRatingResult("Driver 2", 7356, True),
        IRatingResult("Driver 3", 8230, True),
        IRatingResult("Driver 4", 4398, True),
        IRatingResult("Driver 5", 3250, True),
        IRatingResult("Driver 6", 1782, True),
        IRatingResult("Driver 8", 8362, False),
        IRatingResult("Driver 9", 6729, False),
]

newRatings = IRatingCalculator().calculate(results)
print(newRatings, '\n', results)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

irating_ircalculator-0.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file irating_ircalculator-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for irating_ircalculator-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 752e8d3778014c48451b4a4f493cc8213cd393245a80033bb409cac70bde5d7c
MD5 a71d18f9998c6fbca41c7184d0c8d39e
BLAKE2b-256 aed62d2612868ed4cbec12b8aae5980e0af3c602a600f4772dea2790d9698457

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page