Accuracy of Solar Eclipse Calculation Algorithm Based on Jet Propulsion Laboratory Data Nasa

DE200 and DE405 are Development Ephemeris (DE) series released by the National Aeronautics and Space Administration (NASA) in 1981 and 1997. NASA uses DE405 to predict solar eclipses in 2011-2020. While before 2011 and after 2020 NASA uses VSOP87/ELP200 theory-based DE200. Why NASA not only use more updated series DE405 and still use old release DE200? What is the difference of DE200 accuracy compared to DE405 to predict solar eclipse? This needs to be researched because the solar eclipse predicted by NASA is used as a reference by the researchers. To answer this question, this paper proposes a solar eclipse computation algorithm based on DE200 and DE405 data and the results will be compared with the results of observations of the March 9, 2016, solar eclipse that have been carried out Langit Selatan to find out a more accurate DE series. The results of this study indicate that the DE200 series is more accurate than DE405 with an average difference of 0.5 0.6 seconds with the results of observations.


Introduction
High precision Sun and Moon ephemeris 1 data is needed for calculations in astronomy, for example determining the exact solar eclipse prayer time 2 in accordance with the guidance of the Shari'a and determining the beginning of the Islamic month. Because the time of its implementation is closely related to the regularity of the positions and movements of the two celestial bodies 3 . Associated with the need for a high degree of accuracy, Jean Meeus said that accuracy is needed in the calculation of conjunctions because of the thin disk of the two celestial objects observed when in conjunction position. Conjunction events for example occur in the phenomenon of the solar eclipse and every beginning of the Islamic month 4 . National Aeronautics and Space Administration (NASA) through one of its divisions, Jet Propulsion Laboratory (JPL) 5 , has released several Development Ephemeris (DE) 6 series to support various astronomical expedition missions. 1 Ephemeris which in Arabic is called zij is a table that contains astronomical data on celestial bodies. Susiknan Azhari, Ensiklopedi Hisab Rukyat (Yogyakarta: Pustaka Pelajar, 2012), 61-62. 2 In determining the time of the eclipse prayer, the Prophet gave a signal by saying "When you see an eclipse then recite (prayer) until both of them recover". Muslim bin Al-Ḥajjāj, Ṣaḥīḥ Muslim (Libanon: Dār al-Fikr, 1992), 397-398.
The scholars agree that one of the legal requirements for prayer is knowing when to enter the prayer time. Abi Yahya Zakariya asserted that whoever performs the prayer without knowing the time, the prayer is invalid even if he performs it on time. Abī Yaḥyā Zakariya, Fatḥ Al-Wahhāb, I (Semarang: Usaha Keluarga, n.d.), 48. More details Ibn Ali Nawawy added that the beginning of the solar eclipse prayer time began when there was a change in the shape of the Sun because it was covered by the Moon disc (first contact) while the solar eclipse prayer time ended when the Sun had recovered as before (the last contact) or the Sun had set even though it was still in a state eclipse. Muḥammad bin 'Amr bin 'Alī Nawawy, Nihāyah n.d.),110. 3 Hendro Setyanto, Membaca Langit (Jakarta: al-Ghuraba, 2008), 45. 4 Jean Meeus, Astronomical Algorithms (Richmond: Willmann-Bell, Inc., 1991), 15. 5 NASA's Jet Propulsion Laboratory (JPL) is a division at Caltech (California Institute of Technology) Southern California, Boulevard, Pasadena, California, United States which is the center of research and exploration of the solar system, including covering the Earth and its atmosphere. See: NASA, 'Jet Propulsion Laboratory ', n.d. 6 In JPL there is a Solar System Dynamics (SSD) research group whose products and services provided are planetary, satellite, cometic and asteroidal ephemeris data. See: NASA, 'About JPL Solar System Dynamics', n.d.

