Open vicesalles opened 8 years ago
I'm wondering if this is due to the fact it only support day precision. when doing that: https://github.com/giboow/mooncalc/blob/master/mooncalc.js#L36-L38 it does not extract the remaining seconds of the day, so 2016-09-27T07:31:23.226Z
is same as asking 2016-09-27T00:00:00.000Z
.
@giboow do you know how to support a smaller granularity? I was thinking that in this formula: https://github.com/giboow/mooncalc/blob/master/mooncalc.js#L51 it could be something like :
dayExtraRatio = (((date.getHours()*60+date.getMinutes())*60+date.getSeconds())*1000+date.getMilliseconds()) / (24*60*60*1000);
jd = k1 + k2 + day + 59 + dayExtraRatio;
probably not. there is something wrong in the formula. it does not match what I can find in http://www.rustica.fr/jardiner-avec-la-lune/ for instance. is that universal whatever your position on earth is?
No, I think I have forget the latitude and longitude parameter. The main function must take in parameters the UTC date, latitude and longitude
I think the current version is correctly calculating in which constellation the moon is in but not in which astrological sign. The both are different things. Do you know from the moon ecliptic longitude how can I calculate the zodiac sign in which the moon is not the constellation?
Yes, I believe this is displaying constellation and not zodiac, which are different. For example, look at the dates for the moon's ingress and compare with the result from the module:
{
date: { year: 2020, month: 4, day: 5 },
age: 12.252542423921003,
distance: 361002.67988284124,
ecliptic: { latitude: 4.791179957445516, longitude: 159.08458603675138 },
phase: 'Waxing gibbous',
trajectory: 'ascendent',
constellation: 'Leo'
}
The site says that on April 4th the moon enters Virgo but mooncalc
returns Leo as the constellation.
You did a great job calculating the moon's zodiac for a given day but zodiac and constellation are not the same thing. For example, today: Date 2016-09-27T07:31:23.226Z the zodiac is, as you calculated Leo but the constellation is actually Cancer