We had a few avoidable ASC problems lately, which might have been easier to avoid if the way our ASC was in the guardian was a bit more clear. Today we had a couple of locklosses because of a CHARD Y gain setting (in the CHRAD blend state) that must have been intended to be used in combination with the +30dB filter, which is now turned off. It looks like the gains were updated in some guardian states but not others. We had a similar problem last week where we were turning on DSOFT Y accidentally because we didn't realize it was set in multiple places in the guardian.
We also had at least one, maybe two, locklosses that were caused by a guardian same state redirect in offload _DRMI_ASC, where the mich asc gain is saved in a variable, set to zero, then reset to the variable latter (same state redirect means it is set to zero and stays zero). Thanks to TJ for figuring out why that happened.
In an attempt to help us avoid thees situations in the future, and get a more clear idea of what is going on, we started to move our ASC gain settings into LSC params. Having all the gain changes collected in one place it becomes clear that we are doing gain changes which are probably unnecessary. For now we have only moved the settings for CHARD, DHARD, and MICH into LSC params, but I will plan to finish this at a later time.
We also found and fixed some things that were written in an unnecessarily confusing way, for example we have some if statements where the same settings are set in either case. We tried to move these things out of if statements. We also have settings for hard loops inside if statements about using the soft loops, which might actually need to be different but might not (we have left them in).
We have been trying to move things into guardian states where the name of the state is descriptive of what is happening (ie, so that we only have soft loop things happening in ENGAGE_SOFT_LOOPs, or so that all ASC changes happen in states that are ASC related). For this reason we moved the changes in gain for the CHARD loops from engage soft loops into ENGAGE_FULL_IFO_ASC, so these gain increases are now happening sooner than they were. (Previously we went through three CHARD gain settings in the course of these two guardian states, we have reduced that to only two settings now, it probably could be just one since we are using smooth limiters).
Apologies that this caused difficulty yesterday.
Today I continued in the same theme to move the radiation pressure compensation settings, which were hard coded in three different place (INCREASE_POWER, ADJUST_POWER and POWER 30W) into parameters, and I moved the adjustment into a function in ISC_library.
Also moved the soft loop settings into the parameters file.