Accuracy of Solar Eclipse …
AL-AHKAM Vol 30 No. 1, April 2020 ║ 97 Among these was DE200 7 which later became the basis for the emergence of the VSOP82 8 theory which in its development was further developed into VSOP87 9 . DE200 is also the basis for the emergence of ELP2000 10 theory. In the next development JPL also released DE405 11 which was then used as a database to release solar eclipse predictions for the period of 2011 -2020 12 . While before 2011 13 and after 2020 14 , NASA used VSOP87 and ELP2000 theories based on DE200. Why does NASA keep using DE200 (implemented in VSOP87 / ELP2000) while a more updated series, DE405, has been released? How does DE200's accuracy compare with DE405 to predict the phenomenon of a solar eclipse?
This study is important because so far the predicted solar eclipse released by NASA is often used as a reference benchmark for the accuracy of the astronomical calculations of several studies and astronomical books. On the other hand, existing studies of NASA's solar eclipse calculation algorithm based on data have not been exhaustive and only describe the flow of the use of applications developed by NASA to predict solar eclipses. For example Siti Lailatul Mukaromah 18 in her study only explained how to use the javascript application developed by NASA that can be accessed at https://eclipse.gsfc. nasa.gov/JSEX/JSEX-AS.html without explaining the algorithm used in the application because it is indeed in the application does not describe anything related to the calculation algorithm but only the flow of application usage. For this reason, this study exists to reveal in detail the algorithm used by NASA in computing ephemeris data which was further developed by the author for the purposes of NASA data-based solar eclipse computing.
Before comparing the accuracy of the two DE series, this paper will describe the algorithm of each DE series to produce the ephemeris data needed in the calculation of total solar eclipse or ring solar eclipse ie the time of partial solar eclipse (first contact), the beginning of total solar eclipse (second contact), middle of the eclipse, end of the total solar eclipse (third contact) and end of the

Algorithm of Ephemeris Data Calculation Based on JPL NASA
This section will describe the algorithm for obtaining ephemeris data from data files of the American Standard Code for Information Interchange (ASCII) Development Ephemeris (DE) of certain series released by NASA JPL which generally takes 3 (three) steps: (1) obtain ASCII ephemeris data files; (2) convert the ASCII file to binary format; and (3) reading binary data files to obtain ephemeris data on celestial objects (in this case Sun and Moon ephemeris data). The ephemeris data will be processed with certain algorithms so the prediction of solar eclipses based on NASA's JPL ephemeris data can be obtained in this study. These three steps are described in more detail below.

Obtain ASCII Ephemeris Data Files
There are two ways to obtain NASA's JPL ASCII ephemeris data files. First by buying the Planetary and Lunar Ephemerides JPL CD-ROM provided by Willmann-Bell, Inc. through the internet at the address www.willbell.com/ software/jpl.htm. The CD-ROM contains files DE200, DE405 and DE406.
Second, by downloading directly on the FTP server (file transfer protocol) that has been provided by NASA's JPL at ftp://ssd.jpl.nasa.gov/pub/eph/ planets/ascii. On the server there are directories for each DE series. For example DE200 data files can be downloaded at ftp://ssd.jpl.nasa.gov/pub/eph/ planets/ascii/de200/, DE405 data files can be downloaded at ftp://ssd.jpl. nasa.gov/pub/eph/planets/ascii/de405/ and so on. Within each of these folders there are three groups of files, namely the header.xxx file, the tespo.xxx AL-AHKAM 100 ║ Vol 30, No 1, April 2020 file and the ASCII data file which are broken up into several files whose number and size varies between one DE data series and another.

Convert ASCII Files to Binary Format
The first step to process the ASCII ephemeris data file is to convert it to binary format. The ASC2EPH program written by Paul J. Heafner can be used to do this 21 .
Before doing the conversion, the ASC2EPH file written in C is compiled first so that it becomes an executable file. In this case the computer and compiler specifications used in this study are Acer TravelMate P243 Notebook with Core i3-3110M 2.4GHz, 6 Giga Byte RAM, 500 Giga Byte Hard Drive, Astro 3 (Juno) Distro Operating System based on Debian Linux and GNU C Compiler (gcc) as c compiler.
The functions used by the asc2eph.c file are provided by other files, namely astrolib.h and support.h as well as the default gcc compiler library file. So to make it easier to compile the asc2eph.c file, compile commands are collected together in the makefile.unx 22 file which can then be easily called by the make command in the linux operating system. The command syntax is: Where the -f option is a command to read the file "makefile.unx" included in the command.
The command will produce an executable file named asc2eph that is ready to be used to convert ASCII files to binary files.
./asc2eph -i:ascp2000.405 -o:de405_2000.bin This command will convert the ASCII ascp2000.405 file as input into the de405_2000.bin binary file that is ready to read with other programs to generate DE405-based ephemeris data. The same steps can be done for other DE series. In this study the DE series to be used is the DE200 and DE405 series.
Furthermore, the general algorithm of the asc2eph program is that the program will read the ASCII input data file inputted by the user. If successful, the program will then look for the HEADER.xxx file in the same folder and in 21 The source code can also be seen at: Paul J. Heafner, Fundamental Ephemeris Computations for Use with JPL Data (Virginia: Willmann-Bell, Inc., 1999),190-203. 22 The contents of the file can be seen: Heafner, 310-312.

