Test condition: two targets. The first target is at 1.2 deg with velocity = 0.01 deg/sec. The second target is at 3 deg with velocity = -0.01 deg/sec.
The tracking velocity is continuous in the tracking process now:
There is a dip of velocity transition here (to 2nd target):
This velocity transitions from 0.01 deg/sec to -0.01 deg/sec happens in 0.005 seconds, which is 20 steps in 4000 Hz. We can see the acceleration > 0 for the new slew. Therefore, this transition does not make the physical sense at all.
The tracking target and position command have the wrong time order (the left figure is in the positive tracking and the right one is in the negative tracking):
Based on this order, I began to consider to use the interpolation instead.