Fix Version/s: None
Sprint:TSSW Sprint - Jan 02 - Jan 16
Team:Telescope and Site
Verify the M2 hardpoint configuration files in MATLAB scripts, especially for the different combination of actuators.
Translate the calculation of hardpoint configuration files to Python code in ts_m2com. This helps the future's translation to C++ or LabVIEW.
- relates to
DM-31983 Allow the M2 to Change the Hardpoint on Sky
- To Do
I only translated the "reversed" part of hardpoint correction because the M2 Python simulator only supports this at this moment. After we figure out the "forwarded" part in M2 cell control algorithm, I should be able to translate it to Python code. But that will be another ticket.
Please help to review the PRs:
Please note the value changes in the unit tests comes from the numerical error between the Python and MATLAB for the pseudo-inverse function.
PRs approved in GH, I left a few comments for you to consider but everything looks good.
The idea of Harris's calculation of hardpoints is to make the x-, y-, and z-moments to be consistent when the related forces on hardpoints are 0. This makes sense on "flat" mirror as an edge case. For the condition of normal operation, a more completed algorithm might be needed (maybe consider how to translate the M1M3's algorithm to M2, which might take some time to figure out how).