3

I have the following data set from cycling (recorded with GPS):

unixtime|humantime|lat|lon|ele
1375422506|2013-08-02 07:48:26|49.084247|19.308619|536.9
1375422515|2013-08-02 07:48:35|49.084076|19.308629|534.0
1375422520|2013-08-02 07:48:40|49.083944|19.308882|534.6
1375422526|2013-08-02 07:48:46|49.08375|19.309241|534.5
1375422533|2013-08-02 07:48:53|49.083517|19.309644|533.6
1375422540|2013-08-02 07:49:00|49.08327|19.310005|529.3

Where:

unixtime is time in seconds. this should be on the X axis.
humantime is for better readability only. will not be required in the equation.
lat is my latitude coordinate at that specific time
lon is my longitude coordinate at that specific time
ele is my elevation at that specific time

We can use the haversine formula to calculate the distance traveled between points using latitude and longitude as an input. We have the elevation already available.

From the distance traveled and the unix time stamps, we can get the speed of travel.

How do we calculate my power output from this data? That means: if my elevation is falling (I'm going downhill), my power output is very low, even if my speed is high. If my elevation is rising (I'm going uphill), my power output is pretty high (depending on speed, of course).

Let's ignore the speed of the wind, i.e. let's imagine there was no wind blowing = the speed of the wind was 0 km/h relative to the Earth.

P.S.: I don't know how to tag this. Can someone re-tag, please?

EDIT

I'm not sure whether it's possible to calculate my power output in something like Watts only from this data. I think a lot more data would be required -- if not my weight/height, but also some unobtainable data. If this is the case, it would probably be enough to calculate the power output in %, defining my maximum power as 100% and counting everything lower than that to lower %, where 0% is standing still (resting).

Frantisek
  • 131
  • In order for this to have a "nice" answer in terms of basic Newtonian mechanics, you need to neglect not only wind but also air resistance generally as well as rolling resistance. In practice, these factors are not only relevant, but they dominate. I can give you answer that does take these factors into consideration, but it'll have some coefficients in it that you'll have to determine experimentally. Which kind of answer do you want? – Daniel Franke Aug 02 '13 at 17:55
  • @DanielFranke: It would be very nice to know why they dominate, so if you care to explain, I'll be happy to read! However, I'm afraid I cannot get any another coefficients for the data set. I'd be happy to only use the available data, but I'd also want to know the full answer. Would you care? – Frantisek Aug 02 '13 at 18:00
  • If all friction could be ignored, the net energy needed to make a round trip across the Himalaya would be zero – Hagen von Eitzen Aug 02 '13 at 18:11
  • @HagenvonEitzen: I'm not saying to ignore the air friction, I'm saying to ignore the wind speed (not relative to me). I.e. if I'm traveling at the speed of 20 km/h, the speed blowing to me is 20 km/h, but blowing relative to the Earth is 0 km/h. That was my point. Sorry if I'm not expressing this correctly. – Frantisek Aug 02 '13 at 18:15
  • @RichardRodriguez Granted, but if we want to not-ignore air friction (and also the inefficiency of th ehuman body as an engine) we need a lot more information than just your whereabouts at a given time, starting with $c_w$-values, body weight and such – Hagen von Eitzen Aug 02 '13 at 18:23
  • @DanielFranke: maybe see my edit. – Frantisek Aug 02 '13 at 18:27
  • Considering only your power relative to your maximum output won't really simplify things much at all. See my answer. – Daniel Franke Aug 03 '13 at 00:31

1 Answers1

1

This answer will have three parts:

  1. The theoretical answer.
  2. An explanation of why the theoretical answer is going to be garbage in practice, and you shouldn't even bother computing it.
  3. A suggestion on how to get a better answer.

First, determine your path by converting your GPS data to rectangular coordinates and fitting a quadratic spline to it. Your velocity vector is the first derivative of your path; your acceleration vector is your second derivative. Your (scalar) speed is the magnitude of your velocity.

Recall the most basic law of physics: $$F = MA$$ $M$ is your mass (a scalar), $A$ is your acceleration (a vector), and $F$ is the sum of the forces acting on you (another vector). The forces acting on you come from four sources:

  1. Gravity
  2. Air resistance
  3. Rolling resistance
  4. Your own exertion

So,

$$F_{net} = F_G + F_A + F_R + F_Y = MA$$

where $F_G, F_A, F_R, F_Y$ represent the four factors enumerated above, respectively. Your mass is your body mass plus the mass of your bike. This together with your acceleration vector lets you determine $F_{net}$, so then if you can determine $F_G$, $F_A$, and $F_R$, you can subtract them out to get $F_Y$.

$F_G$ is force due to gravity. We only care about the component which is not counteracted by the ground. The magnitude of this component is

$$|F_G| = Mg\sin \theta$$

where $M$ is again your mass (including the bike), $g$ is $9.8 \frac{m}{s^2}$, and $\theta$ is the inclination of the ground. This vector points downhill. Note that "downhill" is not necessarily parallel to your direction of travel: you could be side-hilling.

$F_A$ is determined by the drag formula:

$$|F_A| = \frac{1}{2}\rho v^2C_DA$$

Where:

  • $\rho$ is the density of the atmosphere.
  • $v^2$ is the square of your airspeed.
  • $C_D$ is an experimentally-determined drag coefficient.
  • $A$ is your cross-sectional area.

At STP (meaning, approximately room temperature and sea level), $\rho$ is approximately $1.275 \frac{kg}{m^3}$, but will be lower if you're drafting behind another rider. $C_D$ depends, among other things, on what material your bike is made out of and what you're wearing. $A$ depends on your body position (e.g., it will be lower if you're on your aero-bars). The direction of $F_A$ is opposite your direction of travel relative to the air (hence if there is no wind, opposite your direction of travel relative to the ground).

$$|F_R| = Mg\mu_k\cos \theta$$

where $M$, $g$, and $\theta$ are as above, and $\mu_k$ is your coefficient of friction, which also has to be determined experimentally. The direction of $F_R$ is opposite your direction of travel relative to the ground.

Once you have these quantities, you can multiply $|F_Y|$ by your (scalar) speed to get your power output.

Now, it's probably obvious to you by now that this equation has several empirical inputs that you, as a hobbyist, are never going to compute with sufficient accuracy that you're going to get a reasonable result. So, here's what I recommend you do instead: buy or borrow a Computrainer. It'll give you a direct measurement of your power output. Experiment with it while wearing a heart-rate monitor, and make a chart that relates your heart rate to your power output. Also wear the heart-rate monitor while you're on the road, and consult your chart to determine your power output.