Calculates the dates and times when the sun or moon is in a given position in the sky
![](https://www.deeplearningdaily.com/wp-content/uploads/2021/12/calculates-the-dates-and-times-when-the-sun-or-moon-is-in-a-given-position-in-the-sky_61cf7f9c49d24-375x210.jpeg)
I wrote this script after I was busy updating my article on chronolocation, which can be found here.
It calculates the dates and times when the sun or moon is in a given position in the sky. It can be used during chronolocation tasks, to quickly find possible dates and times within a 15 minutes accuracy. For finding a more precise moment, one should use a tool like suncalc.org to find a closer match, or use the option --accurate
.
Installation
Install all the requirements first:
pip install -r requirements.txt
Or with the newest versions:
python3.8 -m pip install -r requirements.txt
Usage
To determine the date and time, you need to have the following information already:
- The exact latitude and longitude of the location
- The year you want