Permalink
Browse files

Fix Veloclinic model t=0 bug

  • Loading branch information...
1 parent a78dce2 commit 5ea16e9b1ebc1507e3649d604e9993403c04e631 @liversedge liversedge committed Feb 13, 2015
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/CPPlot.cpp
View
@@ -405,8 +405,8 @@ CPPlot::plotModel()
QVector<double> power(pdModel->size());
QVector<double> wprime(pdModel->size());
for (size_t t = 0; t < pdModel->size(); t++) {
- power[t] = pdModel->y(t);
- wprime[t] = (pdModel->y(t)-veloCP) * (pdModel->x(t)); // Joules
+ power[t] = pdModel->y(t+1);
+ wprime[t] = (pdModel->y(t+1)-veloCP) * (pdModel->x(t+1)); // Joules
}
modelCurve->setSamples(power.data(), wprime.data(), pdModel->size()-1);
}

0 comments on commit 5ea16e9

Please sign in to comment.