code: private static double getAzimuth(double H, double phi, double d) {
          return Math.atan2(Math.sin(H),
                  Math.cos(H) * Math.sin(phi) - Math.tan(d) * Math.cos(phi))+Math.PI;
      }
docs: Sun azimuth in radians (direction along the horizon, measured from north to east)
  e.g. 0 is north
  @param H
  @param phi
  @param d
  @return