feat: 完善时标与天象几何计算并扩展输出接口
- 新增时标、ΔT 模型、质心时间与 UT1 支持 - 改进日月食、月掩、行星事件及路径边界计算 - 完善恒星三维自行与动态距离传播 - 扩展 SVG、GeoJSON、KML 输出与底层距离换算工具 - 整理中英文手册、示例资源及回归测试
This commit is contained in:
@@ -29,7 +29,7 @@ func mustJST(value string) time.Time {
|
||||
}
|
||||
|
||||
func toUTJD(t time.Time) float64 {
|
||||
return TD2UT(Date2JDE(t.UTC()), true)
|
||||
return UTC2TT(Date2JD(t.UTC()))
|
||||
}
|
||||
|
||||
func TestStationTruthAgainstNAOJ(t *testing.T) {
|
||||
@@ -140,8 +140,8 @@ func TestStationTruthAgainstNAOJ(t *testing.T) {
|
||||
case "P2R":
|
||||
before := event.when.Add(-24 * time.Hour)
|
||||
after := event.when.Add(24 * time.Hour)
|
||||
nextP2R := JDE2DateByZone(tc.nextP2R(toUTJD(before)), event.when.Location(), false)
|
||||
lastP2R := JDE2DateByZone(tc.lastP2R(toUTJD(after)), event.when.Location(), false)
|
||||
nextP2R := JD2DateByZone(tc.nextP2R(toUTJD(before)), event.when.Location(), false)
|
||||
lastP2R := JD2DateByZone(tc.lastP2R(toUTJD(after)), event.when.Location(), false)
|
||||
if !sameMinute(nextP2R, event.when) {
|
||||
t.Fatalf("%s next P2R mismatch: got %s want %s", tc.name, nextP2R, event.when)
|
||||
}
|
||||
@@ -151,8 +151,8 @@ func TestStationTruthAgainstNAOJ(t *testing.T) {
|
||||
case "R2P":
|
||||
before := event.when.Add(-24 * time.Hour)
|
||||
after := event.when.Add(24 * time.Hour)
|
||||
nextR2P := JDE2DateByZone(tc.nextR2P(toUTJD(before)), event.when.Location(), false)
|
||||
lastR2P := JDE2DateByZone(tc.lastR2P(toUTJD(after)), event.when.Location(), false)
|
||||
nextR2P := JD2DateByZone(tc.nextR2P(toUTJD(before)), event.when.Location(), false)
|
||||
lastR2P := JD2DateByZone(tc.lastR2P(toUTJD(after)), event.when.Location(), false)
|
||||
if !sameMinute(nextR2P, event.when) {
|
||||
t.Fatalf("%s next R2P mismatch: got %s want %s", tc.name, nextR2P, event.when)
|
||||
}
|
||||
@@ -166,8 +166,8 @@ func TestStationTruthAgainstNAOJ(t *testing.T) {
|
||||
continue
|
||||
}
|
||||
query := event.when
|
||||
lastP2R := JDE2DateByZone(tc.lastP2R(toUTJD(query)), query.Location(), false)
|
||||
nextR2P := JDE2DateByZone(tc.nextR2P(toUTJD(query)), query.Location(), false)
|
||||
lastP2R := JD2DateByZone(tc.lastP2R(toUTJD(query)), query.Location(), false)
|
||||
nextR2P := JD2DateByZone(tc.nextR2P(toUTJD(query)), query.Location(), false)
|
||||
if !sameMinute(lastP2R, prev) {
|
||||
t.Fatalf("%s opposition last P2R mismatch: got %s want %s", tc.name, lastP2R, prev)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user