If it is that critical, it seems to suggest that you are running the motors right on the edge of their hold torque capability - might need more powerful motors.
Now for am impromptu maths lesson
Part of the issue is that a linear acceleration requires the speed to be a function v'=v+c. But in the microcontroller, the speed is v = b/x where x is the thing that changes the speed, so v' = b/x' = b/x + c = b*(1/x+d), so x'=x / (1+dx). That is unfortunately a very awkward thing to calculate - and very time consuming.
There is a lot for the processor to do when it is trying to accurately time two moving motors while processing frequent commands from EQMOD (which is constantly asking 'are we there yet'
), so I had to make the motor routines as efficient as possible.
As it happens, there is an approximation for that horrible formula (Taylor series) which is x'=x-(dx)^2+(dx)^3-... . That annoying continues on forever, but if you stop at the 3rd term you get a very decent approximation. But even that is still quite a pain.
In the end, I am actually just using x'=nx as the acceleration curve, which sort of works, only because of integer truncation and the fact that the numbers are small. It is by no means perfect and is something I hope to find a better way of doing.