public static double[] lintangEkliptikB(double tau, double lambdaM_r) { double b0 = 0; b0 += 280 * System.Math.Cos(3.199 + 84334.662 * tau); b0 += 102 * System.Math.Cos(5.422 + 5507.553 * tau); b0 += 80 * System.Math.Cos(3.88 + 5223.69 * tau); b0 += 44 * System.Math.Cos(3.7 + 2352.87 * tau); b0 += 32 * System.Math.Cos(4 + 1577.34 * tau); double b1 = 0; b1 += 9 * System.Math.Cos(3.9 + 5507.55 * tau); b1 += 6 * System.Math.Cos(1.73 + 5223.69 * tau); b1 *= tau; double B = (b0 + b1) / 100000000; double B_detikBusur = Konversi.toDegrees(B) * 3600; double beta = -B_detikBusur; double deltaBeta = 0.03916 * (System.Math.Cos(lambdaM_r) - System.Math.Sin(lambdaM_r)); double betaTerkoreksi = beta + deltaBeta; return(new double[] { 0, B, betaTerkoreksi }); }
public static double[] bujurEkliptik(double tau, double koreksiBujurB) { double l0 = 0; l0 += 175347046 * System.Math.Cos(0 + 0 * tau); l0 += 3341656 * System.Math.Cos(4.6692568 + 6283.07585 * tau); l0 += 34896 * System.Math.Cos(4.6261 + 12566.1517 * tau); l0 += 3497 * System.Math.Cos(2.7441 + 5753.3849 * tau); l0 += 3418 * System.Math.Cos(2.8289 + 3.5231 * tau); l0 += 3136 * System.Math.Cos(3.6277 + 77713.7715 * tau); l0 += 2676 * System.Math.Cos(4.4181 + 7860.4194 * tau); l0 += 2343 * System.Math.Cos(6.1352 + 3930.2097 * tau); l0 += 1324 * System.Math.Cos(0.7425 + 11506.7691 * tau); l0 += 1273 * System.Math.Cos(2.0371 + 529.691 * tau); l0 += 1199 * System.Math.Cos(1.1096 + 1577.3435 * tau); l0 += 990 * System.Math.Cos(5.233 + 5884.927 * tau); l0 += 902 * System.Math.Cos(2.045 + 26.298 * tau); l0 += 857 * System.Math.Cos(3.508 + 398.149 * tau); l0 += 780 * System.Math.Cos(1.179 + 5223.694 * tau); l0 += 753 * System.Math.Cos(2.533 + 5507.553 * tau); l0 += 505 * System.Math.Cos(4.583 + 18849.228 * tau); l0 += 492 * System.Math.Cos(4.205 + 775.523 * tau); l0 += 357 * System.Math.Cos(2.92 + 0.067 * tau); l0 += 317 * System.Math.Cos(5.849 + 11790.629 * tau); l0 += 284 * System.Math.Cos(1.899 + 796.298 * tau); l0 += 271 * System.Math.Cos(0.315 + 10977.079 * tau); l0 += 243 * System.Math.Cos(0.345 + 5486.778 * tau); l0 += 206 * System.Math.Cos(4.806 + 2544.314 * tau); l0 += 205 * System.Math.Cos(1.869 + 5573.143 * tau); l0 += 202 * System.Math.Cos(2.458 + 6069.777 * tau); l0 += 156 * System.Math.Cos(0.833 + 213.299 * tau); l0 += 132 * System.Math.Cos(3.411 + 2942.463 * tau); l0 += 126 * System.Math.Cos(1.083 + 20.775 * tau); l0 += 115 * System.Math.Cos(0.645 + 0.98 * tau); l0 += 103 * System.Math.Cos(0.636 + 4694.003 * tau); l0 += 102 * System.Math.Cos(0.976 + 15720.839 * tau); l0 += 102 * System.Math.Cos(4.267 + 7.114 * tau); l0 += 99 * System.Math.Cos(6.21 + 2146.17 * tau); l0 += 98 * System.Math.Cos(0.68 + 155.42 * tau); l0 += 86 * System.Math.Cos(5.98 + 161000.69 * tau); l0 += 85 * System.Math.Cos(1.3 + 6275.96 * tau); l0 += 85 * System.Math.Cos(3.67 + 71430.7 * tau); l0 += 80 * System.Math.Cos(1.81 + 17260 * tau); l0 += 79 * System.Math.Cos(3.04 + 12036.46 * tau); l0 += 75 * System.Math.Cos(1.76 + 5088.63 * tau); l0 += 74 * System.Math.Cos(3.5 + 3154.69 * tau); l0 += 74 * System.Math.Cos(4.68 + 801.82 * tau); l0 += 70 * System.Math.Cos(0.83 + 9437.76 * tau); l0 += 62 * System.Math.Cos(3.98 + 8827.39 * tau); l0 += 61 * System.Math.Cos(1.82 + 7084.9 * tau); l0 += 57 * System.Math.Cos(2.78 + 6286.6 * tau); l0 += 56 * System.Math.Cos(4.39 + 14143.5 * tau); l0 += 56 * System.Math.Cos(3.47 + 6279.55 * tau); l0 += 52 * System.Math.Cos(0.19 + 12139.55 * tau); l0 += 52 * System.Math.Cos(1.33 + 1748.02 * tau); l0 += 51 * System.Math.Cos(0.28 + 5856.48 * tau); l0 += 49 * System.Math.Cos(0.49 + 1194.45 * tau); l0 += 41 * System.Math.Cos(5.37 + 8429.24 * tau); l0 += 41 * System.Math.Cos(2.4 + 19651.05 * tau); l0 += 39 * System.Math.Cos(6.17 + 10447.39 * tau); l0 += 37 * System.Math.Cos(6.04 + 10213.29 * tau); l0 += 37 * System.Math.Cos(2.57 + 1059.38 * tau); l0 += 36 * System.Math.Cos(1.71 + 2352.87 * tau); l0 += 36 * System.Math.Cos(1.78 + 6812.77 * tau); l0 += 33 * System.Math.Cos(0.59 + 17789.85 * tau); l0 += 30 * System.Math.Cos(0.44 + 83996.85 * tau); l0 += 30 * System.Math.Cos(2.74 + 1349.87 * tau); l0 += 25 * System.Math.Cos(3.16 + 4690.48 * tau); double l1 = 0; l1 += 628331966747L * System.Math.Cos(0 + 0 * tau); l1 += 206059 * System.Math.Cos(2.678235 + 6283.07585 * tau); l1 += 4303 * System.Math.Cos(2.6351 + 12566.1517 * tau); l1 += 425 * System.Math.Cos(1.59 + 3.523 * tau); l1 += 119 * System.Math.Cos(5.796 + 26.298 * tau); l1 += 109 * System.Math.Cos(2.966 + 1577.344 * tau); l1 += 93 * System.Math.Cos(2.59 + 18849.23 * tau); l1 += 72 * System.Math.Cos(1.14 + 529.69 * tau); l1 += 68 * System.Math.Cos(1.87 + 398.15 * tau); l1 += 67 * System.Math.Cos(4.41 + 5507.55 * tau); l1 += 59 * System.Math.Cos(2.89 + 5223.69 * tau); l1 += 56 * System.Math.Cos(2.17 + 155.42 * tau); l1 += 45 * System.Math.Cos(0.4 + 796.3 * tau); l1 += 36 * System.Math.Cos(0.47 + 775.52 * tau); l1 += 29 * System.Math.Cos(2.65 + 7.11 * tau); l1 += 21 * System.Math.Cos(5.34 + 0.98 * tau); l1 += 19 * System.Math.Cos(1.85 + 5486.78 * tau); l1 += 19 * System.Math.Cos(4.97 + 213.3 * tau); l1 += 17 * System.Math.Cos(2.99 + 6275.96 * tau); l1 += 16 * System.Math.Cos(0.03 + 2544.31 * tau); l1 += 16 * System.Math.Cos(1.43 + 2146.17 * tau); l1 += 15 * System.Math.Cos(1.21 + 10977.08 * tau); l1 += 12 * System.Math.Cos(2.83 + 1748.02 * tau); l1 += 12 * System.Math.Cos(3.26 + 5088.63 * tau); l1 += 12 * System.Math.Cos(5.27 + 1194.45 * tau); l1 += 12 * System.Math.Cos(2.08 + 4694 * tau); l1 += 11 * System.Math.Cos(0.77 + 553.57 * tau); l1 += 10 * System.Math.Cos(1.3 + 6286.6 * tau); l1 += 10 * System.Math.Cos(4.24 + 1349.87 * tau); l1 += 9 * System.Math.Cos(2.7 + 242.73 * tau); l1 += 9 * System.Math.Cos(5.64 + 951.72 * tau); l1 += 8 * System.Math.Cos(5.3 + 2352.87 * tau); l1 += 6 * System.Math.Cos(2.65 + 9437.76 * tau); l1 += 6 * System.Math.Cos(4.67 + 4690.48 * tau); l1 *= tau; double l2 = 0; l2 += 52919 * System.Math.Cos(0 + 0 * tau); l2 += 8720 * System.Math.Cos(1.0721 + 6283.0758 * tau); l2 += 309 * System.Math.Cos(0.867 + 12566.152 * tau); l2 += 27 * System.Math.Cos(0.05 + 3.52 * tau); l2 += 16 * System.Math.Cos(5.19 + 26.3 * tau); l2 += 16 * System.Math.Cos(3.68 + 155.42 * tau); l2 += 10 * System.Math.Cos(0.76 + 18849 * tau); l2 += 9 * System.Math.Cos(2.06 + 77713.77 * tau); l2 += 7 * System.Math.Cos(0.83 + 775.52 * tau); l2 += 5 * System.Math.Cos(4.66 + 1577.34 * tau); l2 += 4 * System.Math.Cos(1.03 + 7.11 * tau); l2 += 4 * System.Math.Cos(3.44 + 5573.14 * tau); l2 += 3 * System.Math.Cos(5.14 + 796.3 * tau); l2 += 3 * System.Math.Cos(6.05 + 5507.55 * tau); l2 += 3 * System.Math.Cos(1.19 + 242.73 * tau); l2 += 3 * System.Math.Cos(6.12 + 529.69 * tau); l2 += 3 * System.Math.Cos(0.31 + 398.15 * tau); l2 += 3 * System.Math.Cos(2.28 + 553.57 * tau); l2 += 2 * System.Math.Cos(4.38 + 5223.69 * tau); l2 += 2 * System.Math.Cos(3.75 + 0.98 * tau); l2 *= tau * tau; double l3 = 0; l3 += 289 * System.Math.Cos(5.844 + 6283.076 * tau); l3 += 35 * System.Math.Cos(0 + 0 * tau); l3 += 17 * System.Math.Cos(5.49 + 12566.15 * tau); l3 += 3 * System.Math.Cos(5.2 + 155.42 * tau); l3 += 1 * System.Math.Cos(4.72 + 3.52 * tau); l3 += 1 * System.Math.Cos(5.3 + 18849.23 * tau); l3 += 1 * System.Math.Cos(5.97 + 242.73 * tau); l3 *= tau * tau * tau; double l4 = 0; l4 += 114 * System.Math.Cos(3.142 + 0 * tau); l4 += 8 * System.Math.Cos(4.13 + 6283.08 * tau); l4 += 1 * System.Math.Cos(3.84 + 12566.15 * tau); l4 *= tau * tau * tau * tau; double l5 = 0; l5 += 1 * System.Math.Cos(3.14 + 0 * tau); l5 *= tau * tau * tau * tau * tau; double l = (l0 + l1 + l2 + l3 + l4 + l5) / 100000000L; double l_d = Konversi.toDegrees(l) % 360; double theta = (l_d + 180) % 360; double lamdaM = (theta - 1.397 * koreksiBujurB - 0.00031 * koreksiBujurB * koreksiBujurB) % 360; double deltaTheta = -0.09033 / 3600; double thetaTerkoreksi = (theta + deltaTheta) % 360; return(new double[] { 0, l_d, theta, lamdaM, deltaTheta, thetaTerkoreksi }); }
public static double [] Meeus(double JD) { double JD_UT = JD; double delta_T = 0; //JDE waktu TD(Dynamical time) double jde = JD_UT + delta_T; double T_TD = (jde - 2451545) / 36525; double tau = T_TD / 10; double deltaPsi = Nutasi.deltaPsiDanEpsilon(T_TD)[2]; double epsilon = Nutasi.deltaPsiDanEpsilon(T_TD)[6]; double epsilon_r = Konversi.toRadians(epsilon); //Bulan //l1= bujur rata-rata bulan double L1 = (218.3164591 + 481267.88134236 * T_TD - 0.0013268 * T_TD * T_TD + T_TD * T_TD * T_TD / 538841 - T_TD * T_TD * T_TD * T_TD / 65194000) % 360; //elongasi rata2 bulan double d = tabelBulan.sukuPeriodik(T_TD, L1)[1]; //Anomali rata2 Matahari double m = tabelBulan.sukuPeriodik(T_TD, L1)[2]; //Anomali rata2 bulan double ma = tabelBulan.sukuPeriodik(T_TD, L1)[3]; //Argumen bujur bulan double f = tabelBulan.sukuPeriodik(T_TD, L1)[4]; //Eksentrisitas orbit double e = tabelBulan.sukuPeriodik(T_TD, L1)[5]; //Koreksi bujur bulan double koreksibujurB = tabelBulan.sukuPeriodik(T_TD, L1)[6]; double bujurB = (L1 + koreksibujurB) % 360; double bujurB_nampak = (bujurB + deltaPsi) % 360; if (bujurB_nampak < 0) { bujurB_nampak += 360; } double bujurB_nampak_r = Konversi.toRadians(bujurB_nampak); //Koreksi lintang bulan double lintangB = tabelBulan.sukuPeriodik(T_TD, L1)[7]; double lintangB_r = Konversi.toRadians(lintangB); //Koreksi jarak bumi-bulan double jarakBB = 385000.56 + tabelBulan.sukuPeriodik(T_TD, L1)[8]; double sudutParalaksB = Konversi.toDegrees(System.Math.Asin(6378.14 / jarakBB)); double sudutJariB = 358473400 / (jarakBB * 3600); double alphaBulan = (Konversi.toDegrees(System.Math.Atan2(System.Math.Sin(bujurB_nampak_r) * System.Math.Cos(epsilon_r) - System.Math.Tan(lintangB_r) * System.Math.Sin(epsilon_r), System.Math.Cos(bujurB_nampak_r)))) % 360; if (alphaBulan < 0) { alphaBulan = (alphaBulan + 360) % 360; } double alphaBulanPukul = alphaBulan / 15; double deltaBulan = Konversi.toDegrees(System.Math.Asin(System.Math.Sin(lintangB_r) * System.Math.Cos(epsilon_r) + System.Math.Cos(lintangB_r) * System.Math.Sin(epsilon_r) * System.Math.Sin(bujurB_nampak_r))); double deltaBulan_r = Konversi.toRadians(deltaBulan); //Matahari double L = tabelMatahari.bujurEkliptik(tau, koreksibujurB)[1]; double theta = tabelMatahari.bujurEkliptik(tau, koreksibujurB)[2]; double lambdaM = tabelMatahari.bujurEkliptik(tau, koreksibujurB)[3]; double lambdaM_r = Konversi.toRadians(lambdaM); double Delta_theta = tabelMatahari.bujurEkliptik(tau, koreksibujurB)[4]; double theta_terkoreksi = tabelMatahari.bujurEkliptik(tau, koreksibujurB)[5]; double jarakBumi_Matahari = tabelMatahari.jarakBumiMat(tau); double jarakBm_M = 149598000 * jarakBumi_Matahari; double lintangM = tabelMatahari.lintangEkliptikB(tau, lambdaM_r)[2]; double beta_M_r = Konversi.toRadians(lintangM / 3600); double koreksiAberasi = -20.4898 / (3600 * jarakBumi_Matahari); double bujurM_nampak = (theta_terkoreksi + deltaPsi + koreksiAberasi) % 360; if (bujurM_nampak < 0) { bujurM_nampak += 360; } double bujurM_nampak_r = Konversi.toRadians(bujurM_nampak); double sudutJariM = (959.63 / 3600) / jarakBumi_Matahari; double alphaMatahari = (Konversi.toDegrees(System.Math.Atan2(System.Math.Sin(bujurM_nampak_r) * System.Math.Cos(epsilon_r) - System.Math.Tan(beta_M_r) * System.Math.Sin(epsilon_r), System.Math.Cos(bujurM_nampak_r)))) % 360; if (alphaMatahari < 0) { alphaMatahari = (alphaMatahari + 360) % 360; } double alphaM_pukul = alphaMatahari / 15; double deltaMatahari = Konversi.toDegrees(System.Math.Asin(System.Math.Sin(beta_M_r) * System.Math.Cos(epsilon_r) + System.Math.Cos(beta_M_r) * System.Math.Sin(epsilon_r) * System.Math.Sin(bujurM_nampak_r))); double deltaM_r = Konversi.toRadians(deltaMatahari); double U = (JD - 2451545) / 36525; //bujur rata2 matahari double L0 = Konversi.toRadians((280.46607 + 36000.7698 * U) % 360); double EoT = (-1 * (1789 + 237 * U) * System.Math.Sin(L0) - (7146 - 62 * U) * System.Math.Cos(L0) + (9934 - 14 * U) * System.Math.Sin(2 * L0) - (29 + 5 * U) * System.Math.Cos(2 * L0) + (74 + 10 * U) * System.Math.Sin(3 * L0) + (320 - 4 * U) * System.Math.Cos(3 * L0) - 212 * System.Math.Sin(4 * L0)) / 1000; EoT /= 60; //jadikan menit double sudutFai = System.Math.Acos(System.Math.Sin(deltaBulan_r) * System.Math.Sin(deltaM_r) + System.Math.Cos(deltaBulan_r) * System.Math.Cos(deltaM_r) * System.Math.Cos(Konversi.toRadians(alphaBulan - alphaMatahari))); double sudutFase = System.Math.Atan2(jarakBm_M * System.Math.Sin(sudutFai), jarakBB - jarakBm_M * System.Math.Cos(sudutFai)); double sudutFase_d = Konversi.toDegrees(sudutFase); double iluminasiB = (1 + System.Math.Cos(sudutFase)) / 2; //menampilkan hasil //formatter jarak antara teks yang di print biar layoutnya rapi // String formatter ="%-8s%-15s%-15s%-15s%-15s%-15s%-15s%5s%n"; // System.out.println("\n"+"Data Matahari"); // System.out.printf(formatter,"Jam","Ecliptic","Ecliptic","Right","Apparent","Semi","Kemiringan","Equation"); // System.out.printf(formatter,"Gmt","Longitude","Latitude","Ascension","Declination","Diameter","(Epsilon)","of time"); // System.out.printf(formatter,(int)jam,desimal_ke_derajat(theta_terkoreksi)[1]+"\u00B0"+desimal_ke_derajat(theta_terkoreksi)[2]+"\u2032"+desimal_ke_derajat(theta_terkoreksi)[3]+"\u2033",(float)lintangM,desimal_ke_derajat(alphaMatahari)[1]+":"+desimal_ke_derajat(alphaMatahari)[2]+":"+desimal_ke_derajat(alphaMatahari)[3],desimal_ke_derajat(deltaMatahari)[1]+"\u00B0"+desimal_ke_derajat(deltaMatahari)[2]+"\u2032"+desimal_ke_derajat(deltaMatahari)[3]+"\u2033",desimal_ke_derajat(sudutJariM)[1]+"\u00B0"+desimal_ke_derajat(sudutJariM)[2]+"\u2032"+desimal_ke_derajat(sudutJariM)[3]+"\u2033",desimal_ke_derajat(epsilon)[1]+"\u00B0"+desimal_ke_derajat(epsilon)[2]+"\u2032"+desimal_ke_derajat(epsilon)[3]+"\u2033",desimal_ke_derajat(EoT)[1]+"\u00B0"+desimal_ke_derajat(EoT)[2]+"\u2032"+desimal_ke_derajat(EoT)[3]+"\u2033"); // // System.out.println("\n\n"+"Data Bulan"); // System.out.printf(formatter,"Jam","Apparent","Apparent","Right","Apparent","Semi","Horizontal","Iluminasi"); // System.out.printf(formatter,"Gmt","Longitude","Latitude","Ascension","Declination","Diameter","Parallax","Bulan"); // System.out.printf(formatter,(int)jam,desimal_ke_derajat(bujurB_nampak)[1]+"\u00B0"+desimal_ke_derajat(bujurB_nampak)[2]+"\u2032"+desimal_ke_derajat(bujurB_nampak)[3]+"\u2033",desimal_ke_derajat(lintangB)[1]+"\u00B0"+desimal_ke_derajat(lintangB)[2]+"\u2032"+desimal_ke_derajat(lintangB)[3]+"\u2033",desimal_ke_derajat(alphaBulan)[1]+":"+desimal_ke_derajat(alphaBulan)[2]+":"+desimal_ke_derajat(alphaBulan)[3],desimal_ke_derajat(deltaBulan)[1]+"\u00B0"+desimal_ke_derajat(deltaBulan)[2]+"\u2032"+desimal_ke_derajat(deltaBulan)[3]+"\u2033",desimal_ke_derajat(sudutJariB)[1]+"\u00B0"+desimal_ke_derajat(sudutJariB)[2]+"\u2032"+desimal_ke_derajat(sudutJariB)[3]+"\u2033",desimal_ke_derajat(sudutParalaksB)[1]+"\u00B0"+desimal_ke_derajat(sudutParalaksB)[2]+"\u2032"+desimal_ke_derajat(sudutParalaksB)[3]+"\u2033",String.format("%.7f", iluminasiB)); // indeks // 01 ekliptik long M // 02 ekliptik lat M // 03 Arekta M // 04 Deklinasi M // 05 sudut jariM // 06 kemiringanM // 07 Eot // 08 jarak mat-bumi // 09 ekliptik long B // 10 eklitik lat bulan // 11 A rekta B // 12 delinasi B // 13 sudutjari B // 14 sudut paralaks // 15 iluminasi B // 16 sudut fase // 17 jarak bumi-bulan return(new double[] { 0, theta_terkoreksi, lintangM, alphaMatahari, deltaMatahari, sudutJariM, epsilon, EoT, jarakBm_M, bujurB_nampak, lintangB, alphaBulan, deltaBulan, sudutJariB, sudutParalaksB, iluminasiB, sudutFase, jarakBB }); }