float CQYMin = getCQYMin(); float daysOfGrowth = getDaysOfGrowth(); float timeTillCropMaturity = getTimeAtCropMaturity(); float calculatedCQY = CQYMax - ((CQYMax - CQYMin) * (daysOfGrowth - timeTillCanopySenescence) / (timeTillCropMaturity - timeTillCanopySenescence)); myLogger.debug("CQYMin: " + CQYMin); myLogger.debug("daysOfGrowth: " + daysOfGrowth); myLogger.debug("timeTillCropMaturity: " + timeTillCropMaturity); if (calculatedCQY < 0f) return 0f; return calculatedCQY;
    private float calculateCQY() {        float CQYMax = calculateCQYMax();        float timeTillCanopySenescence = getTimeAtCanopySenescence();        myLogger.debug("CQYMax: " + CQYMax);        myLogger.debug("timeTillCanopySenescence:" + timeTillCanopySenescence);        if (getDaysOfGrowth() < getTimeAtCanopySenescence()) {            return CQYMax;        } else {            float CQYMin = getCQYMin();            float daysOfGrowth = getDaysOfGrowth();            float timeTillCropMaturity = getTimeAtCropMaturity();            float calculatedCQY = CQYMax                    - ((CQYMax - CQYMin)                            * (daysOfGrowth - timeTillCanopySenescence) / (timeTillCropMaturity - timeTillCanopySenescence));            myLogger.debug("CQYMin: " + CQYMin);            myLogger.debug("daysOfGrowth: " + daysOfGrowth);            myLogger.debug("timeTillCropMaturity: " + timeTillCropMaturity);            if (calculatedCQY < 0f)                return 0f;            else                return calculatedCQY;        }    }