Accuracy of Solar Eclipse …
AL-AHKAM Vol 30 No. 1, April 2020 ║ 101 accordance with the series of data entered by the user. For example the input data file is DE405 series (example: ascp2000.405) then the program will look for the HEADER.405 file. If the HEADER.405 file is not found, the program stops. But if the file is found, then proceed to the next procedure which is reading the file HEADER.405.
The process of reading the HEADER.405 file by this program is to read sequentially starting from KSIZE up to all existing GROUP (starting from GROUP 1010 to GROUP 1070) and parsing all constants in each GROUP. After completion, the program will read the ASCII data file (example: ascp2000.405) which contains constants that are continuations of GROUP 1070 located in the HEADER.405 file.
Data that is successfully read by the program from the HEADER.405 file and the ascp2000.405 file is then entered in a binary file whose name matches what was entered by the user (in this case, de405_2000.bin). So, the binary file contains data from the HEADER.405 file at the top of the file and continues the data file taken from the ascp2000.405 file 23 .

Reading Binary Data Files to Obtain Sun and Moon Ephemeris Data
Ephemeris data obtained in the reading process of this binary data file are not all ephemeris data but only some data is needed in the process of comparing the accuracy of several DE series with the case of solar eclipse calculation which will be discussed in the next sub-chapter. The binary files read in this study are the DE200 and DE405 series.
Ephemeris data generated in this study is the ephemeris data of the Sun and Moon which includes ecliptic longitude, ecliptic latitude, apparent right ascension, apparent declination, true geocentric distance, semi diameter. For the Sun ephemeris data, true obliquity and equation of time data are also produced, while for the Moon data, horizontal parallax data is produced.
The reading of this data is carried out by the Sephem program (Small Ephemeris Program). This sephem program is a frontend in the ephemeris data reading process. This means that this file relies on procedures contained in other files as file dependencies. The files are astrocon.h, support.h, support.c, astrolib.h and astrolib.c. 23 Summarized from the source code file asc2eph.c in : Heafner,[190][191][192][193][194][195][196][197][198][199][200][201][202][203]. Each of these files handles some of the procedures contained in the file sephem which are described as follows. The astrocon.h file contains constants and basic commands for unit conversions. For example D2R which functions to change the unit of degrees to radians. The support.h file contains prototypes of some basic text handling functions whose detailed instructions are inside the support.c file.
For example in support.h there is a prototype function to cut text from the left as follows: The core of the algorithm for obtaining NASA JPL-based ephemeris data is in the astrolib.h and astrolib.c files. Where the astrolib.h file contains a prototype of a function whose detailed contents are written in the astrolib.c file which then by the sephem program these functions are called to obtain ephemeris data.
In detail the algorithm of the sephem program is described as follows. First when it is run, the program will request input binary files (e.g. de405_2000.bin) as a database to generate ephemeris data. Furthermore, the contents of the binary file are read by the ephopn 24 function and the results are stored in memory as data for the next process, but if the input binary file is not found, the program will stop.
if (ephopn(InFile) == NULL) {LogMsg(stderr, "An error occurred in ephopn().\n"); LogClose();exit(1);} Then the program will ask for input date, month, year and time in UT. The input is then converted to time in JDE format by the Cal2JED function. Cal2JED(month,day,year,utc,4,utc,utc,0,&TDB); After obtaining time in JED, the user is faced with two choices, namely the 'Ephemeris' menu to generate Sun and Moon ephemeris data. The second menu is the 'Solar Eclipse' menu to generate topocentric solar eclipse predictions. This second menu was developed in this research as a tool to test the accuracy of ephemeris data generated from this sephem program. 24 Detailed contents of the ephopn function command and other functions that will be discussed in the next description can be seen in the astrolib.c file in: Heafner, 204-262.

