I should switch to a different structure that allows more flexibility.
For example, a generator of couples (hour, speed) instead of a constant average speed.
This way, one can produce different generator functions according to different models.
One model would be the existing constant average speed.
Another model could take into account the elevation to apply a <1 multiplier to the provided average speed.
Another model could use another parameter like the Watt expressed by the cyclist, to combine it with other parameters (some suggested "bumpiness")
At the moment kilometers in a day calculation is solely based on the average speed parameter provided by the user. For example:
I should switch to a different structure that allows more flexibility. For example, a generator of couples (hour, speed) instead of a constant average speed. This way, one can produce different generator functions according to different models. One model would be the existing constant average speed. Another model could take into account the elevation to apply a <1 multiplier to the provided average speed. Another model could use another parameter like the Watt expressed by the cyclist, to combine it with other parameters (some suggested "bumpiness")