fix_mileage¶
- pyrcs.converter.fix_mileage(mileage)[source]¶
Fixes mileage data (associated with an ELR).
- Parameters:
mileage (str | float | None) – The mileage data.
- Returns:
The fixed mileage data in the form of <miles>.<yards>.
- Return type:
str
Examples:
>>> from pyrcs.converter import fix_mileage >>> fixed_mileage = fix_mileage(mileage=29.011) >>> fixed_mileage '29.0110' >>> fixed_mileage = fix_mileage(mileage='.1100') >>> fixed_mileage '0.1100' >>> fixed_mileage = fix_mileage(mileage=29) >>> fixed_mileage '29.0000'