sksports.model
.strava_power_model¶
-
sksports.model.
strava_power_model
(activity, cyclist_weight, bike_weight=6.8, coef_roll_res=0.0045, pressure=101325.0, temperature=15.0, coef_drag=1, surface_rider=0.32, use_acceleration=False)[source][source]¶ Strava model used to estimate power.
It corresponds the mathematical formulation which add all forces applied to a cyclist in movement.
Read more in the User Guide.
Parameters: - activity : DataFrame
The activity containing the ride information.
- cyclist_weight : float
The cyclist weight in kg.
- bike_weight : float, default=6.8
The bike weight in kg.
- coef_roll_res : float, default=0.0045
Rolling resistance coefficient.
- pressure : float, default=101325.0
Pressure in Pascal.
- temperature : float, default=15.0
Temperature in Celsius.
- coef_drag : float, default=1
The drag coefficient also known as Cx.
- surface_rider : float, default=0.32
Surface area of the rider facing wind also known as S. The unit is m^2.
- use_acceleration : bool, default=False
Either to add the power required to accelerate. This estimation can become unstable if the acceleration varies for reason which are not linked to power changes (i.e., braking, bends, etc.)
Returns: - power : Series
The power estimated.
References
[1] How Strava Calculates Power https://support.strava.com/hc/en-us/articles/216917107-How-Strava-Calculates-Power Examples
>>> from sksports.datasets import load_fit >>> from sksports.io import bikeread >>> from sksports.model import strava_power_model >>> ride = bikeread(load_fit()[0]) >>> power = strava_power_model(ride, cyclist_weight=72) >>> print(power['2014-05-07 12:26:28': ... '2014-05-07 12:26:38']) # Show 10 sec of estimated power 2014-05-07 12:26:28 196.567898 2014-05-07 12:26:29 198.638094 2014-05-07 12:26:30 191.444894 2014-05-07 12:26:31 26.365864 2014-05-07 12:26:32 89.826104 2014-05-07 12:26:33 150.842325 2014-05-07 12:26:34 210.083958 2014-05-07 12:26:35 331.573965 2014-05-07 12:26:36 425.013711 2014-05-07 12:26:37 428.806914 2014-05-07 12:26:38 425.410451 Freq: S, dtype: float64