giboow / mooncalc

JavaScript library for calculating moon position, phases and zodiac sign
BSD 3-Clause "New" or "Revised" License
39 stars 8 forks source link

Trajectory is wrong #1

Open vicesalles opened 8 years ago

vicesalles commented 8 years ago

Hi, the trajectory has nothing to do with the phase. The moon may stay in a crescent phase while in a descendent trajectory. I noted that you tie the trajectory with the phase and this is not correct.

gre commented 7 years ago

agreed.

i'm not an expert but, as this is related to the constellation, assuming the mooncalc formula is correct, maybe this is it:

function moonIsAscending (moon) {
  const { ecliptic: { longitude } } = moon;
  return longitude < 93.44 || longitude >= 271.26;
}