AL-AHKAM
Vol 30 No. 1, April 2020 ║ 103 The 'Ephemeris' menu option will take the user to the next choice: the 'Sun' menu option to generate Sun ephemeris data and the 'Moon' option for the Moon ephemeris data.
The ephemeris data interval that is generated can be in hour intervals like the format in the book Ephemeris Hisab Rukyat Ministry of Religion of the Republic of Indonesia, the minute and second intervals according to the choices inputted by the user on the menu that appears after the user selects the Sun or Moon menu. This means that the ephemeris data released from this sephem program can be used by other calculation algorithms, for example solar and lunar eclipse calculations with the Ministry of Religion algorithm.
The following details the algorithm and source code of the ephemeris data generated by the sephem program.
The source code calls the 'reduce' function which functions to reduce the ephemeris data source so that it becomes apparent and topocentric ephemeris. The parameters needed by the 'reduce' function are the time in JED, the target for the object of the celestial object that is reduced and p3 for the array of position vectors of a particular object.
The output from the 'reduce' function is then used for the process of finding the value of r (distance of heavenly objects from the Earth), 'right ascension' value and 'declination' value. The value of r is formulated with: Where the indexes 0, 1 and 2, respectively, are the vector position x, y and z of the object to be reduced.
'Right ascension' is the tan value from the ratio of vectors y and x in radians which is then converted to the hour format with the R2H (radians to hours) function. While 'declination' is the sin value from the comparison of z and r vectors in units of radians which is then converted in the degree format with the function R2D (radians to Degree).
After the RA, Dec and r values are obtained, these values are used as parameters for the transformation to ecliptic coordinates with the following source code. First the RA, Dec values are changed in units of radians then each of them is entered in array r1. Then the polar coordinates r1 are changed to rectangular coordinates and then accommodated in r2 with the Pol2Rec (polar to rectangular) function. Before the transformation from equatorial coordinates to ecliptic, we need one more variable, namely true obliquity (TrueEps). So it is called the Obliquity function. After the r2 and TrueEps values are obtained then the transformation process is performed with the Eq2Ecl (equatorial to ecliptic) function in the rectangular coordinate format. To change it in polar coordinates, we call the Rec2Pol (rectangular to polar) function. Finally, lambda (ecliptic longitude) is the 0 th index of r2 and beta (ecliptic latitude) is the 1 st index of r2.

