Fix VAM on CP chart out by factor of 10

Fixes #489.
This commit is contained in:
Mark Liversedge
2013-02-13 22:01:43 +00:00
parent acfd1ca3f7
commit b48a9a2b86
2 changed files with 4 additions and 2 deletions

View File

@@ -666,7 +666,8 @@ MeanMaxComputer::run()
// NOTE: It is 360 not 3600 because Altitude is factored for decimal places
// since it is the base data series, but we are calculating VAM
double vam = (((data.points[i].value - lastAlt) * 360)/ride->recIntSecs());
// And we multiply by 10 at the end!
double vam = (((data.points[i].value - lastAlt) * 360)/ride->recIntSecs()) * 10;
if (vam < 0) vam = 0;
lastAlt = data.points[i].value;
data.points[i].value = vam;