PHP date_sunrise and date_sun_info give different results

I have a webcam and I wanted to display the sunrise time for the actual day. Therefore, for this purpose I used the date_sunrise function in PHP. In addition to coordinates, the zenith value of the sun is required as input.

I found out that the correct zenith for sunrise is 90.8333. 90 would be a theoretical angle to the center of the sun (i.e., on the horizon). To account for the diameter of the sun and refraction, 0.8333 is added (16 minutes of arc + 34 minutes of arc divided by 60).

But I noticed that this input gave different sunrise times to other sites. The most reliable source should be the U.S. Naval Observatory's Department of Astronomical Applications. See their online calculator and read the description of their method . He stated that they also use the Zenith value of 90.8333 to calculate sunrise.

Then I discovered that the php date_sun_info function, which is an array containing various data, gave the correct sunrise time (corresponding to the AAD results).

To achieve the same sunrise time with the date_sunrise function, I need to enter an anti-aircraft value of about 90.5.

Why does date_sunrise with zenith = 90.8333 not give the same result as date_sun_info?

+4
2

http://php.net/manual/en/function.date-sunrise.php Zenith (. ini_get())

.ini php.ini PHP. ( , , .ini ).

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333

, php.ini , / , . "90.8333".

, "sun_info" , . , , , .

:

+4

date_sunrise zenith = 90.8333 , date_sun_info?

. . date_sunrise :
altitude = 90 - zenith;

while date_sun_info :

-35.0/60

, ? , timelib_astro_rise_set_altitude, date_sunrise, date_sun_info, :

 *       altit = the altitude which the Sun should cross
 *               Set to -35/60 degrees for rise/set, -6 degrees
 *               for civil, -12 degrees for nautical and -18
 *               degrees for astronomical twilight.

, -35.0/60 (-0,83 ° -50 ). , , USNO AAD.

, date_sunrise ? . -, 90.583333, 90 - 90.583333 -35/60 == -.583333, , , . -, 90 - zenith , . , , , . , .

date_sun_info , .

+3

Source: https://habr.com/ru/post/1666500/


All Articles