Solar Eclipse Calculation Algorithm Based on JPL Data NASA
From the illustration in Figure 1 (middle) it can be mathematically modeled that the peak of a total solar eclipse occurs when the ecliptic longitude of the Sun and Moon and the ecliptic latitude of the Sun and Moon have the same value. In other words, the peak of a total or annular solar eclipse will occur when the Sun-Moon ecliptic longitude difference is zero and the Sun-Moon ecliptic latitude is also zero. At that time the angle formed between the Sun and the Moon viewed from Earth (the elongation angle) reaches the smallest value. So by looking for the smallest elongation angle value from the beginning to the end of the solar eclipse time, it can be seen when the total or annular peak solar eclipse occurs. While the beginning of a partial eclipse (contact 1) and the beginning of a partial eclipse (contact 4, last contact) occur when the absolute value of the difference between the ecliptic longitude of the Sun and Moon is equal to 31' 31".52 (see Figure 1 right  Furthermore, by tracking the difference in ecliptic longitude of the Sun and Moon that meet the value before the peak of the eclipse will be obtained when the first contact occurs. The same thing is done to find the time of the last contact, the difference is the tracking process is done after the peak of the eclipse. The following snippet of the tracking process command in C language is implemented in the sephem program above. In order, the source code will look for the smallest elongation value and the time it occurred to determine when the eclipse peak (lines 1 to 11). In the next tracking process the first contact time is sought, when the absolute value of the ecliptic longitude (delta_Longitude) is smaller or equal to the number of semidiameters of the Sun and Moon (lines 13 to 15). Likewise, the last contact time was found when the absolute value of the ecliptic longitude (delta_Longitude) was greater or equal to the number of semi-diameters of the Sun and Moon (lines 17 to 20). In the source code is also carried out the tracking process to predict contact time 2 and contact 4 (lines 23 to 30). If the ecliptic longitude difference of the Sun and Moon meets certain predetermined values and this occurs before the peak of the gerhanana, then the time is determined as the start of contact 2 (lines 23-25). However, if the ecliptic longitude difference of the Sun and Moon is found after the peak of the eclipse then that is an early indication of contact 3 (lines 28-30).
From the source code it can be seen that the ephemeris data needed for the calculation of the total eclipse of the Sun or ring is the elongation angle, the difference in longitude of the Sun and Moon and the number of semi-diameters of the Sun and Moon and the difference in the semi-diameter of the Sun and Moon.
The elongation angle can be calculated with the following formula from Jean To obtain the elongation angle values, 4 (four) Sun and Moon ephemeris data are needed in equatorial coordinates, namely the right askensio of the Sun and Moon (RA) and the declination of the Sun and Moon (DEC). The four data 28  After the RA, Dec and r values are obtained, these values are used as parameters for the transformation to ecliptic coordinates with the following source code 31 .

Accuracy of Solar Eclipse …
AL-AHKAM Vol 30 No. 1, April 2020 ║ 109 So the algorithm offered in this paper for determining the peak time of an eclipse, the beginning and end of an eclipse both partial and total eclipses or annular eclipse begins with converting DE200 and DE405 data files into binary files. The binary file is then processed to obtain RA, Dec and r values for the Sun-Moon. With RA and Dec values, elongation angle values and lambda and beta values can be obtained. While the value of r can be determined by the semidiameter value of the Sun-Moon.
After obtaining the elongation angle value, longitude (lambda) of the Sun -Moon and semi-diameter of the Sun -Moon, then the absolute value of the Sun-Moon difference is calculated and the number and difference of the semidiamter difference of the Sun -Moon as parameters for determining contact 1, contact 2, contact 3 and contact 4 in a total solar eclipse or ring as previously described. So finally the prediction of several important contacts in the total solar eclipse or the ring is ready to be used as a tool to compare the accuracy of the database used (DE200 and DE405) in the process of calculating the prediction.

Comparison of DE200 and DE405 Series Accuracy
Before comparing the solar eclipse computation results from the sephem program with the observational results, the following is described the 'Langit Selatan ' observation data which was also reported by LAPAN for the total solar eclipse that occurred on March 9, 2016 with the location at SMKN 1 Maba Halmahera with coordinates 0.691482N 128.219721E and the height of the place 114 meters 33 .
In observing the March 9, 2016 solar eclipse in Maba there were activities carried out by two teams, namely the LAPAN and NASA teams conducted at the City Hall -Jiko Mobon Square, as well as the 'Langit Selatan ' team that made observations from SMK 1 Maba on Jl. Poros Soagimalaha Maba Soagimalaha Village Maba City Subdistrict East Halmahera Regency Maluku Province.
One consideration for choosing Halmahera as a location for observation is the height of the Sun during eclipse hours and weather patterns for the month. Its location overlooking the Pacific Ocean is one of the reasons for the selection of this place, because the potential for monitoring is more leverage because the AL-AHKAM 110 ║ Vol 30, No 1, April 2020 estimated totality of the longest eclipse and weather conditions are generally brighter than other places 34 .
The eclipse process starts from 08.37 to 11:23 East Indonesian Time (WIT), while GMT occurs for 3 minutes from 09.52 to 09.55 WIT. However, even though it was predicted to be sunny, the weather in Maba changed with the rain. This causes direct monitoring of GMT in Maba to be not optimal but important contacts can be recorded by the 'Langit Selatan ' team 35 .
The official website of 'Langit Selatan ' reports in detail the results of these observations. The contacts reported are as follows 36 : The results of the comparison between observations of 'Langit Selatan ' and prediction results based on the DE200 and DE405 series data can be seen in the following tables:  Table 1 shows that the DE200 series had a better difference than the DE405 series in all contacts tested. The difference between the two is 1.00 -2.00 seconds.

Accuracy of Solar Eclipse …
AL-AHKAM Vol 30 No. 1, April 2020 ║ 111 Meanwhile, when the ephemeris data interval was reduced to 0.1 seconds ( Table 2) the DE200 series still had a good difference compared to DE405 series in all contacts tested. The difference between the two is getting closer, that is 0.400 -2.600 seconds. Subsequent experiments with 0.01 second intervals (Table 3) showed that the DE200 series still consistently had a better difference than the DE405 series in all contacts tested. The difference between the two is getting closer namely 0.3907 -0.4608 seconds at the first contact and the middle of the eclipse, as well as at the second contact that is 1.020 seconds. But on the last contact the difference between the two enlarged to 0.510 seconds and the difference in the second contact remained stable at a difference of 2.600 seconds.   Table 4 shows the DE200 series still has a better difference than the DE405 series in all contacts tested. The difference between the two is stable at the first contact (0.390 seconds) and getting closer to the 3rd contact (2.440 seconds) and the 4th (0.500 seconds). While the difference between the eclipses in the middle of the difference between the two enlarged slightly from 0.460 seconds to 0.470 seconds, so also in the second contact from 1,020 seconds to 1.510 seconds compared to when the 0.01 second interval was used (Table 3). In the last experiment when the interval was reduced to 0.0001 seconds (Table 5) the DE200 series still had a good difference compared to DE405 series in all contacts tested. The difference between the two remains for the first contact time and the middle of the eclipse. The closer for the second contact (1.510 to 1.050 seconds) and the third contact (2.440 to 2.040 seconds) and the enlarged for the last contact (0.500 to 0.510 seconds). Furthermore, if the characteristics of the change in the difference between the DE200 and DE405 series are considered, for the first contact reference (Table 6) and the second (Table 7) the difference between the two continues to decrease at the interval that was tried in this study. While for the middle of the eclipse (Table 8) the difference between the two waned initially but the difference enlarged in the last two intervals (0.001 and 0.0001 seconds). Whereas for the 3rd contact time (Table 9) the difference between the two waned initially but the difference widened at the last three intervals (0.01, 0.001 and 0.0001 seconds). On the other hand, when the reference is the last contact time (Table 10), the difference between the two is very volatile. Initially the difference is large enough then shrink, enlarge and shrink back.
Better accuracy of DE200 compared to DE405 as shown in the comparison data above, it is not only important to use in the selection of better and more careful data in determining the last times of the solar eclipse prayer, but the determination of the middle eclipse time also has a close correlation choosing a more rigorous algorithm in determining the time of conjunction as a reference for the beginning of the Islamic month.
Regarding the recitation of the solar eclipse prayer, the Koran, 41: 37 hints as follows: And some of the signs of His greatness are night, day, Sun and Moon. Do not prostrate to the Sun and not (also) to the Moon, but prostrate to God who created it, if you only worship Him. According to Muḥammad al-Sharbinī 37 the verse is related to eclipse prayer. According to him the prohibition of worshiping the Sun and Moon in the verse and the command to worship God who created them was when an eclipse occurred. This he based on the hadith of the Prophet Muhammad: 38 Surely there was a solar eclipse in the time of the Prophet Muhammad. Then he stood up then bowled and then stood up again and bowled again then stood again then bowled twice in three rak'ahs and four prostrations.
When he finished praying, the Sun had recovered. When bowing he read "Allāh akbar" then bow. When he raised his head (i'tidāl) he said "sami'a Allāh li man ḥamidah". Then he stood up and praised Allah and said: "Surely the Sun and the Moon did not experience an eclipse because of death or life, but both are part of a sign of the greatness of God to give fear 37 Muḥammad Al-Sharbinī, Al-Iqnā ' Fī Ḥill Alfāẓ Abī Shujā',I,vol. I,n.d.,163. 38 Muslim bin Al-Ḥajjāj, Ṣaḥīḥ Muslim, 397-398.