- pyrcs.converter.shift_mileage_by_yard(mileage, shift_yards, as_numeric=True)
Shift Network Rail mileage by given yards.
mileage (float or int or str) – mileage (associated with an ELR) used by Network Rail
shift_yards (int or float) – yards by which the given
as_numeric (bool) – whether to return a numeric type result, defaults to
- Return type:
float or str
>>> from pyrcs.converter import shift_mileage_by_yard >>> n_mileage = shift_mileage_by_yard(mileage='0.0396', shift_yards=220) >>> n_mileage 0.0616 >>> n_mileage = shift_mileage_by_yard(mileage='0.0396', shift_yards=221) >>> n_mileage 0.0617 >>> n_mileage = shift_mileage_by_yard(mileage=10, shift_yards=220) >>> n_mileage 10.022