Skip to content

feat(eclipse): add getSolarSarosNumber #238

@michealroberts

Description

@michealroberts

To calculate the saros and inex numbers of an eclipse in every eclipse season from 11,000 BC to AD 15,000 based on a given approximate date:

First, calculate the index of the eclipse season as:

const index = Math.floor((datetime + 2882.55) * 2.1074515 + 0.5);

where "datetime" is the number of Gregorian years since January 1, 1 BC in the proleptic Gregorian calendar.

Next, calculate how many times a five-month period separates two targeted eclipses using the formula:

const N5 = Math.floor(index / 7.62263 + 1.024 
        - Math.pow(index / 2.107452 / 17200, 2) 
        - Math.pow(index / 2.107452 / 22300, 3) 
        + 0.09 * Math.sin((index - 0.79) / 0.3354265));

The saros number for the eclipse is then:

const saros = 5 * index - 38 * N5;

and the inex number is:

const inex = 8 * index - 61 * N5;

To calculate the saros and inex numbers for a lunar eclipse near a given date, add nine years to the date and find the numbers for the solar eclipse half a saros later, then subtract 7 from the solar saros number to obtain the lunar saros number, and subtract 13 from the solar inex number to obtain the lunar inex number.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions