-
v0.1.0 Stable
released this
2026-05-01 23:01:01 +08:00 | 2 commits to master since this release中文
本次代码更新聚焦日月食、行星事件、恒星工具、通用轨道、日晷和轻量计算链路,同时整理了文档与测试基线。
重要行为变更:Zenith 天顶距语义修正
旧版中 Zenith 系列函数实际返回的是高度角。本版已修正为天顶距(Zenith = 90° - Altitude)。受影响的包:sun、moon、七大行星、star、orbit、lite/sun、lite/moon 及其 N 变体。
迁移要点:原先用 Zenith() 获取高度角的改为 Altitude();原先用 Zenith() > 0 判断地平线上方的改为 Altitude() > 0;原先手动计算 90 - Zenith() 的现在直接用 Zenith() 即可。
新增
- 日月食:全局/地方日食、中心线、偏食足迹;全局/地方月食;日食与月食 SVG;支持 NASA split-k 和 IAU single-k 半径口径;结果含沙罗周期信息
- 行星:合、冲、留、方照、大距事件;视直径、相位角、照明比例、亮肢位置角、视星等、轨道节点、物理星历
- 木星伽利略卫星:L1 星历位置、凌掩食影现象判定、接触事件搜索
- 太阳与月球:日面 P/B0/L0;月球地心/站心天平动、近远地点、最大赤纬、亮边位置角
- 恒星:9100+ 星表,支持中英文名/HR 查询、自行修正、星座判定、视差角、升落
- coord:黄道/赤道/地平/银道坐标变换、大气折射、大气质量、视差角、手动参数研究接口
- formula:黑体辐射、会合周期、星等、望远镜极限、恒星物理、大气质量等独立公式
- orbit:二体轨道传播、站心观测量、H-G 星等、相位几何、视双星位置角/角距
- sundial:真/平太阳时、时角、水平/赤道/垂直日晷与平面日晷几何
- lite/sun、lite/moon:轻量太阳/月球近似链路,面向资源受限环境,零堆分配
文档与测试
- README 重写,补充英文版,含可复制示例、输出对照、SVG 配图和精度说明
- 新增 NASA GSFC、JPL Horizons、IMCCE 等外部基线回归测试
- 新增语义回归测试,覆盖时区、天顶距、轻量链路、物理星历、沙罗周期等
English
This release adds eclipses, planetary events, stellar tools, generic orbit propagation, sundials, and lightweight computation chains, along with refreshed documentation and test baselines.
Breaking change: Zenith now returns zenith distance
Zenith functions previously returned altitude. They now return zenith distance (Zenith = 90° - Altitude). Affected packages: sun, moon, all seven planets, star, orbit, lite/sun, lite/moon, and their N
variants.To migrate: replace Zenith() with Altitude() where altitude was expected; use Altitude() > 0 instead of Zenith() > 0 for horizon checks; remove any 90 - Zenith() workarounds.
Added
- Eclipses: global/local solar eclipses with central paths and partial footprints; global/local lunar eclipses; SVG output for both; NASA split-k and IAU single-k radius conventions; Saros metadata in
results - Planets: conjunction, opposition, station, quadrature, and elongation events; apparent diameter, phase angle, illuminated fraction, bright-limb angle, apparent magnitude, orbital nodes, and physical
ephemerides - Jupiter Galilean satellites: L1 ephemeris positions, transit/occultation/eclipse/shadow phenomena, contact-event search
- Sun and Moon: solar P/B0/L0; lunar geocentric/topocentric libration, apsides, maximum declination, bright-limb angle
- Stars: embedded 9100+ star catalog with name/HR lookup, proper motion, constellation identification, parallactic angle, rise/set
- coord: ecliptic/equatorial/horizontal/Galactic transforms, refraction, airmass, parallactic angle, manual-parameter research helpers
- formula: standalone blackbody, synodic period, magnitude, telescope, stellar physics, and airmass formulas
- orbit: two-body propagation, topocentric observing quantities, H-G magnitude, phase geometry, visual-binary position angle/separation
- sundial: true/mean solar time, hour angle, horizontal/equatorial/vertical dials, general planar-dial geometry
- lite/sun, lite/moon: lightweight Sun/Moon approximation chains for resource-constrained environments, zero heap allocation
Documentation and tests
- Reworked README with an English translation, copyable examples, annotated output, SVG diagrams, and accuracy notes
- Added regression baselines against NASA GSFC, JPL Horizons, and IMCCE
- Added semantic regression tests covering time zones, zenith distance, lightweight chains, physical ephemerides, and Saros metadata
Downloads