// Path: itl/src/main/java/org/arabeyes/itl/prayertime/PrayerModule.java
// static class Location {
//     double degreeLong;  /* Longitude in decimal degree. */
//     double degreeLat;   /* Latitude in decimal degree. */
//     double gmtDiff;     /* GMT difference at regular time. */
//     int dst;            /* Daylight savings time switch (0 if not used).
//                            Setting this to 1 should add 1 hour to all the
//                            calculated prayer times */
//     double seaLevel;    /* Height above Sea level in meters */
//     double pressure;    /* Atmospheric pressure in millibars (the
//                            astronomical standard value is 1010) */
//     double temperature; /* Temperature in Celsius degree (the astronomical
//                            standard value is 10) */
// 
//     Location() {
//     }
// 
//     Location(Location src) {
//         this.degreeLong = src.degreeLong;
//         this.degreeLat = src.degreeLat;
//         this.gmtDiff = src.gmtDiff;
//         this.dst = src.dst;
//         this.seaLevel = src.seaLevel;
//         this.pressure = src.pressure;
//         this.temperature = src.temperature;
//     }
// }
// 
// Path: itl/src/main/java/org/arabeyes/itl/prayertime/PrayerModule.java
// static class SDate {
//     int day;
//     int month;
//     int year;
// 
//     SDate() {
//     }
// 
//     SDate(SDate src) {
//         this.day = src.day;
//         this.month = src.month;
//         this.year = src.year;
//     }
// }


import org.arabeyes.itl.prayertime.PrayerModule.Location;
import org.arabeyes.itl.prayertime.PrayerModule.SDate;
import static java.lang.Math.acos;
import static java.lang.Math.asin;
import static java.lang.Math.atan;
import static java.lang.Math.atan2;
import static java.lang.Math.cos;
import static java.lang.Math.floor;
import static java.lang.Math.pow;
import static java.lang.Math.sin;
import static java.lang.Math.tan;
        else if (year >= 1620 && year <= 1998)
            return 0; /* FIXIT: Support historical delta-t values for years before
                       * 1998. In the DT table above, each line represents 5 even
                       * years in the range 1620-1998. We should first complete the
                       * table to include data for both odd and even years. */
        else if ((year > 1998 && year < 2100) || year < 1620) {
            /* NOTE: The "2017" found below this comment should be changed to
               reflect the last year added to the DT2 table. */
            if (year >= 1999 && year <= 2017) {
                i = (int) (year - 1999);
                return DT2[i];
            }
            /* As of 2007, the two formulas given by Meeus seem to be off by
               many seconds when compared to observed values found at
               <http://maia.usno.navy.mil>. The DT2 table overrides these values
               with observed and predicted ones for delta-t (on January, other
               months not yet supported). Extrapolated (and wrong) values are still
               used for years after 2017. */
            else tempdt = 102 + (102 * t) + (25.3 * pow(t, 2));

            if (year >= 2000)
                return tempdt + (0.37 * (year - 2100));
            else return tempdt;
        }
        return 0;
    }

    /**
     * Returns the astronomical Julian day (for local time with delta-t)
     */
// Path: itl/src/main/java/org/arabeyes/itl/prayertime/PrayerModule.java
// static class Location {
//     double degreeLong;  /* Longitude in decimal degree. */
//     double degreeLat;   /* Latitude in decimal degree. */
//     double gmtDiff;     /* GMT difference at regular time. */
//     int dst;            /* Daylight savings time switch (0 if not used).
//                            Setting this to 1 should add 1 hour to all the
//                            calculated prayer times */
//     double seaLevel;    /* Height above Sea level in meters */
//     double pressure;    /* Atmospheric pressure in millibars (the
//                            astronomical standard value is 1010) */
//     double temperature; /* Temperature in Celsius degree (the astronomical
//                            standard value is 10) */
// 
//     Location() {
//     }
// 
//     Location(Location src) {
//         this.degreeLong = src.degreeLong;
//         this.degreeLat = src.degreeLat;
//         this.gmtDiff = src.gmtDiff;
//         this.dst = src.dst;
//         this.seaLevel = src.seaLevel;
//         this.pressure = src.pressure;
//         this.temperature = src.temperature;
//     }
// }
// 
// Path: itl/src/main/java/org/arabeyes/itl/prayertime/PrayerModule.java
// static class SDate {
//     int day;
//     int month;
//     int year;
// 
//     SDate() {
//     }
// 
//     SDate(SDate src) {
//         this.day = src.day;
//         this.month = src.month;
//         this.year = src.year;
//     }
// }


// Path: itl/src/main/java/org/arabeyes/itl/prayertime/AstroModule.java
import org.arabeyes.itl.prayertime.PrayerModule.Location;
import org.arabeyes.itl.prayertime.PrayerModule.SDate;
import static java.lang.Math.acos;
import static java.lang.Math.asin;
import static java.lang.Math.atan;
import static java.lang.Math.atan2;
import static java.lang.Math.cos;
import static java.lang.Math.floor;
import static java.lang.Math.pow;
import static java.lang.Math.sin;
import static java.lang.Math.tan;

        else if (year >= 1620 && year <= 1998)
            return 0; /* FIXIT: Support historical delta-t values for years before
                       * 1998. In the DT table above, each line represents 5 even
                       * years in the range 1620-1998. We should first complete the
                       * table to include data for both odd and even years. */
        else if ((year > 1998 && year < 2100) || year < 1620) {
            /* NOTE: The "2017" found below this comment should be changed to
               reflect the last year added to the DT2 table. */
            if (year >= 1999 && year <= 2017) {
                i = (int) (year - 1999);
                return DT2[i];
            }
            /* As of 2007, the two formulas given by Meeus seem to be off by
               many seconds when compared to observed values found at
               <http://maia.usno.navy.mil>. The DT2 table overrides these values
               with observed and predicted ones for delta-t (on January, other
               months not yet supported). Extrapolated (and wrong) values are still
               used for years after 2017. */
            else tempdt = 102 + (102 * t) + (25.3 * pow(t, 2));

            if (year >= 2000)
                return tempdt + (0.37 * (year - 2100));
            else return tempdt;
        }
        return 0;
    }

    /**
     * Returns the astronomical Julian day (for local time with delta-t)
     */
    static double getJulianDay(SDate date, double gmt) {