TransferCavityLock.Controller.CalculateLaserSetPoint C# (CSharp) Method

CalculateLaserSetPoint() private method

Measures the laser set point (the distance between the he-ne and TiS peaks in cavity voltage units) The lock (see calculateDeviationFromSetPoint) will adjust the voltage fed to the TiS to keep this number constant.
private CalculateLaserSetPoint ( double masterFitCoefficients, double slaveFitCoefficients ) : double
masterFitCoefficients double
slaveFitCoefficients double
return double
        private double CalculateLaserSetPoint(double[] masterFitCoefficients, double[] slaveFitCoefficients)
        {
            double setPoint = new double();
            if (slaveFitCoefficients[1] > LOWER_CC_VOLTAGE_LIMIT
               && slaveFitCoefficients[1] < UPPER_CC_VOLTAGE_LIMIT) //Only change limits if fits are reasonable.
            {
                setPoint = Math.Round(slaveFitCoefficients[1] - masterFitCoefficients[1], 4);
            }
            else
            {
                setPoint = 0.0;
            }
            return setPoint;
        }