Motion / stepper planner
A trapezoidal or jerk-limited (S-curve) move from a distance, top speed and acceleration, converted to steps through full-step count, microstepping and a gear ratio - degrees for a joint, or a lead-screw pitch for a linear stage.
The planner [ live ]
profile: —
Peak step rate is past the assumed driver/MCU ceiling - see the note below.
Move
Stepper conversion
Assumptions and limits. The S-curve is the common case only: long enough to reach both amax and vmax at the given jerk limit. A move too short for that falls back to the trapezoidal (or triangular) profile and says so above the charts, rather than solving the nested short-move S-curve cases. The step-rate warning threshold (200,000 steps/s) is a labelled assumption about a typical hobby STEP/DIR driver and 8-bit-class MCU timer - a dedicated motion controller can go well past it. Steps are rounded to the nearest whole step; microstepping accuracy in real hardware is lower than the arithmetic suggests, especially at high microstep counts under load.