https://github.com/jobe3774/suntimes
A raspend based application serving the times for sunrise, sun's culmination and sunset.
https://github.com/jobe3774/suntimes
Last synced: 3 months ago
JSON representation
A raspend based application serving the times for sunrise, sun's culmination and sunset.
- Host: GitHub
- URL: https://github.com/jobe3774/suntimes
- Owner: jobe3774
- License: mit
- Created: 2019-10-21T20:17:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-26T21:35:02.000Z (over 5 years ago)
- Last Synced: 2025-01-30T12:32:19.061Z (5 months ago)
- Language: Python
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# suntimes
A [raspend](https://github.com/jobe3774/raspend) based application serving the times for sunrise, sun's culmination and sunset.Start the server:
```
$ python3 suntimes.py --port 8080
```
Then you can request the sun times for a given location at a given date:```
http://localhost:8080/cmd?name=SunTimes.calc&dateStr=2019-11-26&longitude=13.413215&latitude=52.521918&asISO=True
```
The above request delivers the sun times for Berlin on Nov. 26th 2019. All times returned are in UTC.``` json
{
"SunTimes": {
"Sunrise": "2019-11-26T06:46:00+00:00",
"Culmination": "2019-11-26T10:54:00+00:00",
"Sunset": "2019-11-26T15:01:00+00:00"
}
}
```The calculation is based on SunMoon.py by Michael Dalder, which in turn is a port of Arnold Barmettler's JavaScript. You can find both [here](https://lexikon.astronomie.info/java/sunmoon/).