Chronocalc - Calculates the dates and times when the sun or moon is in a given position in the sky

Overview

Chronocalc

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 to calculate
  • Height (altitude) of the sun or moon
  • Direction (azimuth) of the sun or moon*

The script will pull the elevation information from an online source, and after this the script will iterate through a whole year, in 15 minute increments, and returns one of the following:

Sun

Two dates on either side of the solstice, where the given altitude and azimuth matches the closest to the calculated time. If it's not possible to find a match, there might me two possibilities:

  • The initial measurements are incorrect and the situation can't exist
  • The location is extrmely close to the equator, and the sun moves too fast for the 15 minute increment

If the latitude given is close to the equator, about 2 degrees or less off, you can use the --accurate option. This will change the calculation interval to 2 minutes, given a better chance to find a possible match. This will take longer to retrieve a result, but if there is a match, it should be shown.

Moon

To retrieve a list of dates where the moon is at a given position, use the optional argument --moon.

It will return all dates and times the moon is in the given position, and its illumination percentage. Since the moon can be in the same position multiple times a year, all dates that are within a are within a 2 degree limit of the altitude and azimuth are returned.

If there are no matches with the given parameter, it will return a message saying so. Change some variables, or check your findings, and run the script again. The --accurate argument has no use here.

Examples

To find the dates where the sun is in a given position:

python chronocalc.py -y 2020 -lat 50.9423 -lon 6.9579 -alt 32 -az 200

Result:

+---------------------------+----------+---------+
|       Date and time       | Altitude | Azimuth |
+---------------------------+----------+---------+
| 2020-03-08T14:00:00+01:00 |  32.08   |  202.87 |
| 2020-10-05T14:30:00+02:00 |  32.09   |  200.58 |
+---------------------------+----------+---------+

Find all the dates where the moon is at a given position in the sky:

python chronocalc.py -y 2018 -lat 50.9423 -lon 6.9579 -alt 30 -az 200 --moon

Result:

+---------------------------+----------+---------+--------------+
|       Date and time       | Altitude | Azimuth | Illumination |
+---------------------------+----------+---------+--------------+
| 2018-01-08T08:15:00+01:00 | 31.28    | 218.99  |    56.6%     |
| 2018-01-22T19:15:00+01:00 | 28.95    | 221.78  |    28.0%     |
| 2018-02-05T07:00:00+01:00 | 28.28    | 219.48  |    73.7%     |
| 2018-03-04T04:45:00+01:00 | 30.69    | 219.79  |    94.1%     |
| 2018-03-18T15:45:00+01:00 | 31.54    | 219.73  |     1.4%     |
| 2018-04-14T14:45:00+02:00 | 28.95    | 220.78  |     2.9%     |
| 2018-04-28T02:15:00+02:00 | 30.16    | 219.45  |    95.3%     |
| 2018-05-12T13:15:00+02:00 | 31.91    | 220.0   |    11.5%     |
| 2018-05-25T00:15:00+02:00 | 31.48    | 220.87  |    78.6%     |
| 2018-06-08T11:15:00+02:00 | 28.91    | 221.16  |    34.2%     |
| 2018-06-21T23:00:00+02:00 | 28.62    | 219.23  |    65.3%     |
| 2018-07-18T21:00:00+02:00 | 29.86    | 220.99  |    39.3%     |
| 2018-08-02T07:45:00+02:00 | 30.6     | 219.83  |    75.1%     |
| 2018-08-29T05:45:00+02:00 | 29.26    | 219.47  |    93.1%     |
| 2018-09-11T17:30:00+02:00 | 29.16    | 221.32  |     5.1%     |
| 2018-09-26T04:30:00+02:00 | 31.86    | 221.75  |    98.8%     |
| 2018-10-23T02:15:00+02:00 | 31.01    | 218.37  |    96.8%     |
| 2018-11-05T13:00:00+01:00 | 28.59    | 221.58  |     5.8%     |
| 2018-11-18T23:15:00+01:00 | 28.16    | 219.37  |    79.9%     |
| 2018-12-02T10:45:00+01:00 | 31.51    | 219.53  |    24.7%     |
| 2018-12-16T21:45:00+01:00 | 30.99    | 218.8   |    63.4%     |
+---------------------------+----------+---------+--------------+
A simple google translator telegram bot version 2

Translator-Bot-V2 A simple google translator telegram bot version 2 Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License

Fayas Noushad 15 Oct 21, 2022
Community-based extensions for the python-telegram-bot library.

Community-based extensions for the python-telegram-bot library. Table of contents Introduction Installing Getting help Contributing License Introducti

74 Dec 24, 2022
Simple Telegram bot to confess to your crush this Valentine's Day

Simple Telegram bot to confess to your crush this Valentine's Day! Steps pip install python-telegram-bot Register a Telegram bot & get the token by fo

3 Mar 18, 2022
Discord-Bot - Bot using nextcord for beginners

Discord-Bot Bot using nextcord for beginners! Requirements: 1 :- Install nextcord by typing "pip install nextcord" Thats it! You can use this code any

