Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zodiac Constellation #366

Open
Zemelia opened this issue Sep 22, 2024 · 3 comments
Open

Zodiac Constellation #366

Zemelia opened this issue Sep 22, 2024 · 3 comments

Comments

@Zemelia
Copy link

Zemelia commented Sep 22, 2024

Hi, trying to get current Zodiac sign based on current moon phase.
Using next lines:

const vec = GeoVector(Body.Moon, date, false);
const equ = EquatorFromVector(vec);
const constell = Constellation(equ.ra, equ.dec);

but together with standard 12 signs, also getting some like "Auriga". Also current zodiac's by date looks not accurate, maybe I'm using some wrong logic.
Would be very thankful for any advice. Thanks! :)

@cosinekitty
Copy link
Owner

Hi @Zemelia! What you are seeing is due to the Moon sometimes moving significantly north or south of the ecliptic plane, away from where all the zodiac constellations are located.

Ancient astrologers tended to ignore ecliptic latitudes of the Moon and planets. They would focus on ecliptic longitudes, as if projecting their shadows onto a plane.

They would often divide the 360 degrees of longitude into 12 equal bands of 30 degrees, which differs from the modern (1875 and after) constellation boundaries defined by the IAU; these boundaries are of all different sizes and shapes, not at all equal.

You may have better luck calculating ecliptic coordinates instead of equatorial, and taking a look at the longitudes thus obtained.

@Zemelia
Copy link
Author

Zemelia commented Sep 23, 2024

Hi @cosinekitty , first of all thank you for your great and titan work on this library, it's awesome! And thanks for answer :)
Acc. your answer, in context of ecliptic coordinates, so how could I use Constellation function as there I need ra and dec args?

Or just simply do like that?

  function getZodiacSign(lon: number) {
    const zodiacSigns = [
      'Aries',
      'Taurus',
      'Gemini',
      'Cancer',
      'Leo',
      'Virgo',
      'Libra',
      'Scorpio',
      'Sagittarius',
      'Capricorn',
      'Aquarius',
      'Pisces',
    ];

    const index = Math.floor(lon / 30);
    return zodiacSigns[index % 12];
  }
  const coords = EclipticGeoMoon(date);
  return getZodiacSign(coords.lon);

But it looks not so elegant, IMO :)

@cosinekitty
Copy link
Owner

Yes, your code example implements the idea I posed. Whether this idea is "correct" or useful is another matter; astrology isn't believable to me so I don't offer this as being "right" in any sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants