Hi
Not sure how to best describe this problem but here goes:
I've got a loop of code that runs to accelerate a vehicle from a standing start to terminal velocity, which self terminates either once a certain condition is met, or once it runs for a certain number iterations. This works fine when the time step for the loop is a tenth or a hundreth of a second, but runs into a problem when the minimum time step (one two thousandth of a second) is used.
The problem is that it seems to freeze, by that I mean once it reaches a certain point, all the values being calculated stop changing, with the exception of the distance travelled, and I can't figure out why. It doesn't happen at a certain iteration, or when any parameter reaches a certain value, and no errors are received.
I've no ideas why the problem only occurs with the smallest timestep, it's exactly the same code, only the loop runs for longer. I've ruled out the loop count being a problem itself. All the values being calculated are, essentially, the same regardless of the time step. Basically I've ruled out everything I can think of.
Anybody have any ideas? If you need any more info, or example, just ask.
Help much appreciated.
Cheers
Not sure how to best describe this problem but here goes:
I've got a loop of code that runs to accelerate a vehicle from a standing start to terminal velocity, which self terminates either once a certain condition is met, or once it runs for a certain number iterations. This works fine when the time step for the loop is a tenth or a hundreth of a second, but runs into a problem when the minimum time step (one two thousandth of a second) is used.
The problem is that it seems to freeze, by that I mean once it reaches a certain point, all the values being calculated stop changing, with the exception of the distance travelled, and I can't figure out why. It doesn't happen at a certain iteration, or when any parameter reaches a certain value, and no errors are received.
I've no ideas why the problem only occurs with the smallest timestep, it's exactly the same code, only the loop runs for longer. I've ruled out the loop count being a problem itself. All the values being calculated are, essentially, the same regardless of the time step. Basically I've ruled out everything I can think of.
Anybody have any ideas? If you need any more info, or example, just ask.
Help much appreciated.
Cheers