double getHighestElevationOfSun(PlainDate date) {

        Moment noon = date.get(this.transitAtNoon());
        double jde = JulianDay.getValue(noon, TimeScale.TT);
        double decInRad = Math.toRadians(this.getCalculator().getFeature(jde, DECLINATION));
        double latInRad = Math.toRadians(this.latitude);
        double sinElevation = // Extra term left out => Math.cos(Math.toRadians(trueNoon)) := 1.0 (per definition)
            Math.sin(latInRad) * Math.sin(decInRad) + Math.cos(latInRad) * Math.cos(decInRad); // Meeus (13.6)
        double result = Math.toDegrees(Math.asin(sinElevation));

        if (Double.isNaN(result)) {
            throw new UnsupportedOperationException(
                "Solar declination not supported by: " + this.getCalculator().name());
        }

        return result;

    }
double getHighestElevationOfSun ( PlainDate date ) { Moment noon = date . get ( this . transitAtNoon ( ) ) ; double jde = JulianDay . getValue ( noon , TimeScale . TT ) ; double decInRad = Math . toRadians ( this . getCalculator ( ) . getFeature ( jde , DECLINATION ) ) ; double latInRad = Math . toRadians ( this . latitude ) ; double sinElevation = Math . sin ( latInRad ) * Math . sin ( decInRad ) + Math . cos ( latInRad ) * Math . cos ( decInRad ) ; double result = Math . toDegrees ( Math . asin ( sinElevation ) ) ; if ( Double . isNaN ( result ) ) { throw new UnsupportedOperationException ( "Solar declination not supported by: " + this . getCalculator ( ) . name ( ) ) ; } return result ; }
used in test classes, too