feat: 完善时标与天象几何计算并扩展输出接口

- 新增时标、ΔT 模型、质心时间与 UT1 支持
- 改进日月食、月掩、行星事件及路径边界计算
- 完善恒星三维自行与动态距离传播
- 扩展 SVG、GeoJSON、KML 输出与底层距离换算工具
- 整理中英文手册、示例资源及回归测试
This commit is contained in:
2026-09-23 18:55:12 +08:00
parent 1f31a9b5b5
commit 16c62a97d5
503 changed files with 33290 additions and 9471 deletions
+23 -22
View File
@@ -2,47 +2,48 @@ package internal
import . "b612.me/astro/tools"
func SunLo(jd float64) float64 {
t := (jd - 2451545.0) / 365250.0
func SunLo(jde float64) float64 {
t := (jde - 2451545.0) / 365250.0
return Limit360(280.4664567 + 360007.6982779*t + 0.03032028*t*t + t*t*t/49931.0 - t*t*t*t/15299.0 - t*t*t*t*t/1988000.0)
}
func SunMeanAnomaly(jd float64) float64 {
t := (jd - 2451545.0) / 36525.0
func SunMeanAnomaly(jde float64) float64 {
t := (jde - 2451545.0) / 36525.0
return Limit360(357.5291092 + 35999.0502909*t - 0.0001559*t*t - 0.00000048*t*t*t)
}
func EarthEccentricity(jd float64) float64 {
t := (jd - 2451545.0) / 36525.0
func EarthEccentricity(jde float64) float64 {
t := (jde - 2451545.0) / 36525.0
return 0.016708617 - 0.000042037*t - 0.0000001236*t*t
}
func SunCenter(jd float64) float64 {
t := (jd - 2451545.0) / 36525.0
m := SunMeanAnomaly(jd)
func SunCenter(jde float64) float64 {
t := (jde - 2451545.0) / 36525.0
m := SunMeanAnomaly(jde)
return (1.9146-0.004817*t-0.000014*t*t)*Sin(m) + (0.019993-0.000101*t)*Sin(2*m) + 0.00029*Sin(3*m)
}
func SunTrueLo(jd float64) float64 {
return Limit360(SunLo(jd) + SunCenter(jd))
// 本文件以 jde(力学时儒略日)键控;lite 包装层的实参是 UTC 民用 JD,69 s 的历元差远低于轻量公式精度。
func SunTrueLo(jde float64) float64 {
return Limit360(SunLo(jde) + SunCenter(jde))
}
func SunApparentLo(jd float64) float64 {
t := (jd - 2451545.0) / 36525.0
return Limit360(SunTrueLo(jd) - 0.00569 - 0.00478*Sin(125.04-1934.136*t))
func SunApparentLo(jde float64) float64 {
t := (jde - 2451545.0) / 36525.0
return Limit360(SunTrueLo(jde) - 0.00569 - 0.00478*Sin(125.04-1934.136*t))
}
func SunDistanceAU(jd float64) float64 {
c := SunCenter(jd)
m := SunMeanAnomaly(jd)
e := EarthEccentricity(jd)
func SunDistanceAU(jde float64) float64 {
c := SunCenter(jde)
m := SunMeanAnomaly(jde)
e := EarthEccentricity(jde)
return 1.000001018 * (1 - e*e) / (1 + e*Cos(m+c))
}
func SunTrueRaDec(jd float64) (float64, float64) {
return EclipticToEquatorial(jd, SunTrueLo(jd), 0)
func SunTrueRaDec(jde float64) (float64, float64) {
return EclipticToEquatorial(jde, SunTrueLo(jde), 0)
}
func SunApparentRaDec(jd float64) (float64, float64) {
return EclipticToEquatorial(jd, SunApparentLo(jd), 0)
func SunApparentRaDec(jde float64) (float64, float64) {
return EclipticToEquatorial(jde, SunApparentLo(jde), 0)
}