public ChineseCalendarService(ISolarCalendar solarCalendar, DateTime targetDate) { _solarCalendar = solarCalendar; _targetDate = targetDate; _currentSeasonAngle = Celestial.GetEclipticLongitude(targetDate); }
public void GetEclipticLongitude_Should_Return_Correct_Results() { _celestial.GetEclipticLongitude(1710693).Should().BeCloseTo(168.08719102714, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710694).Should().BeCloseTo(154.755365716082, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710695).Should().BeCloseTo(141.463254728984, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710696).Should().BeCloseTo(128.268162836368, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772755).Should().BeCloseTo(59.276089124806, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772756).Should().BeCloseTo(70.8982212421655, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772757).Should().BeCloseTo(82.3090362371512, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1132992).Should().BeCloseTo(95.3516217819625, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868191).Should().BeCloseTo(35.3086446106693, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868192).Should().BeCloseTo(22.4428920586289, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867492).Should().BeCloseTo(87.4807549325996, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867886).Should().BeCloseTo(156.157101234428, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867520).Should().BeCloseTo(67.5269642534404, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1844848).Should().BeCloseTo(154.486799638547, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710693).Should().BeCloseTo(168.08719102714, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710694).Should().BeCloseTo(154.755365716082, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710695).Should().BeCloseTo(141.463254728984, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710696).Should().BeCloseTo(128.268162836368, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772755).Should().BeCloseTo(59.276089124806, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772756).Should().BeCloseTo(70.8982212421655, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772757).Should().BeCloseTo(82.3090362371512, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1132992).Should().BeCloseTo(95.3516217819625, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868191).Should().BeCloseTo(35.3086446106693, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868192).Should().BeCloseTo(22.4428920586289, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867492).Should().BeCloseTo(87.4807549325996, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867886).Should().BeCloseTo(156.157101234428, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867520).Should().BeCloseTo(67.5269642534404, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1844848).Should().BeCloseTo(154.486799638547, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710693).Should().BeCloseTo(168.08719102714, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710694).Should().BeCloseTo(154.755365716082, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710695).Should().BeCloseTo(141.463254728984, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710696).Should().BeCloseTo(128.268162836368, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772755).Should().BeCloseTo(59.276089124806, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772756).Should().BeCloseTo(70.8982212421655, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772757).Should().BeCloseTo(82.3090362371512, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1132992).Should().BeCloseTo(95.3516217819625, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868191).Should().BeCloseTo(35.3086446106693, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868192).Should().BeCloseTo(22.4428920586289, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867492).Should().BeCloseTo(87.4807549325996, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867886).Should().BeCloseTo(156.157101234428, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867520).Should().BeCloseTo(67.5269642534404, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1844848).Should().BeCloseTo(154.486799638547, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710693).Should().BeCloseTo(168.08719102714, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710694).Should().BeCloseTo(154.755365716082, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710695).Should().BeCloseTo(141.463254728984, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710696).Should().BeCloseTo(128.268162836368, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772755).Should().BeCloseTo(59.276089124806, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772756).Should().BeCloseTo(70.8982212421655, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772757).Should().BeCloseTo(82.3090362371512, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1132992).Should().BeCloseTo(95.3516217819625, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868191).Should().BeCloseTo(35.3086446106693, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868192).Should().BeCloseTo(22.4428920586289, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867492).Should().BeCloseTo(87.4807549325996, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867886).Should().BeCloseTo(156.157101234428, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867520).Should().BeCloseTo(67.5269642534404, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1844848).Should().BeCloseTo(154.486799638547, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710693).Should().BeCloseTo(168.08719102714, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710694).Should().BeCloseTo(154.755365716082, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710695).Should().BeCloseTo(141.463254728984, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1710696).Should().BeCloseTo(128.268162836368, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772755).Should().BeCloseTo(59.276089124806, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772756).Should().BeCloseTo(70.8982212421655, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1772757).Should().BeCloseTo(82.3090362371512, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1132992).Should().BeCloseTo(95.3516217819625, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868191).Should().BeCloseTo(35.3086446106693, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1868192).Should().BeCloseTo(22.4428920586289, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867492).Should().BeCloseTo(87.4807549325996, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867886).Should().BeCloseTo(156.157101234428, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1867520).Should().BeCloseTo(67.5269642534404, MathHelper.Epsilon); _celestial.GetEclipticLongitude(1844848).Should().BeCloseTo(154.486799638547, MathHelper.Epsilon); }