UcteConverterHelper { public static double calculateAsymmAngleTheta(TwoWindingsTransformer twoWindingsTransformer) { PhaseTapChanger phaseTapChanger = twoWindingsTransformer.getPhaseTapChanger(); int lowTapPosition = phaseTapChanger.getLowTapPosition(); int highTapPosition = phaseTapChanger.getHighTapPosition(); double lowPositionAlpha = Math.toRadians(-phaseTapChanger.getStep(lowTapPosition).getAlpha()); double lowPositionRho = 1 / phaseTapChanger.getStep(lowTapPosition).getRho(); double highPositionAlpha = Math.toRadians(-phaseTapChanger.getStep(highTapPosition).getAlpha()); double highPositionRho = 1 / phaseTapChanger.getStep(highTapPosition).getRho(); double xa = lowPositionRho * Math.cos(lowPositionAlpha); double ya = lowPositionRho * Math.sin(lowPositionAlpha); double xb = highPositionRho * Math.cos(highPositionAlpha); double yb = highPositionRho * Math.sin(highPositionAlpha); return Math.toDegrees(Math.atan((yb - ya) / (xb - xa))); } private  UcteConverterHelper(); static double calculatePhaseDu(TwoWindingsTransformer twoWindingsTransformer); static double calculateSymmAngleDu(TwoWindingsTransformer twoWindingsTransformer); static double calculateAsymmAngleDu(TwoWindingsTransformer twoWindingsTransformer); static double calculateAsymmAngleTheta(TwoWindingsTransformer twoWindingsTransformer);  }
@Test public void calculateAsymmAngleThetaTest() { assertEquals(60.0, calculateAsymmAngleTheta(reference.getTwoWindingsTransformer("HDDDDD2 HCCCCC1 1")), 0.0001); }