public boolean calcParameters(boolean lastSample, double[] speeds, double[] radiuses, double[] angles, int len) {
        double maxRealAngle = 0;
        double minRealAngle = 0;
        for (int i = 0; i < len; i++) {
            double angle = angles[i];
            if (angle > maxRealAngle) {
                maxRealAngle = angle;
            }
            if (angle < minRealAngle) {
                minRealAngle = angle;
            }
        }
        if (maxRealAngle - minRealAngle < (lastSample ? 1 : 10)) {
            System.out.println("not enough data: " + (maxRealAngle - minRealAngle) + " min " + minRealAngle + " max " + maxRealAngle);
            return false;
        }

        if (formulaFinder != null) {
            formulaFinder.stop();
        }

        if (angleState == Game.ANGLE_STATE_NEED_ALL_PARAMS) {
            double[] speedsCopy = new double[len];
            System.arraycopy(speeds, 0, speedsCopy, 0, len);
            double[] radiusesCopy = new double[len];
            System.arraycopy(radiuses, 0, radiusesCopy, 0, len);
            double[] anglesCopy = new double[len];
            System.arraycopy(angles, 0, anglesCopy, 0, len);
            formulaFinder = new FormulaFinder(speedsCopy, radiusesCopy, anglesCopy, formulaFinderListener);
            formulaFinder.setInitialParams(anglePredictorMinRAccell, anglePredictorA, anglePredictorB, anglePredictorC);
            formulaFinder.start();
        }
        return true;
    }