Fix Version/s: None
Sprint:TSSW Sprint - Jul 20 - Aug 3
Team:Telescope and Site
Fix the transition of tracking in deciding the tracking trajectory. In the previous update (
DM-25243), I made two mistakes. One is that I do not generate a smooth velocity command in the tracking (I forgot the 4000 Hz internal calculation). The other one is that I do not stop the rotator's velocity smoothly if there is no new tracking command for some time. This ticket is to fix these two bugs.
Based on 'posErrorCalc_NewCmd' in 'Slew Mode Cmd Gen' subsystem, we can see the new received command (track) is always a command to reach instead of beginning.
After the discussion with Tiago, the pointing component always sends the future's target. Therefore, the rotator is doing the interpolation actually, although the method/ algorithm is bad. Based on this, the original code is correct, I should modify the code back.
Updated the code back as the following. The flags of tracking success/ fault seems to work still:
Discussed the interpolation algorithm with Tiago. The implemented code should update to use the algorithm suggested by Russell to fix the problem of jitter command. The ticket is
Discussed the discontinuous velocity with Tiago. I should issue a ticket to fix this. The added ticket is
Please help to review the PRs:
You could just base on the comments in ticket to do the review. The details we had discussed today. Thanks!
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.