• v0.4.2 ccf5880269

    v0.4.2 Stable

    b612 released this 2026-10-20 22:43:00 +08:00 | 0 commits to master since this release

    中文

    v0.4.2

    v0.4.2 完善水星与金星凌日搜索,支持地心看不到、但地表部分地区可见的掠凌,并更新相关地图与数据导出。

    主要变更

    • 优化凌日搜索,减少无效候选计算。
    • 增加地表掠凌判定、影轴 Gamma、半影半径及水星/金星周期族编号。
    • SVG、GeoJSON 和 KML 支持部分凌日可见区;正射图改为围绕可见区取景。
    • 更新中英文手册、示例图和回归测试。

    升级提示

    • 凌日查询现在包含地表可见事件。地心无接触时,HasExternal 为 false,地心接触时刻为空;使用 LocalTransit 查询当地接触,WindowStart / WindowEnd 仅表示求解窗口。

    English

    v0.4.2

    v0.4.2 improves Mercury and Venus transit searches, including grazes that are invisible from Earth's centre but visible from some locations on its surface. It also updates transit maps and data exports.

    Highlights

    • Optimized transit searches to reduce unnecessary candidate calculations.
    • Added surface-graze detection, shadow-axis Gamma, penumbral radius, and transit-family numbers for Mercury and Venus.
    • Added partial-transit visibility regions to SVG, GeoJSON, and KML; orthographic maps now centre on the visible region.
    • Updated the bilingual manuals, example images, and regression tests.

    Upgrade Notes

    • Transit searches now include surface-visible events. When geocentric contacts are absent, HasExternal is false and geocentric contact times are zero. Use LocalTransit for local contacts; WindowStart and WindowEnd are search bounds, not contact times.
    Downloads
  • v0.4.1 72460fa228

    v0.4.1 Stable

    b612 released this 2026-10-18 17:10:11 +08:00 | 1 commits to master since this release

    中文

    v0.4.1

    v0.4.1 聚焦恒星星表查询、名称数据和跨版本回归验证。本版本不改变 v0.4.0 的未来时标政策和默认半解析星历模型,主要完善中文/英文星名查询、重名消歧及 Go 1.16/386 兼容性测试。

    破坏性变更

    • 重名星名不再静默返回其中一颗:
      • StarDataByChinese、StarDataByName 返回 ErrStarNameAmbiguous;
      • 使用 StarDataByChineseAll、StarDataByNameAll 获取全部候选;
      • 使用 StarDataByChineseIn、StarDataByNameIn 按 ChineseRegion 消歧。
    • 未找到恒星和无效 HR 编号返回 ErrStarNotFound,调用方应使用 errors.Is 判断,不要匹配旧错误文本。

    主要变更

    • 将星名元数据统一为嵌入式 TSV/GZIP 数据源,补充中文名、别名、英文常用名和宿/垣区域字段。
    • StarDataByName 现同时支持中文名、中文别名和英文 CommonName,英文查询忽略大小写及首尾空白。
    • 新增 StarDataByNameAll、StarDataByNameIn,并同步扩展 StarCoordinateByName。
    • StarData 新增 ChineseRegion 字段,完善中英文手册和查询示例。

    修正与测试

    • 修正同名星索引覆盖、名称表漂移和旧详情字段不一致问题。
    • 增加星表、坐标、日月食、月食半影带、低精度结果和输出契约回归测试。
    • 增加 Go 1.16/386 兼容门禁及相关 smoke 测试,隔离旧工具链的浮点、拓扑、SVG 和分配差异。

    升级建议

    1. 使用 errors.Is 判断 ErrStarNotFound 和 ErrStarNameAmbiguous。
    2. 对可能重名的中文星名使用 StarDataByNameAll 或 StarDataByNameIn。
    3. 英文常用名统一使用 StarDataByName 系列接口。
    4. 序列化或比较 StarData 时注意新增的 ChineseRegion 字段。

    English

    v0.4.1

    v0.4.1 focuses on star-catalog lookup, name metadata, and cross-version regression coverage. It does not change the future time-scale policy or the default semianalytic ephemeris model introduced in v0.4.0. The release mainly improves Chinese/English star-name lookup, duplicate-name disambiguation, and Go 1.16/386 compatibility testing.

    Breaking Changes

    • Duplicate names no longer silently select one candidate:
      • StarDataByChinese and StarDataByName return ErrStarNameAmbiguous;
      • use StarDataByChineseAll or StarDataByNameAll for all candidates;
      • use StarDataByChineseIn or StarDataByNameIn with ChineseRegion to disambiguate.
    • Missing stars and invalid HR numbers return ErrStarNotFound. Use errors.Is instead of matching the old error text.

    Highlights

    • Consolidated star-name metadata into an embedded TSV/GZIP data source with Chinese names, aliases, English common names, and mansion/enclosure regions.
    • StarDataByName now supports Chinese names, Chinese aliases, and English CommonName values; English lookup ignores case and surrounding whitespace.
    • Added StarDataByNameAll and StarDataByNameIn, and extended StarCoordinateByName accordingly.
    • Added ChineseRegion to StarData and updated the bilingual manuals and lookup examples.

    Fixes and Testing

    • Fixed duplicate-name index overwrites, name-table drift, and legacy-detail inconsistencies.
    • Added regression coverage for star catalogs, coordinates, eclipses, lunar-penumbra bands, low-precision results, and output contracts.
    • Added Go 1.16/386 compatibility gates and smoke tests for legacy floating-point, topology, SVG, and allocation differences.

    Upgrade Checklist

    1. Check ErrStarNotFound and ErrStarNameAmbiguous with errors.Is.
    2. Use StarDataByNameAll or StarDataByNameIn for potentially duplicate Chinese names.
    3. Use the StarDataByName family for English common-name lookup.
    4. Account for the new ChineseRegion field when serializing or comparing StarData.
    Downloads
  • v0.4.0 0e3825d5ba

    v0.4.0 Stable

    b612 released this 2026-10-16 08:06:13 +08:00 | 2 commits to master since this release

    中文

    v0.4.0

    v0.4.0 是一次包含破坏性行为变更的版本。本版本最重要的变化是:观测数据覆盖范围之外的默认民用时标政策由闰秒外推改为闰时外推,对应 2027年5月20日起生效的连续 UTC 口径。

    1972–2026 年仍使用确定的历史闰秒表,历史结果保持不变;但在内置数据窗口结束后,库不再默认按 ±0.9 秒约束周期性插入整数秒,而是允许 |UT1−UTC| 在 ±3600 秒范围内变化,并在必要时施加整小时校正。本版本同时将默认星历模型切换为半解析模型,并新增显式星历实例、外部 SPK 和通用天象接口。

    破坏性变更

    • 默认未来民用时标政策由 TimeScaleLeapSecond 改为 TimeScaleLeapHour:
      • TimeScaleLeapHour 现在是零值和默认值;
      • 四个常量的数值随之改变:TimeScaleLeapSecond 0→1、TimeScaleAssumeUT1Tracking 1→2、TimeScaleFreezeUTCOffset 2→3、TimeScaleLeapHour 3→0(TimeScaleUT1Civil 不变);
      • 传入裸整数的 SetTimeScaleFuturePolicy 调用方需要更新。
    • 内置时标数据窗口截至 2026 年 10 月 1 日:
      • 1972–2026 年继续使用确定的闰秒表;
      • 窗口之后默认采用闰时策略;
      • 默认情况下,未来 TT−UTC 将在很长时间内保持 69.184 秒,直到外推的 DUT1 达到或超过 ±1 小时。
    • 包级天文计算默认模型改为半解析模型。太阳、月球和行星的数值结果可能与旧版级数模型存在差异:
      • 需要复现旧结果时,可调用 astro.SetModel(astro.ModelLegacy)(返回 error);
      • 或用 ctx, err := astro.NewContext(astro.ModelLegacy) 固定一个旧模型上下文。
    • TimeScaleUTC 与 TimeScaleUT1 只决定输出标签的时标,不改变未来民用时标政策;需要区分“未来换算政策”和“输出标签时标”。

    主要变更

    • 新增 Legacy、半解析、自定义和多源堆叠星历模型,提供 Context、Instance、SPK 文件读取和外部星历引擎接口。
    • 支持在同一进程中并行使用多个星历上下文,并为太阳、月球和七大行星提供统一的实例化访问接口。
    • 新增黄经穿越、留、相位、最近角距、偕日可见、任意高度升落、近远日点、轨道节点和行星凌日等通用天象查询。
    • 完善日食、月食、恒星月掩和行星月掩的月缘剖面、有限盘面接触、站心修正、局地可见性和全球路径计算。
    • 扩展 SVG、GeoJSON 和 KML 天象输出,增加凌日地图、时间标记、月缘地形和局地接触数据。
    • 新增恒星星表模块,支持 CSV、Hipparcos、BSC5、Stellarium 等格式,以及名称解析、交叉标识、锥面检索、星等过滤和升落计算。
    • 补充 IAU 2006、地球定向、折射、消光、大气观测、轨道传播和半解析行星/月球数据支持。
    • 增加跨模型回归、事件基线、几何边界、月缘地形、SPK 和输出契约测试。
    • 更新中英文 README 与全部手册,以及示例图片、测试数据和发布 NOTICE。

    修正

    • calendar.GanZhiOfDay 先换算到东八区,非东八区宿主上的干支日结果可能与旧版不同。
    • 星表 Strict 模式改为一并拒绝非有限视差(±Inf),此前会被静默当作无视差;这是收紧,可能导致原本通过的输入报错。
    • calendar.Time.Add 越界时保留公历时刻、农历部分为空,不再返回零值。
    • phenomena 的事件时刻改用显式时区,不再依赖宿主 Local,非本地时区宿主上的结果可能改变。
    • 偕日事件不再越过请求的 endJD;星座判定不再对边界坐标返回空串;KML 读取跨反经线多边形时按 ±180° 拆分并补接缝交点。
    • lite/sun、lite/moon 的地平俯角此前错误把纬度当弧度计算使用,现已改正并与主链 basic.HeightDegreeByLat 完全一致。只影响传入了观测高度的升落计算:在高度 10 km 处旧值偏差最大约 14″、且误差随纬度改变符号,对应时刻差约 0.9 秒。

    闰时与未来时标

    2026 年 10 月 15 日,第 28 届国际计量大会通过第 5 号决议《关于确保 UTC 连续性所需的技术行动》(Resolution-CGPM-28-5,DOI 10.59161/CGPM2026RES5E):连续 UTC 自 2027 年 5 月 20 日起生效,允许的 |UT1−UTC| 范围由 ±0.9 秒放宽到 ±3600 秒。

    本版本据此将 TimeScaleLeapHour 设为默认政策:

    • TimeScaleLeapHour:按外推 ΔT 计算,在 DUT1 达到或超过 ±3600 秒时施加最少整小时校正,匹配连续 UTC 的闰时制度。
    • TimeScaleLeapSecond:继续提供旧的整数秒外推,仅用于复现 1972–2026 年确定的闰秒口径或进行对照。
    • TimeScaleAssumeUT1Tracking:保持末端 DUT1,令民用时标平滑跟随 UT1。
    • TimeScaleFreezeUTCOffset:冻结内置窗口末端的 TT−UTC 偏移。
    • TimeScaleUT1Civil:将全时轴上的民用时标视为 UT1。

    观测数据覆盖范围内始终优先使用实测的 UTC、UT1、DUT1 和显式注入的 TT−UTC 数据。除 TimeScaleUT1Civil 替换全时轴定义外,上述未来政策只影响覆盖范围之外的预测与模拟。需要某个具体日期的精确民用时刻时,应使用该日期发布的官方时标数据。

    升级建议

    升级前请重点检查:

    1. 是否依赖 TimeScaleFuturePolicy 的裸整数值;TimeScaleLeapHour 现在是零值。
    2. 是否假定未来日期默认按闰秒外推;需要旧行为时显式设置 TimeScaleLeapSecond。
    3. 是否依赖旧版级数模型的数值结果;需要复现时设置 ModelLegacy。
    4. 是否将输出标签时标与未来民用时标政策混为一谈。
    5. 是否需要使用 Context 固定星历模型,避免进程级模型切换影响结果。
    6. GeoJSON、SVG 和 KML 消费方是否能处理新增的天象角色、时间标记和地图要素。

    English

    v0.4.0

    v0.4.0 introduces breaking behavioral changes. The most important change is that the default civil-time policy beyond the observed data range changes from leap-second extrapolation to leap-hour extrapolation, matching continuous UTC effective from 20 May 2027.

    The definitive leap-second table remains unchanged for 1972–2026. Beyond the built-in data window, however, the library no longer assumes periodic integer-second corrections to keep |UT1−UTC| within ±0.9 seconds. The default policy now allows |UT1−UTC| to reach ±3600 seconds and applies whole-hour corrections when required. This release also makes the semianalytic ephemeris the default model and adds explicit ephemeris contexts, external SPK support, and generic sky-event APIs.

    Breaking Changes

    • The default future civil-time policy changes from TimeScaleLeapSecond to TimeScaleLeapHour:
      • TimeScaleLeapHour is now the zero value and the default;
      • four constant values change accordingly: TimeScaleLeapSecond 0→1, TimeScaleAssumeUT1Tracking 1→2, TimeScaleFreezeUTCOffset 2→3, TimeScaleLeapHour 3→0 (TimeScaleUT1Civil is unchanged);
      • callers passing raw integers to SetTimeScaleFuturePolicy must update.
    • The built-in time-scale data window ends on 1 October 2026:
      • 1972–2026 continues to use the definitive leap-second table;
      • dates beyond the window use the leap-hour policy by default;
      • under the default policy, TT−UTC remains at 69.184 seconds for a long time, until extrapolated DUT1 reaches or exceeds one hour.
    • Package-level astronomical calculations now use the semianalytic model by default. Solar, lunar, and planetary values may differ from the legacy series model:
      • use astro.SetModel(astro.ModelLegacy) (returns an error) to reproduce legacy package-level results;
      • or fix one with ctx, err := astro.NewContext(astro.ModelLegacy).
    • TimeScaleUTC and TimeScaleUT1 control output labels only. They are independent from the future civil-time conversion policy; keep the future conversion policy distinct from the output label scale.

    Highlights

    • Added legacy, semianalytic, custom, and multi-source stacked ephemeris models, with Context, Instance, SPK loading, and external engine interfaces.
    • Added multiple independent ephemeris contexts that can coexist in one process, with consistent instance-based APIs for the Sun, Moon, and seven planets.
    • Added generic searches for longitude crossings, stations, phases, closest approaches, heliacal visibility, arbitrary-altitude rise/set, apsides, orbital nodes, and planetary transits.
    • Expanded solar eclipses, lunar eclipses, stellar occultations, and planetary occultations with lunar-limb profiles, finite-disk contacts, topocentric corrections, local visibility, and global paths.
    • Expanded SVG, GeoJSON, and KML exports with transit maps, time markers, lunar-limb terrain, and local-contact data.
    • Added star-catalog loading and search for CSV, Hipparcos, BSC5, and Stellarium formats, including name resolution, cross-identifiers, cone searches, magnitude filters, and rise/set calculations.
    • Added IAU 2006, Earth-orientation, refraction, extinction, atmospheric-observation, orbit-propagation, and semianalytic planetary/lunar data support.
    • Added cross-model regression tests, event baselines, geometry-boundary tests, lunar-limb tests, SPK tests, and output-contract coverage.
    • Updated the bilingual README and all manuals, plus example assets, test data, and the release NOTICE.

    Fixes

    • calendar.GanZhiOfDay now converts to UTC+8 first; sexagenary-day results on non-UTC+8 hosts may differ from previous releases.
    • Star-catalog Strict mode now also rejects non-finite parallax (±Inf), which used to be silently treated as no parallax; this is a tightening and may make previously accepted input fail.
    • calendar.Time.Add keeps the solar instant with an empty lunisolar part instead of returning a zero Time when out of range.
    • phenomena event instants now use an explicit zone rather than the host Local, so results on non-local hosts may change.
    • Heliacal events no longer fall beyond the requested endJD; constellation lookup no longer returns an empty string for boundary coordinates; KML splits polygons that cross the antimeridian at ±180° and adds the seam vertex.
    • The horizon dip in lite/sun and lite/moon previously treated latitude as radians; it now matches basic.HeightDegreeByLat exactly. Only rise/set calls that pass an observer height are affected: the old value was off by up to about 14″ at 10 km height, with the error changing sign with latitude, shifting the computed time by about 0.9 s.

    Leap Hours and Future Time Scales

    On 15 October 2026 the 28th General Conference on Weights and Measures adopted Resolution 5, "On the technical actions needed to ensure the continuity of UTC" (Resolution-CGPM-28-5, DOI 10.59161/CGPM2026RES5E): continuous UTC becomes effective on 20 May 2027, widening the allowed |UT1−UTC| range from ±0.9 seconds to ±3600 seconds.

    Accordingly, this release makes TimeScaleLeapHour the default policy:

    • TimeScaleLeapHour: extrapolates ΔT and applies the fewest whole-hour corrections when DUT1 reaches or exceeds ±3600 seconds, matching the continuous-UTC leap-hour policy.
    • TimeScaleLeapSecond: retains the previous integer-second extrapolation for reproducing the definitive 1972–2026 convention or for comparison.
    • TimeScaleAssumeUT1Tracking: preserves the terminal DUT1 value and lets civil time follow UT1 smoothly.
    • TimeScaleFreezeUTCOffset: freezes TT−UTC at the end of the built-in window.
    • TimeScaleUT1Civil: treats civil time as UT1 throughout the full timeline.

    Observed UTC, UT1, DUT1, and explicitly injected TT−UTC data remain authoritative inside the covered range. Except for TimeScaleUT1Civil, which replaces the scale across the whole timeline, these policies affect only predictions and simulations outside that range. For precise civil timing on a specific date, use the official time-scale data published for that date.

    Upgrade Checklist

    • Check for code that depends on raw TimeScaleFuturePolicy integer values; TimeScaleLeapHour is now zero.
    • Explicitly select TimeScaleLeapSecond wherever the old future extrapolation is required.
    • Check golden values that depend on the legacy ephemeris model; select ModelLegacy when reproducing them.
    • Keep output-label selection separate from future civil-time policy selection.
    • Use Context when a calculation must remain pinned to a specific ephemeris model.
    • Ensure SVG, GeoJSON, and KML consumers accept the additional sky-event roles, time markers, and map features.
    Downloads
  • v0.3.0 16c62a97d5

    v0.3.0 Stable

    b612 released this 2026-09-23 21:34:18 +08:00 | 4 commits to master since this release

    中文

    v0.3.0

    v0.3.0 是一次包含破坏性 API 变更的版本。本版本重新整理 TT、UTC、UT1 与 ΔT 的语义,统一天文计算与输出时标,并扩展日月食、月掩、质心时标和地图导出能力。

    破坏性变更

    • 将实际表示民用时刻的 JDE API 统一改名为 JD:
      • Date2JDE → Date2JD
      • JDECalc → JDCalc
      • JDE2Date → JD2Date
      • JDE2DateByZone → JD2DateByZone
      • GetNowJDE → GetNowJD
      • calendar.NowJDE → calendar.NowJD
      • ApsisEvent.JDE、DeclinationEvent.JDE → JD
      • Time.JDE()、LunarTime.JDE() → JD()
    • 删除含义不明确的 basic.TD2UT:
      • UTC → TT 使用 UTC2TT
      • UT1 → TT 使用 UT12TT
      • TT → UTC 使用 TT2UTC
      • TT → UT1 使用 TT2UT1
      • UTC 与 UT1 之间使用 UTC2UT1 / UT12UTC
    • basic.DeltaT 的语义改为纯 TT−UT1。需要闰秒口径的 TT−UTC 请改用 TTMinusUTCSeconds,需要 UT1−UTC 请使用 DUT1Seconds 或根包的 DUT1。
    • 依赖地球自转的方位、升落、月掩和日食几何改按真实 UT1 计算,历史结果可能出现亚秒级到约 0.4 秒的变化。
    • SVG、GeoJSON 和 KML 默认输出 UTC 标签;需要 UT1 时必须显式选择 TimeScaleUT1 或调用对应的 ...InUT1 API。
    • 月食 GeoJSON 默认增加 visible-during-eclipse、visible-throughout-eclipse、penumbra-moonset 和 penumbra-moonrise 四类要素。需要兼容旧输出时,使用 LunarEclipseOptions.SkipRoles。
    • 月食 SVG 默认输出半影阶段;需要恢复旧的四类分区时,设置 DisablePenumbralPhase。
    • 仍保留 JDE 名称的字段和函数表示真正的 TT 儒略日,例如 SolarEclipsePathPoint.JDE、LunarEclipseDiagramPoint.JDE 和 CalcMoonSHByJDE,不应统一替换为 JD。

    主要变更

    • 新增根包与 basic 的时标转换接口,支持 UTC、UT1、TT、ΔT、DUT1 以及时标标签转换。
    • 新增 ΔT、TT−UTC 和未来时标政策注入,可通过 SetDeltaT、SetTTMinusUTC 和 SetTimeScaleFuturePolicy 对接外部数据或业务口径。
    • 新增 TCG、TCB、TDB 与 TT 之间的质心时标转换。
    • 新增日食贝塞尔要素、太阳半径模型和 WithOptions 入口。
    • 扩展月食可见性判断、正交投影月面图、半影状态和时间包络输出。
    • 扩展日食、月食和月掩的 SVG、GeoJSON 与 KML 2.2 导出,支持时间轴、UT1 标签、等经纬投影和极区投影。
    • 完善恒星三维自行、径向速度与动态距离传播,改进行星事件搜索、升落计算和极端历元稳定性。
    • 补充中英文手册、迁移说明、输出契约测试和历史回归测试。

    闰秒与未来时标

    即将召开的国际计量大会将讨论是否取消或调整闰秒制度。本次版本将未来时标政策显式做成可配置项。

    默认策略仍为 TimeScaleLeapSecond,即按现行闰秒规则对观测数据覆盖范围之外的未来日期进行外推。需要其他制度假设时,可选择:

    • TimeScaleAssumeUT1Tracking:让民用时标继续跟随 UT1;
    • TimeScaleFreezeUTCOffset:冻结当前 UTC 偏移;
    • TimeScaleLeapHour:采用闰时规则;
    • TimeScaleUT1Civil:令民用时标持续等同 UT1。

    观测数据覆盖范围内仍使用实测的 UTC、UT1 和 DUT1;这些未来政策只影响覆盖范围之外的预测和模拟。

    升级建议

    升级前请重点检查:

    1. 全部 JDE 民用时刻 API 是否已改为 JD。
    2. TD2UT 调用是否根据输入和目标时标改用明确的转换函数。
    3. 将 DeltaT 当作 TT−UTC 使用的代码是否改为 TTMinusUTCSeconds。
    4. GeoJSON 消费方是否能处理新增的月食角色。
    5. 需要输出 UT1 的接口是否显式设置了 TimeScaleUT1。

    English

    v0.3.0

    v0.3.0 introduces breaking API changes. It separates TT, UTC, UT1, and ΔT semantics, makes time-scale handling explicit, and expands eclipse, occultation, barycentric time, and map-export capabilities.

    Breaking Changes

    • Civil-time APIs previously named JDE are now named JD, including Date2JD, JDCalc, JD2Date, JD2DateByZone, GetNowJD, calendar.NowJD, event fields, and Time.JD() / LunarTime.JD().
    • basic.TD2UT has been removed:
      • use UTC2TT for UTC → TT;
      • UT12TT for UT1 → TT;
      • TT2UTC for TT → UTC;
      • TT2UT1 for TT → UT1;
      • and UTC2UT1 / UT12UTC for UTC ↔ UT1.
    • basic.DeltaT now consistently means TT−UT1. Use TTMinusUTCSeconds for TT−UTC, and DUT1Seconds or root-level DUT1 for UT1−UTC.
    • Azimuth, rise/set, lunar-occultation, and eclipse geometry now use UT1 instead of treating civil time as an approximation of Earth-rotation time. Historical results may change by sub-second amounts and by up to about 0.4 seconds for older dates.
    • SVG, GeoJSON, and KML labels use UTC by default. Select TimeScaleUT1 or use the corresponding ...InUT1 API for UT1 output.
    • Lunar-eclipse GeoJSON now includes four additional roles by default: visible-during-eclipse, visible-throughout-eclipse, penumbra-moonset, and penumbra-moonrise. Use LunarEclipseOptions.SkipRoles to retain the previous role set.
    • Lunar-eclipse SVGs show the penumbral phase by default. Set DisablePenumbralPhase to restore the previous four-region output.
    • Remaining JDE names represent genuine TT Julian dates, such as SolarEclipsePathPoint.JDE, LunarEclipseDiagramPoint.JDE, and CalcMoonSHByJDE; these should not be renamed to JD.

    Highlights

    • Added UTC, UT1, TT, ΔT, DUT1, and time-scale-label conversion APIs.
    • Added injectable ΔT, TT−UTC, and future time-scale policies through SetDeltaT, SetTTMinusUTC, and SetTimeScaleFuturePolicy.
    • Added TCG, TCB, and TDB conversions to and from TT.
    • Added solar-eclipse Besselian elements, solar-radius models, and WithOptions entry points.
    • Expanded lunar-eclipse visibility classification, orthographic lunar maps, penumbral output, and time-envelope GeoJSON.
    • Added SVG, GeoJSON, and KML 2.2 exports with time markers, UT1 labels, equirectangular projections, and polar projections.
    • Improved three-dimensional stellar proper motion with radial-velocity and dynamic-distance propagation, planetary-event searches, rise/set calculations, and extreme-epoch stability.
    • Added bilingual manuals, migration guidance, output-contract tests, and historical regression coverage.

    Leap Seconds and Future Time Scales

    The upcoming General Conference on Weights and Measures will discuss whether and how the leap-second system should change. future time-scale behavior is configurable in this version.

    The default policy is TimeScaleLeapSecond, which extrapolates the current leap-second convention beyond the observed data range. Applications may instead select:

    • TimeScaleAssumeUT1Tracking;
    • TimeScaleFreezeUTCOffset;
    • TimeScaleLeapHour;
    • TimeScaleUT1Civil.

    Observed UTC, UT1, and DUT1 data remain in effect within the covered range. These policies affect only future dates outside that range.

    Upgrade Checklist

    • Rename all civil-time JDE APIs to their JD equivalents.
    • Replace each TD2UT call with the conversion matching its actual source and target scales.
    • Replace uses of DeltaT as TT−UTC with TTMinusUTCSeconds.
    • Ensure GeoJSON consumers accept the additional lunar-eclipse roles.
    • Select UT1 explicitly wherever UT1 labels are required.
    Downloads
  • v0.3.0-rc1 Pre-Release

    b612 released this 2026-09-17 12:29:08 +08:00 | 6 commits to master since this release

    feat: 完善日月食与月掩几何链路并扩展历法接口

    • 新增日月食中心带、偏食带、阴影足迹、等时线、食分线及升落边界计算,支持极区与混合食拓扑
    • 新增日食单时刻阴影求解器、站心状态查询、批量采样和 ΔT 覆盖接口
    • 重构恒星与行星月掩路径,补充有限盘面接触、站心修正、掩带宽度、极区投影及升落边界
    • 扩展 SVG 与 GeoJSON 输出,支持详细面板、全球/极区/地球投影、边界闭合、时间标记和拓扑签名
    • 扩展日月食候选搜索、局地搜索、沙罗序列预计算与范围外推,补充系列锚点和成员一致性校验
    • 补齐古历纪年、儒略历独有闰日、多公历候选、历法改革跨日及精确日期运算接口
    • 优化 ΔT、章动、恒星时、月球地平线、事件根搜索和本地星历缓存,降低重复计算开销并提升边界稳定
    Downloads
  • v0.2.0 9ee2163cc7

    v0.2.0 Stable

    b612 released this 2026-08-06 12:41:42 +08:00 | 7 commits to master since this release

    中文

    主要变更

    • 新增恒星/月掩完整能力:支持固定地点接触、全球掩带、几何掩甚点、局地与全球 SVG,以及星表坐标转换。
    • 新增日食、月食和月掩的全球投影图与 GeoJSON 输出,支持时间标记、等经纬/极区投影和无行政边界底图。
    • 扩展日食中心线与偏食足迹,补齐 P1-P4、U1-U4 接触信息和可选中心影采样。
    • 修正站心时角、月出月落和太阳升落口径,改为按动态标准折射与实时太阳/月球视半径计算上缘过地平线。
    • 收紧行星合冲、留、大距与驻留事件搜索的收敛和边界控制,增加非有限输入保护,提升极端时刻与古代样本稳定性。

    English

    Highlights

    • Added full stellar and planetary lunar-occultation support: fixed-site contacts, global footprints, geometric greatest points, local/global SVGs, and catalog-coordinate conversion.
    • Added global projection maps and GeoJSON exports for solar eclipses, lunar eclipses, and lunar occultations, with time markers plus equirectangular and polar projections.
    • Expanded solar-eclipse central-path and partial-footprint outputs with P1-P4 / U1-U4 contact data and optional central-shadow sampling.
    • Corrected topocentric hour-angle handling and Sun/Moon rise-set semantics by using dynamic standard refraction and instantaneous semidiameters for upper-limb crossings.
    • Hardened conjunction, station, elongation, and related event searches with bounded convergence and non-finite input guards.
    Downloads
  • v0.1.5 25dc7ac0bc

    v0.1.5 Stable

    b612 released this 2026-06-14 22:21:46 +08:00 | 8 commits to master since this release

    • feat(calendar): 扩展先秦至秦汉古历支持

    • 新增显式古历 API,支持先秦古历与秦汉颛顼历选择
    • 将默认公农历转换范围扩展至 -721..3000
    • 支持后九月解析、负年份干支日和古历法相符节气
    • 补充秦汉、先秦、交接边界和节气回归测试
    • 同步 README 古历与节气 API 说明
    Downloads
  • v0.1.5-rc2 Pre-Release

    b612 released this 2026-06-11 09:34:57 +08:00 | 8 commits to master since this release

    calendar: 补齐前104古历纪年解析与回归测试

    • 为先秦与秦汉古历结果填充周、鲁、秦、西汉早期纪年信息
    • 支持默认与显式古历下的年号日期解析
    Downloads
  • v0.1.5-rc1 Pre-Release

    b612 released this 2026-06-09 19:37:52 +08:00 | 9 commits to master since this release

    • feat(calendar): 扩展先秦至秦汉古历支持

    • 新增显式古历 API,支持先秦古历与秦汉颛顼历选择
    • 将默认公农历转换范围扩展至 -721..3000
    • 支持后九月解析、负年份干支日和古历法相符节气
    • 补充秦汉、先秦、交接边界和节气回归测试
    • 同步 README 古历与节气 API 说明
    Downloads
  • v0.1.4 c8dd777a7b

    v0.1.4 Stable

    b612 released this 2026-05-30 21:59:40 +08:00 | 10 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