-
v0.1.5-rc1 Pre-Release
released this
2026-06-09 19:37:52 +08:00 | 0 commits to master since this release• feat(calendar): 扩展先秦至秦汉古历支持
- 新增显式古历 API,支持先秦古历与秦汉颛顼历选择
- 将默认公农历转换范围扩展至 -721..3000
- 支持后九月解析、负年份干支日和古历法相符节气
- 补充秦汉、先秦、交接边界和节气回归测试
- 同步 README 古历与节气 API 说明
Downloads
-
v0.1.4 Stable
released this
2026-05-30 21:59:40 +08:00 | 1 commits to master since this release中文
主要变更
- 修复 moon.TrueRa / moon.TrueDec / moon.TrueRaDec 的月球地心真赤经、真赤纬口径,使其与公开 API 注释语义一致。
- 新增月球地心视赤经、视赤纬接口:moon.GeocentricApparentRa、moon.GeocentricApparentDec、moon.GeocentricApparentRaDec。
- 新增行星合月(赤经合)查询接口,支持水星、金星、火星、木星、土星、天王星、海王星:
moon.LastConjunctionWithPlanet、moon.NextConjunctionWithPlanet、moon.ClosestConjunctionWithPlanet。 - 修复合月、合日、冲日、留、大距、方照等天象事件 API 在事件边界附近可能重复返回同一事件的问题。
- 优化行星合月搜索在跨世纪、分支跳变和邻近事件场景下的稳定性。
- 统一公开 API 的中英双语注释结构,补齐 calendar、coord、formula、orbit、moon、sun、sundial、star 及各行星包的英文说明。
测试与基线
- 增加月球地心视赤经、视赤纬外部基线测试。
- 增加行星合月外部基线与跨世纪回归测试。
- 增加公开事件 API 的边界单调性测试,覆盖合月、内行星合日/大距/留、外行星合日/冲日/留/方照等场景。
English
Highlights
- Fixed the semantics of moon.TrueRa, moon.TrueDec, and moon.TrueRaDec so they now match the documented geocentric true right ascension and declination contract.
- Added Moon apparent geocentric equatorial APIs: moon.GeocentricApparentRa, moon.GeocentricApparentDec, and moon.GeocentricApparentRaDec.
- Added Moon-planet conjunction APIs for Mercury, Venus, Mars, Jupiter, Saturn, Uranus, and Neptune:
moon.LastConjunctionWithPlanet, moon.NextConjunctionWithPlanet, and moon.ClosestConjunctionWithPlanet. - Fixed event-boundary behavior for conjunctions, oppositions, stations, greatest elongations, quadratures, and Moon-planet conjunctions so Next APIs advance correctly near exact event times.
- Improved Moon-planet conjunction search stability across long time ranges, branch jumps, and near-event queries.
- Standardized bilingual public API comments across calendar, coord, formula, orbit, moon, sun, sundial, star, and planet packages.
Tests and Baselines
- Added external baseline tests for Moon apparent geocentric right ascension and declination.
- Added external Moon-planet conjunction baselines and cross-century regression coverage.
- Added public event-boundary monotonicity tests covering Moon-planet conjunctions, inner-planet conjunctions/elongations/stations, and outer-planet conjunctions/oppositions/stations/quadratures.
Downloads
-
v0.1.4-rc.2 Pre-Release
released this
2026-05-23 23:10:06 +08:00 | 2 commits to master since this releasefix: 修复天象事件 API 在事件边界附近的重复返回问题
- 修正合月、合日、留等Last/Next/Closest接口在精确命中和事件后秒级查询时仍返回当前事件的问题,避免应用侧枚举卡死
- 收紧事件边界判定,并补强水星、金星、火星近事件路径的稳定化,保证公开API的单调前进语义
- 补充公开wrapper、跨世纪样本和外部基线回归,覆盖合月邻近事件与边界场景
Downloads
-
v1.0.4-rc.1 Pre-Release
released this
2026-05-23 19:04:27 +08:00 | 3 commits to master since this releasefeat(moon): 新增行星合月查询并修正月球地心赤经赤纬接口
- 修正月球地心真/视赤经赤纬接口口径
- 新增月球与七大行星合月时刻查询
Downloads
-
v0.1.3 Stable
released this
2026-05-22 12:34:41 +08:00 | 4 commits to master since this release中文
- 修复七大行星事件计算中的边界与漏检问题,重点覆盖合日、冲日、留、东西方照、内行星大距等场景。
- 统一公开 API 在“精确事件时刻”的 Last/Next 语义,修复 UT/TT 比较口径不一致导致的边界跳轮问题。
- 内行星事件基线改为以 JPL Horizons 为准,NAOJ 作为辅助覆盖参考;外行星留点保留 JPL 参考数据,当前测试仍按既有口径约束。
- 重构行星视位置公共计算路径,补充光行时与视黄经/黄纬修正,并新增校验。
English
- Fixed boundary and missed-cycle issues in planetary event calculations, covering conjunctions, oppositions, stations, quadratures, and inner-planet greatest elongations.
- Normalized public Last/Next API behavior at exact event boundaries, fixing UT/TT comparison mismatches that could skip the current event cycle.
- Switched inner-planet event baselines to JPL Horizons as the authority, with NAOJ used as auxiliary coverage hints; outer-planet station JPL rows are retained as reference data while current tests keep the
existing station semantics. - Refactored the shared apparent-position path, including light-time and apparent ecliptic corrections, and added a small seven-planet Horizons apparent-coordinate fixture.
Downloads
-
v0.1.2 Stable
released this
2026-05-17 21:24:16 +08:00 | 5 commits to master since this release中文
Fixed
- 修复 TinyGo 编译到 wasm 时可能在
planet包初始化阶段报interp: unsupported fcmp的问题。 - 将
planetViews从包级初始化改为sync.Once懒加载,避免 TinyGo 在编译期解释大型float64星历表切片索引。 planet内部视图构建改为返回error,再由兼容层统一panic,避免懒加载初始化失败后留下未初始化缓存。- 补充无效行星数据切片边界测试。
English
Fixed
- Fixed a TinyGo wasm build failure that could report
interp: unsupported fcmpduringplanetpackage initialization. - Changed
planetViewsfrom package-level eager initialization tosync.Oncelazy initialization, avoiding TinyGo compile-time interpretation of largefloat64ephemeris table slicing. - Changed internal planet-view construction to return
error, with the compatibility layer still panicking on corrupted built-in data, avoiding an uninitialized cache after lazy initialization failure. - Added a test for invalid planet-data slice boundaries.
Downloads
- 修复 TinyGo 编译到 wasm 时可能在
-
v0.1.1 Stable
released this
2026-05-03 20:12:20 +08:00 | 6 commits to master since this release中文
Added
- 新增水星、金星地心凌日查询能力,提供
NextTransit/LastTransit/ClosestTransit,返回一触、二触、凌甚、三触、四触、持续时间、最小角距离和视半径等信
息。 basic层新增通用PlanetTransitResult,并提供水星/金星凌日搜索入口,供上层包复用。eclipse新增本地可见日全食、日环食、月全食专项搜索接口:LastLocalTotalSolarEclipse/NextLocalTotalSolarEclipse/ClosestLocalTotalSolarEclipseLastLocalAnnularSolarEclipse/NextLocalAnnularSolarEclipse/ClosestLocalAnnularSolarEclipseLastLocalTotalLunarEclipse/NextLocalTotalLunarEclipse/ClosestLocalTotalLunarEclipse- 新接口返回
(info, ok),可明确区分“找到事件”和“搜索范围内无结果”。
Changed
- 优化日食、月食搜索流程:增加食季跳步和黄纬预筛,减少非食季朔望月的无效精算。
- 沙罗周期匹配改用压缩锚点表快速匹配,并保留回退 walk 逻辑,提升查询效率且维持边界兼容。
- 本地中心食搜索现在要求中心阶段可见,避免只在偏食阶段可见时误报为本地可见日全食/日环食/月全食。
- README 中英文文档同步补充了中心食专项搜索接口、水星/金星凌日示例和能力清单。
English
Added
- Added geocentric Mercury and Venus transit queries via
NextTransit/LastTransit/ClosestTransit, returning first contact, second contact,
greatest transit, third contact, fourth contact, duration, minimum separation, and apparent semidiameters. - Added the shared
PlanetTransitResulttype inbasic, with Mercury/Venus transit search entry points for upper-layer packages. - Added dedicated local visible total solar eclipse, annular solar eclipse, and total lunar eclipse search APIs in
eclipse: LastLocalTotalSolarEclipse/NextLocalTotalSolarEclipse/ClosestLocalTotalSolarEclipseLastLocalAnnularSolarEclipse/NextLocalAnnularSolarEclipse/ClosestLocalAnnularSolarEclipseLastLocalTotalLunarEclipse/NextLocalTotalLunarEclipse/ClosestLocalTotalLunarEclipse- New search APIs return
(info, ok)to distinguish found events from no result within the search range.
Changed
- Optimized solar and lunar eclipse search with eclipse-season skipping and latitude prefiltering, reducing unnecessary full calculations outside eclipse
seasons. - Reworked Saros matching to use compressed anchor tables with a walk fallback, improving lookup efficiency while preserving edge-case compatibility.
- Local central-eclipse searches now require the central phase to be visible, avoiding false positives where only the partial phase is observable.
- Updated Chinese and English README files with central-eclipse search APIs, Mercury/Venus transit examples, and capability lists.
Downloads
- 新增水星、金星地心凌日查询能力,提供
-
v0.1.0 Stable
released this
2026-05-01 23:01:01 +08:00 | 7 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