openxc / openxc-vehicle-simulator

BSD 3-Clause "New" or "Revised" License
63 stars 44 forks source link

Dynamics Model should create and use snapshots of vehicle state rather than running totals. #11

Closed DaveMelcher closed 11 years ago

DaveMelcher commented 11 years ago

Currently, the Dynamics model iterates each of the data points independently of each other. At each time step, the next values are calculated, but each uses the most recent data available for the calculations. This results in arbitrary usage or fresh data, and data that is one time step old.

Greater accuracy can be achieved by creating a new snapshot of the vehicle state each time step. And by using the last snapshot for the data to create the new one.

DaveMelcher commented 11 years ago

Implemented.