INFINITE_. 3 Jan 10, 2022
This package allows interactions with the BuyCoins API.

The BuyCoins Python library allows interactions with the BuyCoins API from applications written in Python.

Abdulazeez Abdulazeez Adeshina 45 May 23, 2022
This software's intent is to automate all activities related to manage Axie Infinity Scholars. It is specially aimed to mangers with large scholar roasters.

Axie Scholars Utilities This software's intent is to automate all activities related to manage Scholars. It is specially aimed to mangers with large s

Ferran Marin 153 Nov 16, 2022
A simple fun discord bot using discord.py that can post memes

A simple fun discord bot using discord.py * * Commands $commands - to see all commands $meme - for a random meme from the internet $cry - to make the

Dice Flip 2 Dec 20, 2021
A Telegram Bot to display Codeforces Contest Ranklist

CFRankListBot A bot that displays the top ranks for a Codeforces contest. Participants' Details All the details of a participant is in the utils/__ini

Code IIEST 5 Dec 25, 2021
A python bot that will allow you to have maximum luck during Veve drops.

VeveBot You can follow me here Github | Twitter Features: - Click on the purchase at the time of the drop. - Be able to choose to do more than one tes

Rodz 1 Dec 04, 2021
A wrapper to stream information from Twitter's Full-Archive Search Endpoint

A wrapper to stream information from Twitter's Full-Archive Search Endpoint. To exploit this library, one must have approved academic research access.

Daniela Pinto Veizaga 9 Nov 28, 2022
Discord spam bots with multiple account support and more

Discord spam bots with multiple account support and more. PLEASE READ EVERYTHING BEFORE WRITING AN ISSUE!! Server Messages Text Image Dm Messages Text

Mr. Nobody 6 Sep 14, 2022
Telegram Radio - A User-bot who continuously play random audio files (from the famous telegram music channel @mveargasm) in the intended voice chat.

MvEargasmDJ: This is my submission for the Telegram Radio Project of Baivaru. Which required a userbot to continiously play random audio files from th

eyaadh 24 Nov 12, 2022
Talon accessibility - Experimental Talon integrations using macOS accessibility APIs

talon_accessibility Experimental Talon integrations using macOS accessibility AP

Phil Cohen 11 Dec 23, 2022
Telegram vc - A bot that can play music on telegram group's voice call

Telegram Voice Chat Bot A bot that can play music on telegram group's voice call

1 Jan 02, 2022
A Python interface to AFL, allowing for easy injection of testcases and other functionality.

Fuzzer This module provides a Python wrapper for interacting with AFL (American Fuzzy Lop: http://lcamtuf.coredump.cx/afl/). It supports starting an A

Shellphish 614 Dec 26, 2022
Discord Custom Playing Status Redirecting

Discord-Custom-Playing-Status-Redirecting THINGS TO DO :- - Create an application from https://discord.com/developers/applications give it ur desired

WarLorD oP 1 Oct 30, 2021
Pancakeswap Sniper BOT - TORNADO CASH Proxy (MAC WINDOWS ANDROID LINUX) A fully decentralized protocol for private transactions

TORNADO CASH Proxy Pancakeswap Sniper BOT 2022-V1 (MAC WINDOWS ANDROID LINUX) ⭐️ A fully decentralized protocol for private transactions ⭐️ AUTO DOWNL

Crypto Trader 1 Jan 05, 2022
𝐀 𝐔𝐥𝐭𝐢𝐦𝐚𝐭𝐞 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐁𝐨𝐭 𝐅𝐨𝐫 𝐅𝐨𝐫𝐜𝐢𝐧𝐠 𝐘𝐨𝐮𝐫 𝐆𝐫𝐨𝐮𝐩 𝐌𝐞𝐦𝐛𝐞𝐫𝐬 𝐓𝐨 𝐒𝐮𝐛𝐬𝐜𝐫𝐢𝐛𝐞 𝐘𝐨𝐮𝐫 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐂𝐡𝐚𝐧𝐧𝐞𝐥

𝐇𝐨𝐰 𝐓𝐨 𝐃𝐞𝐩𝐥𝐨𝐲 For easiest way to deploy this Bot click on the below button 𝐌𝐚𝐝𝐞 𝐁𝐲 𝐒𝐮𝐩𝐩𝐨𝐫𝐭 𝐆𝐫𝐨𝐮𝐩 𝐒𝐨𝐮𝐫𝐜𝐞𝐬 𝐅𝐢𝐧𝐝

Mukesh Solanki 2 Jan 05, 2022
Quack-SMS-BOMBER - Quack Toolkit By IkigaiHack

Quack Toolkit By IkigaiHack About Quack Toolkit Quack Toolkit is a set of tools

Marcel 2 Aug 19, 2022
Declarative assertions for AWS

AWSsert AWSsert is a Python library providing declarative assertions about AWS resources to your tests. Installation Use the package manager pip to in

19 Jan 04, 2022