That seems like a reasonable way of doing it, assuming you can get the timing right -- there's no delay built-in that loop, so it may get to full speed pretty quickly. (Maybe "step" does some delaying?)
Also, if step() does the delay based on speed, then you will actually speed up at a slower rate of acceleration in the beginning.
Best would be to use (or build) a library that has built-in support for trajectory ballistics like this, where you can say "go to speed X with an acceleration of Y" and it takes care of it using proper math and interrupts/timers.