fix(solar-return): thread the birth second into the return instant (BUG-1267, upstream e4a6ac01)

This commit is contained in:
jesse-ux
2026-10-07 17:36:52 +08:00
parent eb739d4e6b
commit f02d27a73f
6 changed files with 65 additions and 3 deletions
+5 -1
View File
@@ -314,6 +314,7 @@ def calc_solar_return_chart(
return_lat: float | None = None,
return_lon: float | None = None,
return_tz: float | None = None,
birth_second: int = 0,
) -> Dict:
"""
计算太阳返照盘(Varshaphala)。
@@ -358,7 +359,7 @@ def calc_solar_return_chart(
'hint': '安装swisseph: pip install swisseph',
'solar_return_approx': _find_solar_return_approx(
_datetime_to_jd_ut(datetime(birth_year, birth_month, birth_day,
birth_hour, birth_minute, 0)),
birth_hour, birth_minute, birth_second)),
0, # birth_sun_lon unknown
target_year,
annual_tz,
@@ -372,6 +373,7 @@ def calc_solar_return_chart(
birth_hour, birth_minute,
birth_lat, birth_lon, birth_tz,
'mean',
second=birth_second,
ayanamsa_name=ayanamsa_name,
)
if birth_chart is None:
@@ -474,6 +476,7 @@ def solar_return_full_report(
return_lat: float | None = None,
return_lon: float | None = None,
return_tz: float | None = None,
birth_second: int = 0,
) -> Dict:
"""
太阳返照盘完整报告(Varshaphala 年运分析)。
@@ -503,6 +506,7 @@ def solar_return_full_report(
ayanamsa_name=ayanamsa_name,
local_timezone_id=local_timezone_id,
return_lat=return_lat, return_lon=return_lon, return_tz=return_tz,
birth_second=birth_second,
)
if 'error' in sr: