Closed dougszumski closed 9 years ago
Assumption is that change in velocity is small between successive calls to org.cowboycoders.turbotrainers.PowerModel#updatepower(double) i.e use a suitably small time delta. We are polling this with org.cowboycoders.utils.FixedPeriodUpdater at a time interval of 100ms as defined in this nugget:
private FixedPeriodUpdater powerModelUpdater = new FixedPeriodUpdater(new Double(0),powerModelUpdateCallback,POWER_MODEL_UPDATE_PERIOD_MS);
from org.cowboycoders.turbotrainers.bushido.brake.BushidoBrakeSlopeController.
Add comment to explain this.
Kinetic energy jumps up too fast for the first time step if the updating interval is of the order of seconds or larger.