code: private static double getAltitude(double H, double phi, double d) {
          return Math.asin(Math.sin(phi) * Math.sin(d) + Math.cos(phi)
                  * Math.cos(d) * Math.cos(H));
      }
docs: Sun altitude above the horizon in radians.
  e.g. 0 at the horizon and PI/2 at the zenith
  @param H
  @param phi
  @param d
  @return