The library provides the times of Sunrise, Sunset, Moon rise and Moon set, according to place and date.
It also provides the phase of the moon (equivalent to the day of the moon month).
The Sunrise and Sunset times vary according to the value of Zenith angle.
The following conventions are in use:
Official – 90.8333 (90° 50’)
Civil - 96°
Nautical - 102°
Astronomical - 108°
The values can be used by their names.
The library use the Official value as default, and it can be changed using the method Zenith.
No demo program as it is very simple to use.
Please report problems.
Edit: Version 1.1 corrected the following as per alfcen comments:
- no_rise or no_set time are returned as "--:--"
- sun rise and set times are within the 24 hours.
Edit: the files are updated to ver. 1.2 with additional methods which provide data about the sun and the moon, all by our astronomy expert alfcen:sign0188:
Edit: Ver 1.21 correction of rounding problem.
Edit: Ver 1.22 bug correction in sun + format change.
Edit: ver 1.23 bug correction in moon phase.
Edit: ver 1.4 added a method to calculate sun's position (azimuth and elevation).
It also provides the phase of the moon (equivalent to the day of the moon month).
The Sunrise and Sunset times vary according to the value of Zenith angle.
The following conventions are in use:
Official – 90.8333 (90° 50’)
Civil - 96°
Nautical - 102°
Astronomical - 108°
The values can be used by their names.
The library use the Official value as default, and it can be changed using the method Zenith.
No demo program as it is very simple to use.
Please report problems.
Edit: Version 1.1 corrected the following as per alfcen comments:
- no_rise or no_set time are returned as "--:--"
- sun rise and set times are within the 24 hours.
Edit: the files are updated to ver. 1.2 with additional methods which provide data about the sun and the moon, all by our astronomy expert alfcen:sign0188:
Edit: Ver 1.21 correction of rounding problem.
Edit: Ver 1.22 bug correction in sun + format change.
Edit: ver 1.23 bug correction in moon phase.
Edit: ver 1.4 added a method to calculate sun's position (azimuth and elevation).
Attachments
Last edited: