ryuphi / astrology-api

Astrology API Rest
GNU Affero General Public License v3.0
133 stars 47 forks source link

fix(houses): change calc base into utc to calc base into calendar day #16

Closed ryuphi closed 3 years ago

ryuphi commented 3 years ago

Previously, this implementation was using the recommended methods for dates based on Coordinated Universal Time (UTC) UTC and Julian day: swe_utc_time_zone(), swe_utc_to_jd(), swe_jdet_to_utc(), swe_jdut1_to_utc().

These functions are recommended more for hours obtained from clock. The problem with them is that for some calculations they deliver differences with other libraries that use swesseph. Due to standardization issues with other libraries and to avoid confusion, it was decided to replace the implementation to be able to use the dates based on the calendar day.

Also, the functions for calculating the position of the planets are also changed in order to use the functions with Ephemeris time (ET) and leave a little more coherence in the calculations and be closer to what other softwares deliver.

For more info see #15

Resolve #15