1. 补充农历覆盖到公元前104年

2. 农历信息中包含君主、年号、朝代
3. 丰富一些算法,修正一些问题
This commit is contained in:
2025-09-15 20:55:38 +08:00
parent 438f1700c7
commit d6b6452304
18 changed files with 7048 additions and 458 deletions
+1 -1
View File
@@ -34,6 +34,6 @@ func show() {
fmt.Print("农历:")
fmt.Println(GetLunar(2019, 10, 23, 8.0/24.0))
fmt.Println("当前月出:", JDE2Date(GetMoonRiseTime(jde, 115, 32, 8, 1, 10)))
fmt.Println("当前月落:", JDE2Date(GetMoonDownTime(jde, 115, 32, 8, 1, 10)))
fmt.Println("当前月落:", JDE2Date(GetMoonSetTime(jde, 115, 32, 8, 1, 10)))
fmt.Println("月相:", MoonLight(jde-8.0/24.0))
}
+249 -141
View File
@@ -7,7 +7,7 @@ import (
"time"
)
var defDeltaTFn = DefaultDeltaT
var defDeltaTFn = DefaultDeltaTv2
/*
@name: 儒略日计算
@@ -152,6 +152,93 @@ func DefaultDeltaT(Date float64, IsJDE bool) (Result float64) { //传入年或
return
}
func DefaultDeltaTv2(date float64, isJd bool) float64 { //传入年或儒略日,传出为秒
if !isJd {
date = JDECalc(int(date), int((date-math.Floor(date))*12)+1, (date-math.Floor(date))*365.25+1)
}
return DeltaTv2(date)
}
// 使用Stephenson等人(2016)和Morrison等人(2021)的拟合和外推公式计算Delta T
// http://astro.ukho.gov.uk/nao/lvm/
// 2010年后的系数已修改以包含2019年后的数据
// 返回Delta T,单位为秒
func DeltaTSplineY(y float64) float64 {
// 积分lod(平均太阳日偏离86400秒的偏差)方程:
// 来自 http://astro.ukho.gov.uk/nao/lvm/
// lod = 1.72 t 3.5 sin(2*pi*(t+0.75)/14) 单位ms/day,其中 t = (y - 1825)/100
// 是从1825年开始的世纪数
// 使用 1ms = 1e-3s 和 1儒略年 = 365.25天,
// lod = 6.2823e-3 * Delta y - 1.278375*sin(2*pi/14*(Delta y /100 + 0.75) 单位s/year
// 其中 Delta y = y - 1825。积分该方程得到
// Integrate[lod, y] = 3.14115e-3*(Delta y)^2 + 894.8625/pi*cos(2*pi/14*(Delta y /100 + 0.75)
// 单位为秒。积分常数设为0。
integratedLod := func(x float64) float64 {
u := x - 1825
return 3.14115e-3*u*u + 284.8435805251424*math.Cos(0.4487989505128276*(0.01*u+0.75))
}
if y < -720 {
// 使用积分lod + 常数
const c = 1.007739546148514
return integratedLod(y) + c
}
if y > 2025 {
// 使用积分lod + 常数
const c = -150.56787057979514
return integratedLod(y) + c
}
// 使用三次样条拟合
y0 := []float64{-720, -100, 400, 1000, 1150, 1300, 1500, 1600, 1650, 1720, 1800, 1810, 1820, 1830, 1840, 1850, 1855, 1860, 1865, 1870, 1875, 1880, 1885, 1890, 1895, 1900, 1905, 1910, 1915, 1920, 1925, 1930, 1935, 1940, 1945, 1950, 1953, 1956, 1959, 1962, 1965, 1968, 1971, 1974, 1977, 1980, 1983, 1986, 1989, 1992, 1995, 1998, 2001, 2004, 2007, 2010, 2013, 2016, 2019, 2022}
y1 := []float64{-100, 400, 1000, 1150, 1300, 1500, 1600, 1650, 1720, 1800, 1810, 1820, 1830, 1840, 1850, 1855, 1860, 1865, 1870, 1875, 1880, 1885, 1890, 1895, 1900, 1905, 1910, 1915, 1920, 1925, 1930, 1935, 1940, 1945, 1950, 1953, 1956, 1959, 1962, 1965, 1968, 1971, 1974, 1977, 1980, 1983, 1986, 1989, 1992, 1995, 1998, 2001, 2004, 2007, 2010, 2013, 2016, 2019, 2022, 2025}
a0 := []float64{20371.848, 11557.668, 6535.116, 1650.393, 1056.647, 681.149, 292.343, 109.127, 43.952, 12.068, 18.367, 15.678, 16.516, 10.804, 7.634, 9.338, 10.357, 9.04, 8.255, 2.371, -1.126, -3.21, -4.388, -3.884, -5.017, -1.977, 4.923, 11.142, 17.479, 21.617, 23.789, 24.418, 24.164, 24.426, 27.05, 28.932, 30.002, 30.76, 32.652, 33.621, 35.093, 37.956, 40.951, 44.244, 47.291, 50.361, 52.936, 54.984, 56.373, 58.453, 60.678, 62.898, 64.083, 64.553, 65.197, 66.061, 66.919, 68.130, 69.250, 69.296}
a1 := []float64{-9999.586, -5822.27, -5671.519, -753.21, -459.628, -421.345, -192.841, -78.697, -68.089, 2.507, -3.481, 0.021, -2.157, -6.018, -0.416, 1.642, -0.486, -0.591, -3.456, -5.593, -2.314, -1.893, 0.101, -0.531, 0.134, 5.715, 6.828, 6.33, 5.518, 3.02, 1.333, 0.052, -0.419, 1.645, 2.499, 1.127, 0.737, 1.409, 1.577, 0.868, 2.275, 3.035, 3.157, 3.199, 3.069, 2.878, 2.354, 1.577, 1.648, 2.235, 2.324, 1.804, 0.674, 0.466, 0.804, 0.839, 1.005, 1.348, 0.594, -0.227}
a2 := []float64{776.247, 1303.151, -298.291, 184.811, 108.771, 61.953, -6.572, 10.505, 38.333, 41.731, -1.126, 4.629, -6.806, 2.944, 2.658, 0.261, -2.389, 2.284, -5.148, 3.011, 0.269, 0.152, 1.842, -2.474, 3.138, 2.443, -1.329, 0.831, -1.643, -0.856, -0.831, -0.449, -0.022, 2.086, -1.232, 0.22, -0.61, 1.282, -1.115, 0.406, 1.002, -0.242, 0.364, -0.323, 0.193, -0.384, -0.14, -0.637, 0.708, -0.121, 0.21, -0.729, -0.402, 0.194, 0.144, -0.109, 0.275, 0.068, -0.822, 0.001}
a3 := []float64{409.16, -503.433, 1085.087, -25.346, -24.641, -29.414, 16.197, 3.018, -2.127, -37.939, 1.918, -3.812, 3.25, -0.096, -0.539, -0.883, 1.558, -2.477, 2.72, -0.914, -0.039, 0.563, -1.438, 1.871, -0.232, -1.257, 0.72, -0.825, 0.262, 0.008, 0.127, 0.142, 0.702, -1.106, 0.614, -0.277, 0.631, -0.799, 0.507, 0.199, -0.414, 0.202, -0.229, 0.172, -0.192, 0.081, -0.165, 0.448, -0.276, 0.11, -0.313, 0.109, 0.199, -0.017, -0.084, 0.128, -0.069, -0.297, 0.274, 0.086}
n := len(y0)
var i int
for i = n - 1; i >= 0; i-- {
if y >= y0[i] {
break
}
}
t := (y - y0[i]) / (y1[i] - y0[i])
dT := a0[i] + t*(a1[i]+t*(a2[i]+t*a3[i]))
return dT
}
func DeltaTv2(jd float64) float64 {
if jd > 2461041.5 || jd < 2441317.5 {
var y float64
if jd >= 2299160.5 {
y = (jd-2451544.5)/365.2425 + 2000
} else {
y = (jd+0.5)/365.25 - 4712
}
return DeltaTSplineY(y)
}
// 闰秒JD值
jdLeaps := []float64{2457754.5, 2457204.5, 2456109.5, 2454832.5,
2453736.5, 2451179.5, 2450630.5, 2450083.5,
2449534.5, 2449169.5, 2448804.5, 2448257.5,
2447892.5, 2447161.5, 2446247.5, 2445516.5,
2445151.5, 2444786.5, 2444239.5, 2443874.5,
2443509.5, 2443144.5, 2442778.5, 2442413.5,
2442048.5, 2441683.5, 2441499.5, 2441133.5}
n := len(jdLeaps)
DT := 42.184
for i := 0; i < n; i++ {
if jd > jdLeaps[i] {
DT += float64(n - i - 1)
break
}
}
return DT
}
func TD2UT(JDE float64, UT2TD bool) float64 { // true 世界时转力学时CC,false 力学时转世界时VV
Deltat := DeltaT(JDE, true)
@@ -243,93 +330,91 @@ func JDE2DateByZone(JD float64, tz *time.Location, byZone bool) time.Time {
Add(time.Duration(int64(1000000000 * tms))).In(tz)
}
func GetLunar(year, month, day int, tz float64) (lmonth, lday int, leap bool, result string) {
jde := JDECalc(year, month, float64(day)) //计算当前JDE时间
if month == 11 || month == 12 { //判断当前日期属于前一年周期还是后一年周期
//判断方法:当前日期与冬至日所在朔望月的关系
winterday := GetJQTime(year, 270) + tz //冬至日日期(世界时,北京时间)
Fday := TD2UT(CalcMoonS(float64(year)+11.0/12.0+5.0/30.0/12.0, 0), true) + tz //朔月(世界时,北京时间)
Yday := TD2UT(CalcMoonS(float64(year)+1.0, 0), true) + tz //下一朔月(世界时,北京时间)
if Fday-math.Floor(Fday) > 0.5 {
Fday = math.Floor(Fday) + 0.5
} else {
Fday = math.Floor(Fday) - 0.5
// Date2JDE 日期转儒略日
func Date2JDE(date time.Time) float64 {
day := float64(date.Day()) + float64(date.Hour())/24.0 + float64(date.Minute())/24.0/60.0 + float64(date.Second())/24.0/3600.0 + float64(date.Nanosecond())/1000000000.0/3600.0/24.0
return JDECalc(date.Year(), int(date.Month()), day)
}
func GetLunar(year, month, day int, tz float64) (adjustedYear, lmonth, lday int, leap bool, result string) {
julianDayEpoch := JDECalc(year, month, float64(day))
// 确定农历年份
adjustedYear = year
if month == 11 || month == 12 {
winterSolsticeDay := GetJQTime(year, 270) + tz
firstNewMoonDay := TD2UT(CalcMoonS(float64(year)+11.0/12.0+5.0/30.0/12.0, 0), true) + tz
nextNewMoonDay := TD2UT(CalcMoonS(float64(year)+1.0, 0), true) + tz
firstNewMoonDay = normalizeTimePoint(firstNewMoonDay)
nextNewMoonDay = normalizeTimePoint(nextNewMoonDay)
if winterSolsticeDay >= firstNewMoonDay && winterSolsticeDay < nextNewMoonDay && julianDayEpoch <= firstNewMoonDay {
adjustedYear--
}
if Yday-math.Floor(Yday) > 0.5 {
Yday = math.Floor(Yday) + 0.5
} else {
Yday = math.Floor(Yday) - 0.5
}
if winterday >= Fday && winterday < Yday && jde <= Fday {
year--
}
if winterday >= Yday && jde < Yday {
year--
if winterSolsticeDay >= nextNewMoonDay && julianDayEpoch < nextNewMoonDay {
adjustedYear--
}
} else {
year--
adjustedYear--
}
jieqi := GetJieqiLoops(year, 25) //一年的节气
moon := GetMoonLoops(float64(year), 17) //一年朔月日
winter1 := jieqi[0] - 8.0/24 + tz //第一年冬至日
winter2 := jieqi[24] - 8.0/24 + tz //第二年冬至日
for idx, v := range moon {
if tz != 8.0/24 {
v = v - 8.0/24 + tz
}
if v-math.Floor(v) > 0.5 {
moon[idx] = math.Floor(v) + 0.5
} else {
moon[idx] = math.Floor(v) - 0.5
}
} //置闰月为0点
for idx, v := range jieqi {
if tz != 8.0/24 {
v = v - 8.0/24 + tz
}
if v-math.Floor(v) > 0.5 {
jieqi[idx] = math.Floor(v) + 0.5
} else {
jieqi[idx] = math.Floor(v) - 0.5
}
} //置节气为0点
mooncount := 0 //年内朔望月计数
var min, max int = 20, 0 //最大最小计数
// 获取节气和朔望月数据
solarTerms := GetJieqiLoops(adjustedYear, 25)
newMoonDays := GetMoonLoops(float64(adjustedYear), 17)
// 计算冬至日期
winterSolsticeFirst := solarTerms[0] - 8.0/24 + tz
winterSolsticeSecond := solarTerms[24] - 8.0/24 + tz
// 规范化时间点
normalizeTimeArray(newMoonDays, tz)
normalizeTimeArray(solarTerms, tz)
// 计算朔望月范围
minMoonIndex, maxMoonIndex := 20, 0
moonCount := 0
for i := 0; i < 15; i++ {
if moon[i] >= winter1 && moon[i] < winter2 {
if i <= min {
min = i
if newMoonDays[i] >= winterSolsticeFirst && newMoonDays[i] < winterSolsticeSecond {
if i <= minMoonIndex {
minMoonIndex = i
}
if i >= max {
max = i
if i >= maxMoonIndex {
maxMoonIndex = i
}
mooncount++
moonCount++
}
}
leapmonth := 20
if mooncount == 13 { //存在闰月
var j, i = 2, 0
for i = min; i <= max; i++ {
if !(moon[i] <= jieqi[j] && moon[i+1] > jieqi[j]) {
// 确定闰月位置
leapMonthPos := 20
if moonCount == 13 {
solarTermIndex, i := 2, 0
for i = minMoonIndex; i <= maxMoonIndex; i++ {
if !(newMoonDays[i] <= solarTerms[solarTermIndex] && newMoonDays[i+1] > solarTerms[solarTermIndex]) {
break
}
j += 2
solarTermIndex += 2
}
leapmonth = i - min + 1
leapMonthPos = i - minMoonIndex + 1
}
i := 0
for i = min - 1; i <= max; i++ {
if moon[i] > jde {
// 找到当前月相索引
currentMoonIndex := 0
for currentMoonIndex = minMoonIndex - 1; currentMoonIndex <= maxMoonIndex; currentMoonIndex++ {
if newMoonDays[currentMoonIndex] > julianDayEpoch {
break
}
}
lmonth = i - min
var sleap bool = false
// 计算农历月份
lmonth = currentMoonIndex - minMoonIndex
shouldAdjustLeap := false
leap = false
if lmonth >= leapmonth {
sleap = true
if lmonth >= leapMonthPos {
shouldAdjustLeap = true
}
if lmonth == leapmonth {
if lmonth == leapMonthPos {
leap = true
}
if lmonth < 2 {
@@ -337,102 +422,125 @@ func GetLunar(year, month, day int, tz float64) (lmonth, lday int, leap bool, re
} else {
lmonth--
}
if sleap {
if shouldAdjustLeap {
lmonth--
}
if lmonth <= 0 {
lmonth += 12
}
lday = int(jde-moon[i-1]) + 1
strmonth := []string{"十", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"}
strday := []string{"初", "十", "廿", "三"}
if leap {
result += "闰"
}
if lmonth == 1 {
result += "正月"
} else {
result += strmonth[lmonth] + "月"
}
if lday == 20 {
result += "二十"
} else if lday == 10 {
result += "初十"
} else {
result += strday[lday/10] + strmonth[lday%10]
}
// 计算农历日期
lday = int(julianDayEpoch-newMoonDays[currentMoonIndex-1]) + 1
// 生成农历日期字符串
result = formatLunarDateString(lmonth, lday, leap)
return
}
func GetSolar(year, month, day int, leap bool, tz float64) float64 {
adjustedYear := year
if month < 11 {
year--
adjustedYear--
}
jieqi := GetJieqiLoops(year, 25) //一年的节气
moon := GetMoonLoops(float64(year), 17) //一年朔月日
winter1 := jieqi[0] - 8.0/24 + tz //第一年冬至日
winter2 := jieqi[24] - 8.0/24 + tz //第二年冬至日
for idx, v := range moon {
if tz != 8.0/24 {
v = v - 8.0/24 + tz
}
if v-math.Floor(v) > 0.5 {
moon[idx] = math.Floor(v) + 0.5
} else {
moon[idx] = math.Floor(v) - 0.5
}
} //置闰月为0点
for idx, v := range jieqi {
if tz != 8.0/24 {
v = v - 8.0/24 + tz
}
if v-math.Floor(v) > 0.5 {
jieqi[idx] = math.Floor(v) + 0.5
} else {
jieqi[idx] = math.Floor(v) - 0.5
}
} //置节气为0点
mooncount := 0 //年内朔望月计数
var min, max int = 20, 0 //最大最小计数
// 获取节气和朔望月数据
solarTerms := GetJieqiLoops(adjustedYear, 25)
newMoonDays := GetMoonLoops(float64(adjustedYear), 17)
// 计算冬至日期
winterSolsticeFirst := solarTerms[0] - 8.0/24 + tz
winterSolsticeSecond := solarTerms[24] - 8.0/24 + tz
// 规范化时间点
normalizeTimeArray(newMoonDays, tz)
normalizeTimeArray(solarTerms, tz)
// 计算朔望月范围
minMoonIndex, maxMoonIndex := 20, 0
moonCount := 0
for i := 0; i < 15; i++ {
if moon[i] >= winter1 && moon[i] < winter2 {
if i <= min {
min = i
if newMoonDays[i] >= winterSolsticeFirst && newMoonDays[i] < winterSolsticeSecond {
if i <= minMoonIndex {
minMoonIndex = i
}
if i >= max {
max = i
if i >= maxMoonIndex {
maxMoonIndex = i
}
mooncount++
moonCount++
}
}
leapmonth := 20
if mooncount == 13 { //存在闰月
var j, i = 2, 0
for i = min; i <= max; i++ {
if !(moon[i] <= jieqi[j] && moon[i+1] > jieqi[j]) {
// 确定闰月位置
leapMonthPos := 20
if moonCount == 13 {
solarTermIndex, i := 2, 0
for i = minMoonIndex; i <= maxMoonIndex; i++ {
if !(newMoonDays[i] <= solarTerms[solarTermIndex] && newMoonDays[i+1] > solarTerms[solarTermIndex]) {
break
}
j += 2
solarTermIndex += 2
}
leapmonth = i - min + 1
leapMonthPos = i - minMoonIndex + 1
}
// 计算实际月份索引
actualMonth := month
if leap {
month++
actualMonth++
}
if month > 10 {
month -= 11
if actualMonth > 10 {
actualMonth -= 11
} else {
month++
actualMonth++
}
if month >= leapmonth && !leap {
month++
if actualMonth >= leapMonthPos && !leap {
actualMonth++
}
jde := moon[min-1+month] + float64(day) - 1
return jde
return newMoonDays[minMoonIndex-1+actualMonth] + float64(day) - 1
}
// Date2JDE 日期转儒略日
func Date2JDE(date time.Time) float64 {
day := float64(date.Day()) + float64(date.Hour())/24.0 + float64(date.Minute())/24.0/60.0 + float64(date.Second())/24.0/3600.0 + float64(date.Nanosecond())/1000000000.0/3600.0/24.0
return JDECalc(date.Year(), int(date.Month()), day)
func normalizeTimeArray(timeArray []float64, tz float64) {
for idx, timeValue := range timeArray {
adjustedTime := timeValue
if tz != 8.0/24 {
adjustedTime = timeValue - 8.0/24 + tz
}
timeArray[idx] = normalizeTimePoint(adjustedTime)
}
}
func normalizeTimePoint(timePoint float64) float64 {
if timePoint-math.Floor(timePoint) > 0.5 {
return math.Floor(timePoint) + 0.5
}
return math.Floor(timePoint) - 0.5
}
func formatLunarDateString(lunarMonth, lunarDay int, isLeap bool) string {
monthNames := []string{"十", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"}
dayPrefixes := []string{"初", "十", "廿", "三"}
var dateString string
if isLeap {
dateString += "闰"
}
if lunarMonth == 1 {
dateString += "正月"
} else {
dateString += monthNames[lunarMonth] + "月"
}
if lunarDay == 20 {
dateString += "二十"
} else if lunarDay == 10 {
dateString += "初十"
} else {
dateString += dayPrefixes[lunarDay/10] + monthNames[lunarDay%10]
}
return dateString
}
+85
View File
@@ -132,3 +132,88 @@ func magicNumberSpilt(magic int32) (uint16, uint8) {
upper = uint16(magic >> 8)
return upper, lower
}
func TestGetJQTime(t *testing.T) {
originalFunc := func(Year, Angle int) float64 { //节气时间
var j int = 1
var Day int
var tp float64
if Angle%2 == 0 {
Day = 18
} else {
Day = 3
}
if Angle%10 != 0 {
tp = float64(Angle+15.0) / 30.0
} else {
tp = float64(Angle) / 30.0
}
Month := 3 + tp
if Month > 12 {
Month -= 12
}
JD1 := JDECalc(int(Year), int(Month), float64(Day))
if Angle == 0 {
Angle = 360
}
for i := 0; i < j; i++ {
for {
JD0 := JD1
stDegree := JQLospec(JD0, float64(Angle)) - float64(Angle)
stDegreep := (JQLospec(JD0+0.000005, float64(Angle)) - JQLospec(JD0-0.000005, float64(Angle))) / 0.00001
JD1 = JD0 - stDegree/stDegreep
if math.Abs(JD1-JD0) <= 0.00001 {
break
}
}
JD1 -= 0.001
}
JD1 += 0.001
return TD2UT(JD1, false)
}
// 测试数据:年份从1900-2200抽样,角度覆盖关键值
testCases := []struct {
year, angle int
}{
// 边界年份
{1900, 0}, {1900, 15}, {1900, 30}, {1900, 45}, {1900, 90},
{1900, 180}, {1900, 270}, {1900, 360},
// 中间年份抽样
{1950, 0}, {1950, 30}, {1950, 90}, {1950, 180}, {1950, 270},
{2000, 0}, {2000, 15}, {2000, 45}, {2000, 90}, {2000, 360},
{2023, 0}, {2023, 30}, {2023, 90}, {2023, 180}, {2023, 270},
// 未来年份抽样
{2100, 0}, {2100, 15}, {2100, 30}, {2100, 45}, {2100, 90},
{2100, 180}, {2100, 270}, {2100, 360},
{2200, 0}, {2200, 30}, {2200, 90}, {2200, 180}, {2200, 270},
}
// 执行测试
allPassed := true
for _, tc := range testCases {
originalResult := originalFunc(tc.year, tc.angle)
optimizedResult := GetJQTime(tc.year, tc.angle)
diff := math.Abs(originalResult - optimizedResult)
if diff > 1e-10 {
t.Errorf("测试失败: year=%d, angle=%d\n原始结果: %.15f\n优化结果: %.15f\n差异: %.15f",
tc.year, tc.angle, originalResult, optimizedResult, diff)
allPassed = false
} else {
t.Logf("测试通过: year=%d, angle=%d, 结果: %.15f",
tc.year, tc.angle, optimizedResult)
}
}
if allPassed {
t.Log("所有测试用例通过!优化函数与原始函数结果完全一致")
}
}
func TestJQ(t *testing.T) {
fmt.Println(GetJQTime(-721, 15))
}
+157 -117
View File
@@ -1430,162 +1430,202 @@ func MoonTimeAngle(JD, Lon, Lat, TZ float64) float64 {
return timeangle
}
func GetMoonRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 {
ntz := TZ
TZ = Lon / 15
var An, tms float64 = 0, 0
JDZ := math.Floor(JD) + 0.5
JD = math.Floor(JD) + 0.5 - ntz/24 + TZ/24.0 //求0时JDE
JD1 := JD
moonheight := MoonHeight(JD, Lon, Lat, TZ) //求此时月亮高度
if ZS != 0 {
An = -0.83333 //修正大气折射
}
An = An - HeightDegreeByLat(HEI, Lat)
moonang := MoonTimeAngle(JD, Lon, Lat, TZ)
if moonheight > 0 { //月亮在地平线上或在落下与下中天之间
if moonang > 180 {
tms = (180 + 360 - moonang) / 15
} else {
tms = (180 - moonang) / 15
}
JD1 += (tms/24 + (tms/24*12.0)/15.0/24.0)
func GetMoonRiseTime(julianDay, longitude, latitude, timeZone, zenithShift, height float64) float64 {
originalTimeZone := timeZone
timeZone = longitude / 15
var moonAngle, timeToMeridian float64 = 0, 0
julianDayZero := math.Floor(julianDay) + 0.5
julianDay = math.Floor(julianDay) + 0.5 - originalTimeZone/24 + timeZone/24 // 求0时JDE
estimatedTime := julianDay
moonHeight := MoonHeight(julianDay, longitude, latitude, timeZone) // 求此时月亮高度
if zenithShift != 0 {
moonAngle = -0.83333 // 修正大气折射
}
if moonheight < 0 && moonang > 180 {
tms = (180 - moonang) / 15
JD1 += (tms/24 + (tms/24*12.0)/15.0/24.0)
} else if moonheight < 0 && moonang < 180 {
tms = (180 - moonang) / 15
JD1 += (tms/24 + (tms/24*12.0)/15.0/24.0)
}
now := MoonTimeAngle(JD1, Lon, Lat, TZ)
if math.Abs(now-180) > 0.5 {
JD1 += (180 - now) * 4.0 / 60.0 / 24.0
}
hei := HMoonHeight(JD1, Lon, Lat, TZ)
if !(hei < -10 && math.Abs(Lat) < 60) {
if hei > An {
return -1 //拱
moonAngle = moonAngle - HeightDegreeByLat(height, latitude)
moonAngleTime := MoonTimeAngle(julianDay, longitude, latitude, timeZone)
if moonHeight > 0 { // 月亮在地平线上或在落下与下中天之间
if moonAngleTime > 180 {
timeToMeridian = (180 + 360 - moonAngleTime) / 15
} else {
timeToMeridian = (180 - moonAngleTime) / 15
}
reJde := JD1 + 12.0/24.0 + 6.0/15.0/24.0
mag := MoonTimeAngle(reJde, Lon, Lat, TZ)
if mag < 90 {
mag += 360
estimatedTime += (timeToMeridian/24 + (timeToMeridian/24*12.0)/15.0/24.0)
}
if moonHeight < 0 && moonAngleTime > 180 {
timeToMeridian = (180 - moonAngleTime) / 15
estimatedTime += (timeToMeridian/24 + (timeToMeridian/24*12.0)/15.0/24.0)
} else if moonHeight < 0 && moonAngleTime < 180 {
timeToMeridian = (180 - moonAngleTime) / 15
estimatedTime += (timeToMeridian/24 + (timeToMeridian/24*12.0)/15.0/24.0)
}
currentAngle := MoonTimeAngle(estimatedTime, longitude, latitude, timeZone)
if math.Abs(currentAngle-180) > 0.5 {
estimatedTime += (180 - currentAngle) * 4.0 / 60.0 / 24.0
}
currentHeight := HMoonHeight(estimatedTime, longitude, latitude, timeZone)
if !(currentHeight < -10 && math.Abs(latitude) < 60) {
if currentHeight > moonAngle {
return -1 // 拱
}
reJde += (360 - mag) * 4.0 / 60.0 / 24.0
if HMoonHeight(reJde, Lon, Lat, TZ) < An {
return -2 //沉
checkTime := estimatedTime + 12.0/24.0 + 6.0/15.0/24.0
checkAngle := MoonTimeAngle(checkTime, longitude, latitude, timeZone)
if checkAngle < 90 {
checkAngle += 360
}
checkTime += (360 - checkAngle) * 4.0 / 60.0 / 24.0
if HMoonHeight(checkTime, longitude, latitude, timeZone) < moonAngle {
return -2 // 沉
}
}
dec := MoonApparentDec(JD1, Lon, Lat, TZ)
tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat))
if math.Abs(tmp) <= 1 && Lat < 85 {
SJ := (180 - ArcCos(tmp)) / 15
JD1 += SJ/24.00 + SJ/33.00/15.00
moonDeclination := MoonApparentDec(estimatedTime, longitude, latitude, timeZone)
tmp := (Sin(moonAngle) - Sin(moonDeclination)*Sin(latitude)) / (Cos(moonDeclination) * Cos(latitude))
if math.Abs(tmp) <= 1 && latitude < 85 {
hourAngle := (180 - ArcCos(tmp)) / 15
estimatedTime += hourAngle/24.00 + hourAngle/33.00/15.00
} else {
i := 0
for MoonHeight(JD1, Lon, Lat, TZ) < An {
for MoonHeight(estimatedTime, longitude, latitude, timeZone) < moonAngle {
i++
JD1 += 15.0 / 60.0 / 24.0
estimatedTime += 15.0 / 60.0 / 24.0
if i > 48 {
break
}
}
}
for {
JD0 := JD1
stDegree := HMoonHeight(JD0, Lon, Lat, TZ) - An
stDegreep := (HMoonHeight(JD0+0.000005, Lon, Lat, TZ) - HMoonHeight(JD0-0.000005, Lon, Lat, TZ)) / 0.00001
JD1 = JD0 - stDegree/stDegreep
if math.Abs(JD1-JD0) <= 0.00002 {
break
}
}
JD1 = JD1 - TZ/24 + ntz/24
if JD1 > JDZ+1 || JD1 < JDZ {
return -3 //明日
// 使用牛顿迭代法求精确解
estimatedTime = moonRiseSetNewtonRaphsonIteration(estimatedTime, longitude, latitude, timeZone, moonAngle, HMoonHeight, 0.00002)
estimatedTime = estimatedTime - timeZone/24 + originalTimeZone/24
if estimatedTime > julianDayZero+1 || estimatedTime < julianDayZero {
return -3 // 明日
} else {
return JD1
return estimatedTime
}
}
func GetMoonDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 {
ntz := TZ
TZ = Lon / 15
var An, tms float64 = 0, 0
JDZ := math.Floor(JD) + 0.5
JD = math.Floor(JD) + 0.5 - ntz/24 + TZ/24 //求0时JDE
JD1 := JD
moonheight := MoonHeight(JD, Lon, Lat, TZ) //求此时月亮高度
if ZS != 0 {
An = -0.83333 //修正大气折射
func GetMoonSetTime(julianDay, longitude, latitude, timeZone, zenithShift, height float64) float64 {
originalTimeZone := timeZone
timeZone = longitude / 15
var moonAngle, timeToMeridian float64 = 0, 0
julianDayZero := math.Floor(julianDay) + 0.5
julianDay = math.Floor(julianDay) + 0.5 - originalTimeZone/24 + timeZone/24 // 求0时JDE
estimatedTime := julianDay
moonHeight := MoonHeight(julianDay, longitude, latitude, timeZone) // 求此时月亮高度
if zenithShift != 0 {
moonAngle = -0.83333 // 修正大气折射
}
An = An - HeightDegreeByLat(HEI, Lat)
moonang := MoonTimeAngle(JD, Lon, Lat, TZ)
if moonheight < 0 {
tms = (360 - moonang) / 15
JD1 += (tms/24 + (tms/24.0*12.0)/15.0/24.0)
moonAngle = moonAngle - HeightDegreeByLat(height, latitude)
moonAngleTime := MoonTimeAngle(julianDay, longitude, latitude, timeZone)
if moonHeight < 0 {
timeToMeridian = (360 - moonAngleTime) / 15
estimatedTime += (timeToMeridian/24 + (timeToMeridian/24.0*12.0)/15.0/24.0)
}
//月亮在地平线上或在落下与下中天之间
if moonheight > 0 && moonang < 180 {
tms = (-moonang) / 15
JD1 += (tms/24.0 + (tms/24.0*12.0)/15.0/24.0)
} else if moonheight > 0 {
tms = (360 - moonang) / 15
JD1 += (tms/24.0 + (tms/24.0*12.0)/15.0/24.0)
// 月亮在地平线上或在落下与下中天之间
if moonHeight > 0 && moonAngleTime < 180 {
timeToMeridian = (-moonAngleTime) / 15
estimatedTime += (timeToMeridian/24.0 + (timeToMeridian/24.0*12.0)/15.0/24.0)
} else if moonHeight > 0 {
timeToMeridian = (360 - moonAngleTime) / 15
estimatedTime += (timeToMeridian/24.0 + (timeToMeridian/24.0*12.0)/15.0/24.0)
}
now := MoonTimeAngle(JD1, Lon, Lat, TZ)
if now < 180 {
now += 360
currentAngle := MoonTimeAngle(estimatedTime, longitude, latitude, timeZone)
if currentAngle < 180 {
currentAngle += 360
}
if math.Abs(now-360) > 0.5 {
JD1 += (360 - now) * 4.0 / 60.0 / 24.0
if math.Abs(currentAngle-360) > 0.5 {
estimatedTime += (360 - currentAngle) * 4.0 / 60.0 / 24.0
}
//JD1=月球中天时间
hei := HMoonHeight(JD1, Lon, Lat, TZ)
if !(hei > 10 && math.Abs(Lat) < 60) {
if hei < An {
return -2 //沉
// estimatedTime = 月球中天时间
currentHeight := HMoonHeight(estimatedTime, longitude, latitude, timeZone)
if !(currentHeight > 10 && math.Abs(latitude) < 60) {
if currentHeight < moonAngle {
return -2 // 沉
}
reJde := JD1 + 12.0/24.0 + 6.0/15.0/24.0
sub := 180 - MoonTimeAngle(reJde, Lon, Lat, TZ)
reJde += sub * 4.0 / 60.0 / 24.0
if HMoonHeight(reJde, Lon, Lat, TZ) > An {
return -1 //
checkTime := estimatedTime + 12.0/24.0 + 6.0/15.0/24.0
angleSubtraction := 180 - MoonTimeAngle(checkTime, longitude, latitude, timeZone)
checkTime += angleSubtraction * 4.0 / 60.0 / 24.0
if HMoonHeight(checkTime, longitude, latitude, timeZone) > moonAngle {
return -1 //
}
}
dec := MoonApparentDec(JD1, Lon, Lat, TZ)
tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat))
if math.Abs(tmp) <= 1 && Lat < 85 {
SJ := (ArcCos(tmp)) / 15.0
JD1 += SJ/24 + SJ/33.0/15.0
moonDeclination := MoonApparentDec(estimatedTime, longitude, latitude, timeZone)
tmp := (Sin(moonAngle) - Sin(moonDeclination)*Sin(latitude)) / (Cos(moonDeclination) * Cos(latitude))
if math.Abs(tmp) <= 1 && latitude < 85 {
hourAngle := (ArcCos(tmp)) / 15.0
estimatedTime += hourAngle/24 + hourAngle/33.0/15.0
} else {
i := 0
for MoonHeight(JD1, Lon, Lat, TZ) > An {
for MoonHeight(estimatedTime, longitude, latitude, timeZone) > moonAngle {
i++
JD1 += 15.0 / 60.0 / 24.0
estimatedTime += 15.0 / 60.0 / 24.0
if i > 48 {
break
}
}
}
// 使用牛顿迭代法求精确解
estimatedTime = moonRiseSetNewtonRaphsonIteration(estimatedTime, longitude, latitude, timeZone, moonAngle, HMoonHeight, 0.00002)
estimatedTime = estimatedTime - timeZone/24 + originalTimeZone/24
if estimatedTime > julianDayZero+1 || estimatedTime < julianDayZero {
return -3 // 明日
} else {
return estimatedTime
}
}
// heightFunction 高度函数类型定义,用于牛顿迭代法
type heightFunction func(time, longitude, latitude, timeZone float64) float64
// moonRiseSetNewtonRaphsonIteration 牛顿-拉夫逊迭代法求解天体高度方程
func moonRiseSetNewtonRaphsonIteration(initialTime, longitude, latitude, timeZone, targetAngle float64,
heightFunc heightFunction, tolerance float64) float64 {
const derivativeStep = 0.000005
currentTime := initialTime
for {
JD0 := JD1
stDegree := HMoonHeight(JD0, Lon, Lat, TZ) - An
stDegreep := (HMoonHeight(JD0+0.000005, Lon, Lat, TZ) - HMoonHeight(JD0-0.000005, Lon, Lat, TZ)) / 0.00001
JD1 = JD0 - stDegree/stDegreep
if math.Abs(JD1-JD0) <= 0.00002 {
previousTime := currentTime
// 计算函数值:f(t) = height(t) - targetAngle
functionValue := heightFunc(previousTime, longitude, latitude, timeZone) - targetAngle
// 计算导数:f'(t) ≈ (f(t+h) - f(t-h)) / (2h)
derivative := (heightFunc(previousTime+derivativeStep, longitude, latitude, timeZone) -
heightFunc(previousTime-derivativeStep, longitude, latitude, timeZone)) / (2 * derivativeStep)
// 牛顿-拉夫逊公式:t_new = t_old - f(t) / f'(t)
currentTime = previousTime - functionValue/derivative
// 检查收敛
if math.Abs(currentTime-previousTime) <= tolerance {
break
}
}
JD1 = JD1 - TZ/24 + ntz/24
if JD1 > JDZ+1 || JD1 < JDZ {
return -3 //明日
} else {
return JD1
}
return currentTime
}
func GetMoonCir() [][][]float64 {
+737 -2
View File
@@ -19,7 +19,7 @@ func Benchmark_MoonRiseBench(b *testing.B) {
func Test_MoonDown(t *testing.T) {
jde := GetNowJDE()
for i := 30.0; i < 90.0; i += 0.3 {
fmt.Println(i, GetMoonDownTime(jde, 115, float64(i), 8, 1, 0))
fmt.Println(i, GetMoonSetTime(jde, 115, float64(i), 8, 1, 0))
}
}
func Test_MoonDiff(t *testing.T) {
@@ -100,5 +100,740 @@ func TestMoonCu(t *testing.T) {
//ra, dec := HMoonApparentRaDec(jde, 115, 23, 8)
//fmt.Println(tools.Format(ra/15, 1), tools.Format(dec, 0))
//fmt.Println(JDE2Date(GetMoonTZTime(jde, 115, 23, 8)))
//fmt.Println(JDE2Date(GetMoonDownTime(jde+1, 115, 23, 8, 1, 0)))
//fmt.Println(JDE2Date(GetMoonSetTime(jde+1, 115, 23, 8, 1, 0)))
}
// MoonRiseSetTestCase 月出月落测试用例
type MoonRiseSetTestCase struct {
Year int
Month int
Day float64
Longitude float64
Latitude float64
TimeZone float64
ZenithShift float64
Height float64
ExpectedRise float64
ExpectedSet float64
}
// moonRiseSetTestData 月出月落测试数据
var moonRiseSetTestData = []MoonRiseSetTestCase{
{2023, 1, 15.0, 116.4074, 39.9042, 8.0, 0, 0, 2459959.512382, 2459959.985558},
{2023, 1, 15.0, 116.4074, 39.9042, 8.0, 0, 100, 2459959.511766, 2459959.986159},
{2023, 1, 15.0, 116.4074, 39.9042, 8.0, 0, 1000, 2459959.510432, 2459959.987458},
{2023, 1, 15.0, 116.4074, 39.9042, 8.0, 1, 0, 2459959.509182, 2459959.988676},
{2023, 1, 15.0, 116.4074, 39.9042, 8.0, 1, 100, 2459959.508566, 2459959.989275},
{2023, 1, 15.0, 116.4074, 39.9042, 8.0, 1, 1000, 2459959.507235, 2459959.990571},
{2023, 3, 20.0, 116.4074, 39.9042, 8.0, 0, 0, 2460023.743390, 2460024.191155},
{2023, 3, 20.0, 116.4074, 39.9042, 8.0, 0, 100, 2460023.742758, 2460024.191788},
{2023, 3, 20.0, 116.4074, 39.9042, 8.0, 0, 1000, 2460023.741392, 2460024.193155},
{2023, 3, 20.0, 116.4074, 39.9042, 8.0, 1, 0, 2460023.740112, 2460024.194436},
{2023, 3, 20.0, 116.4074, 39.9042, 8.0, 1, 100, 2460023.739482, 2460024.195066},
{2023, 3, 20.0, 116.4074, 39.9042, 8.0, 1, 1000, 2460023.738121, 2460024.196429},
{2023, 6, 21.0, 116.4074, 39.9042, 8.0, 0, 0, 2460116.797325, 2460117.432318},
{2023, 6, 21.0, 116.4074, 39.9042, 8.0, 0, 100, 2460116.796603, 2460117.433002},
{2023, 6, 21.0, 116.4074, 39.9042, 8.0, 0, 1000, 2460116.795036, 2460117.434483},
{2023, 6, 21.0, 116.4074, 39.9042, 8.0, 1, 0, 2460116.793560, 2460117.435878},
{2023, 6, 21.0, 116.4074, 39.9042, 8.0, 1, 100, 2460116.792831, 2460117.436567},
{2023, 6, 21.0, 116.4074, 39.9042, 8.0, 1, 1000, 2460116.791249, 2460117.438061},
{2023, 9, 23.0, 116.4074, 39.9042, 8.0, 0, 0, 2460211.101507, 2460211.459840},
{2023, 9, 23.0, 116.4074, 39.9042, 8.0, 0, 100, 2460211.100724, 2460211.460617},
{2023, 9, 23.0, 116.4074, 39.9042, 8.0, 0, 1000, 2460211.099038, 2460211.462289},
{2023, 9, 23.0, 116.4074, 39.9042, 8.0, 1, 0, 2460211.097463, 2460211.463851},
{2023, 9, 23.0, 116.4074, 39.9042, 8.0, 1, 100, 2460211.096690, 2460211.464618},
{2023, 9, 23.0, 116.4074, 39.9042, 8.0, 1, 1000, 2460211.095023, 2460211.466271},
{2023, 12, 22.0, 116.4074, 39.9042, 8.0, 0, 0, 2460301.062528, 2460300.594160},
{2023, 12, 22.0, 116.4074, 39.9042, 8.0, 0, 100, 2460301.061909, 2460300.594781},
{2023, 12, 22.0, 116.4074, 39.9042, 8.0, 0, 1000, 2460301.060570, 2460300.596125},
{2023, 12, 22.0, 116.4074, 39.9042, 8.0, 1, 0, 2460301.059311, 2460300.597387},
{2023, 12, 22.0, 116.4074, 39.9042, 8.0, 1, 100, 2460301.058690, 2460300.598010},
{2023, 12, 22.0, 116.4074, 39.9042, 8.0, 1, 1000, 2460301.057346, 2460300.599358},
{2024, 2, 29.0, 116.4074, 39.9042, 8.0, 0, 0, 2460370.449673, 2460369.861269},
{2024, 2, 29.0, 116.4074, 39.9042, 8.0, 0, 100, 2460370.449022, 2460369.861882},
{2024, 2, 29.0, 116.4074, 39.9042, 8.0, 0, 1000, 2460370.447616, 2460369.863206},
{2024, 2, 29.0, 116.4074, 39.9042, 8.0, 1, 0, 2460370.446299, 2460369.864446},
{2024, 2, 29.0, 116.4074, 39.9042, 8.0, 1, 100, 2460370.445651, 2460369.865057},
{2024, 2, 29.0, 116.4074, 39.9042, 8.0, 1, 1000, 2460370.444251, 2460369.866377},
{2025, 7, 4.0, 116.4074, 39.9042, 8.0, 0, 0, 2460861.080905, 2460860.500448},
{2025, 7, 4.0, 116.4074, 39.9042, 8.0, 0, 100, 2460861.080262, 2460860.501055},
{2025, 7, 4.0, 116.4074, 39.9042, 8.0, 0, 1000, 2460861.078875, 2460860.502366},
{2025, 7, 4.0, 116.4074, 39.9042, 8.0, 1, 0, 2460861.077574, 2460860.503595},
{2025, 7, 4.0, 116.4074, 39.9042, 8.0, 1, 100, 2460861.076935, 2460860.504200},
{2025, 7, 4.0, 116.4074, 39.9042, 8.0, 1, 1000, 2460861.075553, 2460860.505508},
{2023, 1, 15.0, -0.1276, 51.5074, 0.0, 0, 0, 2459959.528073, 2459959.967571},
{2023, 1, 15.0, -0.1276, 51.5074, 0.0, 0, 100, 2459959.527292, 2459959.968329},
{2023, 1, 15.0, -0.1276, 51.5074, 0.0, 0, 1000, 2459959.525607, 2459959.969964},
{2023, 1, 15.0, -0.1276, 51.5074, 0.0, 1, 0, 2459959.524029, 2459959.971495},
{2023, 1, 15.0, -0.1276, 51.5074, 0.0, 1, 100, 2459959.523252, 2459959.972249},
{2023, 1, 15.0, -0.1276, 51.5074, 0.0, 1, 1000, 2459959.521574, 2459959.973876},
{2023, 3, 20.0, -0.1276, 51.5074, 0.0, 0, 0, 2460023.756367, 2460024.186083},
{2023, 3, 20.0, -0.1276, 51.5074, 0.0, 0, 100, 2460023.755588, 2460024.186873},
{2023, 3, 20.0, -0.1276, 51.5074, 0.0, 0, 1000, 2460023.753909, 2460024.188577},
{2023, 3, 20.0, -0.1276, 51.5074, 0.0, 1, 0, 2460023.752338, 2460024.190171},
{2023, 3, 20.0, -0.1276, 51.5074, 0.0, 1, 100, 2460023.751564, 2460024.190956},
{2023, 3, 20.0, -0.1276, 51.5074, 0.0, 1, 1000, 2460023.749895, 2460024.192651},
{2023, 6, 21.0, -0.1276, 51.5074, 0.0, 0, 0, 2460116.767473, 2460117.458902},
{2023, 6, 21.0, -0.1276, 51.5074, 0.0, 0, 100, 2460116.766492, 2460117.459792},
{2023, 6, 21.0, -0.1276, 51.5074, 0.0, 0, 1000, 2460116.764358, 2460117.461726},
{2023, 6, 21.0, -0.1276, 51.5074, 0.0, 1, 0, 2460116.762340, 2460117.463551},
{2023, 6, 21.0, -0.1276, 51.5074, 0.0, 1, 100, 2460116.761338, 2460117.464456},
{2023, 6, 21.0, -0.1276, 51.5074, 0.0, 1, 1000, 2460116.759156, 2460117.466421},
{2023, 9, 23.0, -0.1276, 51.5074, 0.0, 0, 0, 2460211.152489, 2460211.418569},
{2023, 9, 23.0, -0.1276, 51.5074, 0.0, 0, 100, 2460211.151311, 2460211.419741},
{2023, 9, 23.0, -0.1276, 51.5074, 0.0, 0, 1000, 2460211.148791, 2460211.422249},
{2023, 9, 23.0, -0.1276, 51.5074, 0.0, 1, 0, 2460211.146459, 2460211.424570},
{2023, 9, 23.0, -0.1276, 51.5074, 0.0, 1, 100, 2460211.145319, 2460211.425704},
{2023, 9, 23.0, -0.1276, 51.5074, 0.0, 1, 1000, 2460211.142878, 2460211.428132},
{2023, 12, 22.0, -0.1276, 51.5074, 0.0, 0, 0, 2460301.041592, 2460300.614867},
{2023, 12, 22.0, -0.1276, 51.5074, 0.0, 0, 100, 2460301.040804, 2460300.615663},
{2023, 12, 22.0, -0.1276, 51.5074, 0.0, 0, 1000, 2460301.039097, 2460300.617388},
{2023, 12, 22.0, -0.1276, 51.5074, 0.0, 1, 0, 2460301.037491, 2460300.619011},
{2023, 12, 22.0, -0.1276, 51.5074, 0.0, 1, 100, 2460301.036696, 2460300.619812},
{2023, 12, 22.0, -0.1276, 51.5074, 0.0, 1, 1000, 2460301.034975, 2460300.621551},
{2024, 2, 29.0, -0.1276, 51.5074, 0.0, 0, 0, 2460370.477943, 2460369.838418},
{2024, 2, 29.0, -0.1276, 51.5074, 0.0, 0, 100, 2460370.477078, 2460369.839203},
{2024, 2, 29.0, -0.1276, 51.5074, 0.0, 0, 1000, 2460370.475212, 2460369.840897},
{2024, 2, 29.0, -0.1276, 51.5074, 0.0, 1, 0, 2460370.473471, 2460369.842481},
{2024, 2, 29.0, -0.1276, 51.5074, 0.0, 1, 100, 2460370.472615, 2460369.843260},
{2024, 2, 29.0, -0.1276, 51.5074, 0.0, 1, 1000, 2460370.470771, 2460369.844941},
{2025, 7, 4.0, -0.1276, 51.5074, 0.0, 0, 0, 2460861.106361, 2460861.487905},
{2025, 7, 4.0, -0.1276, 51.5074, 0.0, 0, 100, 2460861.105517, 2460861.488735},
{2025, 7, 4.0, -0.1276, 51.5074, 0.0, 0, 1000, 2460861.103697, 2460861.490524},
{2025, 7, 4.0, -0.1276, 51.5074, 0.0, 1, 0, 2460861.101998, 2460861.492193},
{2025, 7, 4.0, -0.1276, 51.5074, 0.0, 1, 100, 2460861.101162, 2460861.493015},
{2025, 7, 4.0, -0.1276, 51.5074, 0.0, 1, 1000, 2460861.099360, 2460861.494784},
{2023, 1, 15.0, -74.0060, 40.7128, -5.0, 0, 0, 2459959.524199, 2459959.980835},
{2023, 1, 15.0, -74.0060, 40.7128, -5.0, 0, 100, 2459959.523565, 2459959.981455},
{2023, 1, 15.0, -74.0060, 40.7128, -5.0, 0, 1000, 2459959.522195, 2459959.982795},
{2023, 1, 15.0, -74.0060, 40.7128, -5.0, 1, 0, 2459959.520911, 2459959.984050},
{2023, 1, 15.0, -74.0060, 40.7128, -5.0, 1, 100, 2459959.520279, 2459959.984669},
{2023, 1, 15.0, -74.0060, 40.7128, -5.0, 1, 1000, 2459959.518912, 2459959.986004},
{2023, 3, 20.0, -74.0060, 40.7128, -5.0, 0, 0, 2460023.742085, 2460024.205917},
{2023, 3, 20.0, -74.0060, 40.7128, -5.0, 0, 100, 2460023.741461, 2460024.206545},
{2023, 3, 20.0, -74.0060, 40.7128, -5.0, 0, 1000, 2460023.740113, 2460024.207902},
{2023, 3, 20.0, -74.0060, 40.7128, -5.0, 1, 0, 2460023.738849, 2460024.209175},
{2023, 3, 20.0, -74.0060, 40.7128, -5.0, 1, 100, 2460023.738227, 2460024.209801},
{2023, 3, 20.0, -74.0060, 40.7128, -5.0, 1, 1000, 2460023.736882, 2460024.211155},
{2023, 6, 21.0, -74.0060, 40.7128, -5.0, 0, 0, 2460116.805442, 2460117.432629},
{2023, 6, 21.0, -74.0060, 40.7128, -5.0, 0, 100, 2460116.804724, 2460117.433304},
{2023, 6, 21.0, -74.0060, 40.7128, -5.0, 0, 1000, 2460116.803169, 2460117.434767},
{2023, 6, 21.0, -74.0060, 40.7128, -5.0, 1, 0, 2460116.801705, 2460117.436144},
{2023, 6, 21.0, -74.0060, 40.7128, -5.0, 1, 100, 2460116.800981, 2460117.436824},
{2023, 6, 21.0, -74.0060, 40.7128, -5.0, 1, 1000, 2460116.799411, 2460117.438298},
{2023, 9, 23.0, -74.0060, 40.7128, -5.0, 0, 0, 2460211.112450, 2460211.469949},
{2023, 9, 23.0, -74.0060, 40.7128, -5.0, 0, 100, 2460211.111661, 2460211.470732},
{2023, 9, 23.0, -74.0060, 40.7128, -5.0, 0, 1000, 2460211.109960, 2460211.472418},
{2023, 9, 23.0, -74.0060, 40.7128, -5.0, 1, 0, 2460211.108372, 2460211.473992},
{2023, 9, 23.0, -74.0060, 40.7128, -5.0, 1, 100, 2460211.107592, 2460211.474766},
{2023, 9, 23.0, -74.0060, 40.7128, -5.0, 1, 1000, 2460211.105912, 2460211.476431},
{2023, 12, 22.0, -74.0060, 40.7128, -5.0, 0, 0, 2460301.058738, 2460300.608360},
{2023, 12, 22.0, -74.0060, 40.7128, -5.0, 0, 100, 2460301.058096, 2460300.609002},
{2023, 12, 22.0, -74.0060, 40.7128, -5.0, 0, 1000, 2460301.056706, 2460300.610392},
{2023, 12, 22.0, -74.0060, 40.7128, -5.0, 1, 0, 2460301.055399, 2460300.611699},
{2023, 12, 22.0, -74.0060, 40.7128, -5.0, 1, 100, 2460301.054753, 2460300.612344},
{2023, 12, 22.0, -74.0060, 40.7128, -5.0, 1, 1000, 2460301.053356, 2460300.613740},
{2024, 2, 29.0, -74.0060, 40.7128, -5.0, 0, 0, 2460370.461773, 2460369.855646},
{2024, 2, 29.0, -74.0060, 40.7128, -5.0, 0, 100, 2460370.461094, 2460369.856281},
{2024, 2, 29.0, -74.0060, 40.7128, -5.0, 0, 1000, 2460370.459628, 2460369.857653},
{2024, 2, 29.0, -74.0060, 40.7128, -5.0, 1, 0, 2460370.458256, 2460369.858938},
{2024, 2, 29.0, -74.0060, 40.7128, -5.0, 1, 100, 2460370.457581, 2460369.859571},
{2024, 2, 29.0, -74.0060, 40.7128, -5.0, 1, 1000, 2460370.456124, 2460369.860937},
{2025, 7, 4.0, -74.0060, 40.7128, -5.0, 0, 0, 2460861.092013, -3.000000},
{2025, 7, 4.0, -74.0060, 40.7128, -5.0, 0, 100, 2460861.091345, -3.000000},
{2025, 7, 4.0, -74.0060, 40.7128, -5.0, 0, 1000, 2460861.089903, -3.000000},
{2025, 7, 4.0, -74.0060, 40.7128, -5.0, 1, 0, 2460861.088553, -3.000000},
{2025, 7, 4.0, -74.0060, 40.7128, -5.0, 1, 100, 2460861.087889, -3.000000},
{2025, 7, 4.0, -74.0060, 40.7128, -5.0, 1, 1000, 2460861.086455, -3.000000},
{2023, 1, 15.0, 151.2093, -33.8688, 10.0, 0, 0, 2459960.490771, 2459960.006541},
{2023, 1, 15.0, 151.2093, -33.8688, 10.0, 0, 100, 2459960.490206, 2459960.007105},
{2023, 1, 15.0, 151.2093, -33.8688, 10.0, 0, 1000, 2459960.488984, 2459960.008325},
{2023, 1, 15.0, 151.2093, -33.8688, 10.0, 1, 0, 2459960.487836, 2459960.009472},
{2023, 1, 15.0, 151.2093, -33.8688, 10.0, 1, 100, 2459960.487270, 2459960.010038},
{2023, 1, 15.0, 151.2093, -33.8688, 10.0, 1, 1000, 2459960.486046, 2459960.011261},
{2023, 3, 20.0, 151.2093, -33.8688, 10.0, 0, 0, 2460023.660650, 2460024.225595},
{2023, 3, 20.0, 151.2093, -33.8688, 10.0, 0, 100, 2460023.660054, 2460024.226157},
{2023, 3, 20.0, 151.2093, -33.8688, 10.0, 0, 1000, 2460023.658765, 2460024.227373},
{2023, 3, 20.0, 151.2093, -33.8688, 10.0, 1, 0, 2460023.657552, 2460024.228516},
{2023, 3, 20.0, 151.2093, -33.8688, 10.0, 1, 100, 2460023.656954, 2460024.229079},
{2023, 3, 20.0, 151.2093, -33.8688, 10.0, 1, 1000, 2460023.655660, 2460024.230298},
{2023, 6, 21.0, 151.2093, -33.8688, 10.0, 0, 0, 2460116.898383, 2460117.306845},
{2023, 6, 21.0, 151.2093, -33.8688, 10.0, 0, 100, 2460116.897736, 2460117.307485},
{2023, 6, 21.0, 151.2093, -33.8688, 10.0, 0, 1000, 2460116.896339, 2460117.308867},
{2023, 6, 21.0, 151.2093, -33.8688, 10.0, 1, 0, 2460116.895031, 2460117.310161},
{2023, 6, 21.0, 151.2093, -33.8688, 10.0, 1, 100, 2460116.894388, 2460117.310797},
{2023, 6, 21.0, 151.2093, -33.8688, 10.0, 1, 1000, 2460116.892999, 2460117.312170},
{2023, 9, 23.0, 151.2093, -33.8688, 10.0, 0, 0, 2460210.944935, 2460210.538063},
{2023, 9, 23.0, 151.2093, -33.8688, 10.0, 0, 100, 2460210.944257, 2460210.538734},
{2023, 9, 23.0, 151.2093, -33.8688, 10.0, 0, 1000, 2460210.942787, 2460210.540189},
{2023, 9, 23.0, 151.2093, -33.8688, 10.0, 1, 0, 2460210.941402, 2460210.541559},
{2023, 9, 23.0, 151.2093, -33.8688, 10.0, 1, 100, 2460210.940719, 2460210.542236},
{2023, 9, 23.0, 151.2093, -33.8688, 10.0, 1, 1000, 2460210.939236, 2460210.543703},
{2023, 12, 22.0, 151.2093, -33.8688, 10.0, 0, 0, 2460301.101438, 2460300.536189},
{2023, 12, 22.0, 151.2093, -33.8688, 10.0, 0, 100, 2460301.100851, 2460300.536745},
{2023, 12, 22.0, 151.2093, -33.8688, 10.0, 0, 1000, 2460301.099584, 2460300.537947},
{2023, 12, 22.0, 151.2093, -33.8688, 10.0, 1, 0, 2460301.098395, 2460300.539074},
{2023, 12, 22.0, 151.2093, -33.8688, 10.0, 1, 100, 2460301.097810, 2460300.539629},
{2023, 12, 22.0, 151.2093, -33.8688, 10.0, 1, 1000, 2460301.096546, 2460300.540829},
{2024, 2, 29.0, 151.2093, -33.8688, 10.0, 0, 0, 2460370.367522, 2460369.898187},
{2024, 2, 29.0, 151.2093, -33.8688, 10.0, 0, 100, 2460370.366947, 2460369.898759},
{2024, 2, 29.0, 151.2093, -33.8688, 10.0, 0, 1000, 2460370.365705, 2460369.899996},
{2024, 2, 29.0, 151.2093, -33.8688, 10.0, 1, 0, 2460370.364537, 2460369.901160},
{2024, 2, 29.0, 151.2093, -33.8688, 10.0, 1, 100, 2460370.363961, 2460369.901733},
{2024, 2, 29.0, 151.2093, -33.8688, 10.0, 1, 1000, 2460370.362714, 2460369.902974},
{2025, 7, 4.0, 151.2093, -33.8688, 10.0, 0, 0, 2460861.005584, 2460860.530894},
{2025, 7, 4.0, 151.2093, -33.8688, 10.0, 0, 100, 2460861.005015, 2460860.531462},
{2025, 7, 4.0, 151.2093, -33.8688, 10.0, 0, 1000, 2460861.003784, 2460860.532690},
{2025, 7, 4.0, 151.2093, -33.8688, 10.0, 1, 0, 2460861.002627, 2460860.533844},
{2025, 7, 4.0, 151.2093, -33.8688, 10.0, 1, 100, 2460861.002057, 2460860.534413},
{2025, 7, 4.0, 151.2093, -33.8688, 10.0, 1, 1000, 2460861.000823, 2460860.535644},
{2023, 1, 15.0, 139.6503, 35.6762, 9.0, 0, 0, -3.000000, 2459959.964633},
{2023, 1, 15.0, 139.6503, 35.6762, 9.0, 0, 100, -3.000000, 2459959.965199},
{2023, 1, 15.0, 139.6503, 35.6762, 9.0, 0, 1000, -3.000000, 2459959.966422},
{2023, 1, 15.0, 139.6503, 35.6762, 9.0, 1, 0, -3.000000, 2459959.967570},
{2023, 1, 15.0, 139.6503, 35.6762, 9.0, 1, 100, -3.000000, 2459959.968135},
{2023, 1, 15.0, 139.6503, 35.6762, 9.0, 1, 1000, -3.000000, 2459959.969356},
{2023, 3, 20.0, 139.6503, 35.6762, 9.0, 0, 0, 2460023.713764, 2460024.169244},
{2023, 3, 20.0, 139.6503, 35.6762, 9.0, 0, 100, 2460023.713167, 2460024.169838},
{2023, 3, 20.0, 139.6503, 35.6762, 9.0, 0, 1000, 2460023.711878, 2460024.171123},
{2023, 3, 20.0, 139.6503, 35.6762, 9.0, 1, 0, 2460023.710670, 2460024.172328},
{2023, 3, 20.0, 139.6503, 35.6762, 9.0, 1, 100, 2460023.710075, 2460024.172921},
{2023, 3, 20.0, 139.6503, 35.6762, 9.0, 1, 1000, 2460023.708791, 2460024.174202},
{2023, 6, 21.0, 139.6503, 35.6762, 9.0, 0, 0, 2460116.781251, 2460117.399403},
{2023, 6, 21.0, 139.6503, 35.6762, 9.0, 0, 100, 2460116.780582, 2460117.400040},
{2023, 6, 21.0, 139.6503, 35.6762, 9.0, 0, 1000, 2460116.779133, 2460117.401421},
{2023, 6, 21.0, 139.6503, 35.6762, 9.0, 1, 0, 2460116.777769, 2460117.402720},
{2023, 6, 21.0, 139.6503, 35.6762, 9.0, 1, 100, 2460116.777095, 2460117.403362},
{2023, 6, 21.0, 139.6503, 35.6762, 9.0, 1, 1000, 2460116.775635, 2460117.404751},
{2023, 9, 23.0, 139.6503, 35.6762, 9.0, 0, 0, 2460211.063872, 2460211.445971},
{2023, 9, 23.0, 139.6503, 35.6762, 9.0, 0, 100, 2460211.063158, 2460211.446679},
{2023, 9, 23.0, 139.6503, 35.6762, 9.0, 0, 1000, 2460211.061618, 2460211.448205},
{2023, 9, 23.0, 139.6503, 35.6762, 9.0, 1, 0, 2460211.060178, 2460211.449632},
{2023, 9, 23.0, 139.6503, 35.6762, 9.0, 1, 100, 2460211.059470, 2460211.450334},
{2023, 9, 23.0, 139.6503, 35.6762, 9.0, 1, 1000, 2460211.057944, 2460211.451846},
{2023, 12, 22.0, 139.6503, 35.6762, 9.0, 0, 0, 2460301.042488, 2460300.564993},
{2023, 12, 22.0, 139.6503, 35.6762, 9.0, 0, 100, 2460301.041906, 2460300.565575},
{2023, 12, 22.0, 139.6503, 35.6762, 9.0, 0, 1000, 2460301.040647, 2460300.566835},
{2023, 12, 22.0, 139.6503, 35.6762, 9.0, 1, 0, 2460301.039464, 2460300.568019},
{2023, 12, 22.0, 139.6503, 35.6762, 9.0, 1, 100, 2460301.038880, 2460300.568603},
{2023, 12, 22.0, 139.6503, 35.6762, 9.0, 1, 1000, 2460301.037617, 2460300.569866},
{2024, 2, 29.0, 139.6503, 35.6762, 9.0, 0, 0, 2460370.418418, 2460369.841663},
{2024, 2, 29.0, 139.6503, 35.6762, 9.0, 0, 100, 2460370.417811, 2460369.842239},
{2024, 2, 29.0, 139.6503, 35.6762, 9.0, 0, 1000, 2460370.416500, 2460369.843482},
{2024, 2, 29.0, 139.6503, 35.6762, 9.0, 1, 0, 2460370.415270, 2460369.844648},
{2024, 2, 29.0, 139.6503, 35.6762, 9.0, 1, 100, 2460370.414665, 2460369.845222},
{2024, 2, 29.0, 139.6503, 35.6762, 9.0, 1, 1000, 2460370.413358, 2460369.846462},
{2025, 7, 4.0, 139.6503, 35.6762, 9.0, 0, 0, 2460861.050307, 2460861.497476},
{2025, 7, 4.0, 139.6503, 35.6762, 9.0, 0, 100, 2460861.049707, 2460861.498067},
{2025, 7, 4.0, 139.6503, 35.6762, 9.0, 0, 1000, 2460861.048410, 2460861.499345},
{2025, 7, 4.0, 139.6503, 35.6762, 9.0, 1, 0, 2460861.047194, -3.000000},
{2025, 7, 4.0, 139.6503, 35.6762, 9.0, 1, 100, 2460861.046596, -3.000000},
{2025, 7, 4.0, 139.6503, 35.6762, 9.0, 1, 1000, 2460861.045303, -3.000000},
{2023, 1, 15.0, 2.3522, 48.8566, 1.0, 0, 0, 2459959.559564, 2459960.005972},
{2023, 1, 15.0, 2.3522, 48.8566, 1.0, 0, 100, 2459959.558830, 2459960.006686},
{2023, 1, 15.0, 2.3522, 48.8566, 1.0, 0, 1000, 2459959.557244, 2459960.008228},
{2023, 1, 15.0, 2.3522, 48.8566, 1.0, 1, 0, 2459959.555759, 2459960.009670},
{2023, 1, 15.0, 2.3522, 48.8566, 1.0, 1, 100, 2459959.555028, 2459960.010381},
{2023, 1, 15.0, 2.3522, 48.8566, 1.0, 1, 1000, 2459959.553448, 2459960.011915},
{2023, 3, 20.0, 2.3522, 48.8566, 1.0, 0, 0, 2460023.786730, 2460024.223914},
{2023, 3, 20.0, 2.3522, 48.8566, 1.0, 0, 100, 2460023.785997, 2460024.224655},
{2023, 3, 20.0, 2.3522, 48.8566, 1.0, 0, 1000, 2460023.784414, 2460024.226257},
{2023, 3, 20.0, 2.3522, 48.8566, 1.0, 1, 0, 2460023.782934, 2460024.227755},
{2023, 3, 20.0, 2.3522, 48.8566, 1.0, 1, 100, 2460023.782205, 2460024.228493},
{2023, 3, 20.0, 2.3522, 48.8566, 1.0, 1, 1000, 2460023.780631, 2460024.230087},
{2023, 6, 21.0, 2.3522, 48.8566, 1.0, 0, 0, 2460116.811447, 2460117.485600},
{2023, 6, 21.0, 2.3522, 48.8566, 1.0, 0, 100, 2460116.810552, 2460117.486423},
{2023, 6, 21.0, 2.3522, 48.8566, 1.0, 0, 1000, 2460116.808608, 2460117.488210},
{2023, 6, 21.0, 2.3522, 48.8566, 1.0, 1, 0, 2460116.806771, 2460117.489894},
{2023, 6, 21.0, 2.3522, 48.8566, 1.0, 1, 100, 2460116.805861, 2460117.490728},
{2023, 6, 21.0, 2.3522, 48.8566, 1.0, 1, 1000, 2460116.803882, 2460117.492539},
{2023, 9, 23.0, 2.3522, 48.8566, 1.0, 0, 0, 2460211.173246, 2460211.466625},
{2023, 9, 23.0, 2.3522, 48.8566, 1.0, 0, 100, 2460211.172210, 2460211.467656},
{2023, 9, 23.0, 2.3522, 48.8566, 1.0, 0, 1000, 2460211.169986, 2460211.469867},
{2023, 9, 23.0, 2.3522, 48.8566, 1.0, 1, 0, 2460211.167921, 2460211.471920},
{2023, 9, 23.0, 2.3522, 48.8566, 1.0, 1, 100, 2460211.166909, 2460211.472925},
{2023, 9, 23.0, 2.3522, 48.8566, 1.0, 1, 1000, 2460211.164738, 2460211.475084},
{2023, 12, 22.0, 2.3522, 48.8566, 1.0, 0, 0, 2460301.080943, 2460300.645364},
{2023, 12, 22.0, 2.3522, 48.8566, 1.0, 0, 100, 2460301.080203, 2460300.646110},
{2023, 12, 22.0, 2.3522, 48.8566, 1.0, 0, 1000, 2460301.078599, 2460300.647728},
{2023, 12, 22.0, 2.3522, 48.8566, 1.0, 1, 0, 2460301.077090, 2460300.649248},
{2023, 12, 22.0, 2.3522, 48.8566, 1.0, 1, 100, 2460301.076345, 2460300.649999},
{2023, 12, 22.0, 2.3522, 48.8566, 1.0, 1, 1000, 2460301.074729, 2460300.651627},
{2024, 2, 29.0, 2.3522, 48.8566, 1.0, 0, 0, -3.000000, 2460369.878053},
{2024, 2, 29.0, 2.3522, 48.8566, 1.0, 0, 100, -3.000000, 2460369.878790},
{2024, 2, 29.0, 2.3522, 48.8566, 1.0, 0, 1000, -3.000000, 2460369.880379},
{2024, 2, 29.0, 2.3522, 48.8566, 1.0, 1, 0, -3.000000, 2460369.881866},
{2024, 2, 29.0, 2.3522, 48.8566, 1.0, 1, 100, -3.000000, 2460369.882598},
{2024, 2, 29.0, 2.3522, 48.8566, 1.0, 1, 1000, 2460370.499203, 2460369.884177},
{2025, 7, 4.0, 2.3522, 48.8566, 1.0, 0, 0, 2460861.134958, 2460860.518461},
{2025, 7, 4.0, 2.3522, 48.8566, 1.0, 0, 100, 2460861.134172, 2460860.519186},
{2025, 7, 4.0, 2.3522, 48.8566, 1.0, 0, 1000, 2460861.132477, 2460860.520751},
{2025, 7, 4.0, 2.3522, 48.8566, 1.0, 1, 0, 2460861.130892, 2460860.522216},
{2025, 7, 4.0, 2.3522, 48.8566, 1.0, 1, 100, 2460861.130113, 2460860.522937},
{2025, 7, 4.0, 2.3522, 48.8566, 1.0, 1, 1000, 2460861.128432, 2460860.524494},
{2023, 1, 15.0, -118.2437, 34.0522, -8.0, 0, 0, 2459959.522069, 2459959.987849},
{2023, 1, 15.0, -118.2437, 34.0522, -8.0, 0, 100, 2459959.521491, 2459959.988416},
{2023, 1, 15.0, -118.2437, 34.0522, -8.0, 0, 1000, 2459959.520242, 2459959.989642},
{2023, 1, 15.0, -118.2437, 34.0522, -8.0, 1, 0, 2459959.519071, 2459959.990791},
{2023, 1, 15.0, -118.2437, 34.0522, -8.0, 1, 100, 2459959.518495, 2459959.991357},
{2023, 1, 15.0, -118.2437, 34.0522, -8.0, 1, 1000, 2459959.517249, 2459959.992580},
{2023, 3, 20.0, -118.2437, 34.0522, -8.0, 0, 0, 2460023.736567, 2460024.214432},
{2023, 3, 20.0, -118.2437, 34.0522, -8.0, 0, 100, 2460023.736000, 2460024.215000},
{2023, 3, 20.0, -118.2437, 34.0522, -8.0, 0, 1000, 2460023.734774, 2460024.216228},
{2023, 3, 20.0, -118.2437, 34.0522, -8.0, 1, 0, 2460023.733624, 2460024.217380},
{2023, 3, 20.0, -118.2437, 34.0522, -8.0, 1, 100, 2460023.733057, 2460024.217947},
{2023, 3, 20.0, -118.2437, 34.0522, -8.0, 1, 1000, 2460023.731834, 2460024.219174},
{2023, 6, 21.0, -118.2437, 34.0522, -8.0, 0, 0, 2460116.821912, 2460117.421511},
{2023, 6, 21.0, -118.2437, 34.0522, -8.0, 0, 100, 2460116.821278, 2460117.422113},
{2023, 6, 21.0, -118.2437, 34.0522, -8.0, 0, 1000, 2460116.819905, 2460117.423419},
{2023, 6, 21.0, -118.2437, 34.0522, -8.0, 1, 0, 2460116.818612, 2460117.424647},
{2023, 6, 21.0, -118.2437, 34.0522, -8.0, 1, 100, 2460116.817974, 2460117.425253},
{2023, 6, 21.0, -118.2437, 34.0522, -8.0, 1, 1000, 2460116.816593, 2460117.426565},
{2023, 9, 23.0, -118.2437, 34.0522, -8.0, 0, 0, 2460211.096832, 2460211.491736},
{2023, 9, 23.0, -118.2437, 34.0522, -8.0, 0, 100, 2460211.096147, 2460211.492414},
{2023, 9, 23.0, -118.2437, 34.0522, -8.0, 0, 1000, 2460211.094671, 2460211.493874},
{2023, 9, 23.0, -118.2437, 34.0522, -8.0, 1, 0, 2460211.093289, 2460211.495241},
{2023, 9, 23.0, -118.2437, 34.0522, -8.0, 1, 100, 2460211.092609, 2460211.495913},
{2023, 9, 23.0, -118.2437, 34.0522, -8.0, 1, 1000, 2460211.091144, 2460211.497363},
{2023, 12, 22.0, -118.2437, 34.0522, -8.0, 0, 0, 2460301.067741, 2460300.604932},
{2023, 12, 22.0, -118.2437, 34.0522, -8.0, 0, 100, 2460301.067155, 2460300.605516},
{2023, 12, 22.0, -118.2437, 34.0522, -8.0, 0, 1000, 2460301.065885, 2460300.606778},
{2023, 12, 22.0, -118.2437, 34.0522, -8.0, 1, 0, 2460301.064690, 2460300.607966},
{2023, 12, 22.0, -118.2437, 34.0522, -8.0, 1, 100, 2460301.064101, 2460300.608551},
{2023, 12, 22.0, -118.2437, 34.0522, -8.0, 1, 1000, 2460301.062827, 2460300.609819},
{2024, 2, 29.0, -118.2437, 34.0522, -8.0, 0, 0, 2460370.454262, 2460369.864349},
{2024, 2, 29.0, -118.2437, 34.0522, -8.0, 0, 100, 2460370.453650, 2460369.864928},
{2024, 2, 29.0, -118.2437, 34.0522, -8.0, 0, 1000, 2460370.452328, 2460369.866178},
{2024, 2, 29.0, -118.2437, 34.0522, -8.0, 1, 0, 2460370.451090, 2460369.867351},
{2024, 2, 29.0, -118.2437, 34.0522, -8.0, 1, 100, 2460370.450481, 2460369.867928},
{2024, 2, 29.0, -118.2437, 34.0522, -8.0, 1, 1000, 2460370.449165, 2460369.869174},
{2025, 7, 4.0, -118.2437, 34.0522, -8.0, 0, 0, 2460861.085220, 2460860.502309},
{2025, 7, 4.0, -118.2437, 34.0522, -8.0, 0, 100, 2460861.084616, 2460860.502881},
{2025, 7, 4.0, -118.2437, 34.0522, -8.0, 0, 1000, 2460861.083313, 2460860.504118},
{2025, 7, 4.0, -118.2437, 34.0522, -8.0, 1, 0, 2460861.082092, 2460860.505277},
{2025, 7, 4.0, -118.2437, 34.0522, -8.0, 1, 100, 2460861.081491, 2460860.505848},
{2025, 7, 4.0, -118.2437, 34.0522, -8.0, 1, 1000, 2460861.080193, 2460860.507081},
{2023, 1, 15.0, 37.6176, 55.7558, 3.0, 0, 0, 2459959.547825, 2459959.980183},
{2023, 1, 15.0, 37.6176, 55.7558, 3.0, 0, 100, 2459959.546956, 2459959.981023},
{2023, 1, 15.0, 37.6176, 55.7558, 3.0, 0, 1000, 2459959.545083, 2459959.982834},
{2023, 1, 15.0, 37.6176, 55.7558, 3.0, 1, 0, 2459959.543330, 2459959.984528},
{2023, 1, 15.0, 37.6176, 55.7558, 3.0, 1, 100, 2459959.542467, 2459959.985362},
{2023, 1, 15.0, 37.6176, 55.7558, 3.0, 1, 1000, 2459959.540603, 2459959.987162},
{2023, 3, 20.0, 37.6176, 55.7558, 3.0, 0, 0, 2460023.783999, 2460024.192547},
{2023, 3, 20.0, 37.6176, 55.7558, 3.0, 0, 100, 2460023.783120, 2460024.193442},
{2023, 3, 20.0, 37.6176, 55.7558, 3.0, 0, 1000, 2460023.781224, 2460024.195371},
{2023, 3, 20.0, 37.6176, 55.7558, 3.0, 1, 0, 2460023.779453, 2460024.197173},
{2023, 3, 20.0, 37.6176, 55.7558, 3.0, 1, 100, 2460023.778582, 2460024.198060},
{2023, 3, 20.0, 37.6176, 55.7558, 3.0, 1, 1000, 2460023.776703, 2460024.199974},
{2023, 6, 21.0, 37.6176, 55.7558, 3.0, 0, 0, 2460116.763078, 2460117.493338},
{2023, 6, 21.0, 37.6176, 55.7558, 3.0, 0, 100, 2460116.761877, 2460117.494391},
{2023, 6, 21.0, 37.6176, 55.7558, 3.0, 0, 1000, 2460116.759256, 2460117.496682},
{2023, 6, 21.0, 37.6176, 55.7558, 3.0, 1, 0, 2460116.756765, 2460117.498850},
{2023, 6, 21.0, 37.6176, 55.7558, 3.0, 1, 100, 2460116.755522, 2460117.499928},
{2023, 6, 21.0, 37.6176, 55.7558, 3.0, 1, 1000, 2460116.752806, -3.000000},
{2023, 9, 23.0, 37.6176, 55.7558, 3.0, 0, 0, 2460211.198496, 2460211.403741},
{2023, 9, 23.0, 37.6176, 55.7558, 3.0, 0, 100, 2460211.196886, 2460211.405346},
{2023, 9, 23.0, 37.6176, 55.7558, 3.0, 0, 1000, 2460211.193474, 2460211.408746},
{2023, 9, 23.0, 37.6176, 55.7558, 3.0, 1, 0, 2460211.190358, 2460211.411852},
{2023, 9, 23.0, 37.6176, 55.7558, 3.0, 1, 100, 2460211.188847, 2460211.413357},
{2023, 9, 23.0, 37.6176, 55.7558, 3.0, 1, 1000, 2460211.185637, 2460211.416556},
{2023, 12, 22.0, 37.6176, 55.7558, 3.0, 0, 0, 2460301.052264, 2460300.635877},
{2023, 12, 22.0, 37.6176, 55.7558, 3.0, 0, 100, 2460301.051388, 2460300.636766},
{2023, 12, 22.0, 37.6176, 55.7558, 3.0, 0, 1000, 2460301.049490, 2460300.638694},
{2023, 12, 22.0, 37.6176, 55.7558, 3.0, 1, 0, 2460301.047704, 2460300.640507},
{2023, 12, 22.0, 37.6176, 55.7558, 3.0, 1, 100, 2460301.046819, 2460300.641404},
{2023, 12, 22.0, 37.6176, 55.7558, 3.0, 1, 1000, 2460301.044901, 2460300.643350},
{2024, 2, 29.0, 37.6176, 55.7558, 3.0, 0, 0, -3.000000, 2460369.848787},
{2024, 2, 29.0, 37.6176, 55.7558, 3.0, 0, 100, -3.000000, 2460369.849664},
{2024, 2, 29.0, 37.6176, 55.7558, 3.0, 0, 1000, -3.000000, 2460369.851553},
{2024, 2, 29.0, 37.6176, 55.7558, 3.0, 1, 0, 2460370.499620, 2460369.853318},
{2024, 2, 29.0, 37.6176, 55.7558, 3.0, 1, 100, 2460370.498648, 2460369.854186},
{2024, 2, 29.0, 37.6176, 55.7558, 3.0, 1, 1000, 2460370.496557, 2460369.856057},
{2025, 7, 4.0, 37.6176, 55.7558, 3.0, 0, 0, 2460861.132034, 2460861.495198},
{2025, 7, 4.0, 37.6176, 55.7558, 3.0, 0, 100, 2460861.131078, 2460861.496137},
{2025, 7, 4.0, 37.6176, 55.7558, 3.0, 0, 1000, 2460861.129018, 2460861.498158},
{2025, 7, 4.0, 37.6176, 55.7558, 3.0, 1, 0, 2460861.127098, -3.000000},
{2025, 7, 4.0, 37.6176, 55.7558, 3.0, 1, 100, 2460861.126154, -3.000000},
{2025, 7, 4.0, 37.6176, 55.7558, 3.0, 1, 1000, 2460861.124122, -3.000000},
{2023, 1, 15.0, 31.2357, 30.0444, 2.0, 0, 0, 2459959.503589, 2459959.983951},
{2023, 1, 15.0, 31.2357, 30.0444, 2.0, 0, 100, 2459959.503044, 2459959.984486},
{2023, 1, 15.0, 31.2357, 30.0444, 2.0, 0, 1000, 2459959.501865, 2459959.985642},
{2023, 1, 15.0, 31.2357, 30.0444, 2.0, 1, 0, 2459959.500758, 2459959.986727},
{2023, 1, 15.0, 31.2357, 30.0444, 2.0, 1, 100, 2459959.500214, 2459959.987262},
{2023, 1, 15.0, 31.2357, 30.0444, 2.0, 1, 1000, -3.000000, 2459959.988416},
{2023, 3, 20.0, 31.2357, 30.0444, 2.0, 0, 0, 2460023.724714, 2460024.198340},
{2023, 3, 20.0, 31.2357, 30.0444, 2.0, 0, 100, 2460023.724163, 2460024.198888},
{2023, 3, 20.0, 31.2357, 30.0444, 2.0, 0, 1000, 2460023.722973, 2460024.200072},
{2023, 3, 20.0, 31.2357, 30.0444, 2.0, 1, 0, 2460023.721856, 2460024.201183},
{2023, 3, 20.0, 31.2357, 30.0444, 2.0, 1, 100, 2460023.721307, 2460024.201730},
{2023, 3, 20.0, 31.2357, 30.0444, 2.0, 1, 1000, 2460023.720119, 2460024.202912},
{2023, 6, 21.0, 31.2357, 30.0444, 2.0, 0, 0, 2460116.813768, 2460117.406719},
{2023, 6, 21.0, 31.2357, 30.0444, 2.0, 0, 100, 2460116.813160, 2460117.407301},
{2023, 6, 21.0, 31.2357, 30.0444, 2.0, 0, 1000, 2460116.811843, 2460117.408562},
{2023, 6, 21.0, 31.2357, 30.0444, 2.0, 1, 0, 2460116.810603, 2460117.409748},
{2023, 6, 21.0, 31.2357, 30.0444, 2.0, 1, 100, 2460116.809991, 2460117.410333},
{2023, 6, 21.0, 31.2357, 30.0444, 2.0, 1, 1000, 2460116.808667, 2460117.411600},
{2023, 9, 23.0, 31.2357, 30.0444, 2.0, 0, 0, 2460211.072262, 2460211.482710},
{2023, 9, 23.0, 31.2357, 30.0444, 2.0, 0, 100, 2460211.071615, 2460211.483350},
{2023, 9, 23.0, 31.2357, 30.0444, 2.0, 0, 1000, 2460211.070218, 2460211.484732},
{2023, 9, 23.0, 31.2357, 30.0444, 2.0, 1, 0, 2460211.068910, 2460211.486026},
{2023, 9, 23.0, 31.2357, 30.0444, 2.0, 1, 100, 2460211.068266, 2460211.486662},
{2023, 9, 23.0, 31.2357, 30.0444, 2.0, 1, 1000, 2460211.066878, 2460211.488035},
{2023, 12, 22.0, 31.2357, 30.0444, 2.0, 0, 0, 2460301.063789, 2460300.584090},
{2023, 12, 22.0, 31.2357, 30.0444, 2.0, 0, 100, 2460301.063237, 2460300.584638},
{2023, 12, 22.0, 31.2357, 30.0444, 2.0, 0, 1000, 2460301.062045, 2460300.585823},
{2023, 12, 22.0, 31.2357, 30.0444, 2.0, 1, 0, 2460301.060923, 2460300.586938},
{2023, 12, 22.0, 31.2357, 30.0444, 2.0, 1, 100, 2460301.060371, 2460300.587487},
{2023, 12, 22.0, 31.2357, 30.0444, 2.0, 1, 1000, 2460301.059175, 2460300.588676},
{2024, 2, 29.0, 31.2357, 30.0444, 2.0, 0, 0, 2460370.433373, 2460369.862017},
{2024, 2, 29.0, 31.2357, 30.0444, 2.0, 0, 100, 2460370.432803, 2460369.862561},
{2024, 2, 29.0, 31.2357, 30.0444, 2.0, 0, 1000, 2460370.431570, 2460369.863735},
{2024, 2, 29.0, 31.2357, 30.0444, 2.0, 1, 0, 2460370.430414, 2460369.864837},
{2024, 2, 29.0, 31.2357, 30.0444, 2.0, 1, 100, 2460370.429845, 2460369.865380},
{2024, 2, 29.0, 31.2357, 30.0444, 2.0, 1, 1000, 2460370.428616, 2460369.866552},
{2025, 7, 4.0, 31.2357, 30.0444, 2.0, 0, 0, 2460861.065509, -3.000000},
{2025, 7, 4.0, 31.2357, 30.0444, 2.0, 0, 100, 2460861.064944, -3.000000},
{2025, 7, 4.0, 31.2357, 30.0444, 2.0, 0, 1000, 2460861.063725, -3.000000},
{2025, 7, 4.0, 31.2357, 30.0444, 2.0, 1, 0, 2460861.062582, -3.000000},
{2025, 7, 4.0, 31.2357, 30.0444, 2.0, 1, 100, 2460861.062019, -3.000000},
{2025, 7, 4.0, 31.2357, 30.0444, 2.0, 1, 1000, 2460861.060803, -3.000000},
{2023, 1, 15.0, -43.1729, -22.9068, -3.0, 0, 0, -3.000000, 2459960.019905},
{2023, 1, 15.0, -43.1729, -22.9068, -3.0, 0, 100, -3.000000, 2459960.020416},
{2023, 1, 15.0, -43.1729, -22.9068, -3.0, 0, 1000, -3.000000, 2459960.021522},
{2023, 1, 15.0, -43.1729, -22.9068, -3.0, 1, 0, -3.000000, 2459960.022561},
{2023, 1, 15.0, -43.1729, -22.9068, -3.0, 1, 100, -3.000000, 2459960.023073},
{2023, 1, 15.0, -43.1729, -22.9068, -3.0, 1, 1000, -3.000000, 2459960.024180},
{2023, 3, 20.0, -43.1729, -22.9068, -3.0, 0, 0, 2460023.694314, 2460024.230676},
{2023, 3, 20.0, -43.1729, -22.9068, -3.0, 0, 100, 2460023.693794, 2460024.231175},
{2023, 3, 20.0, -43.1729, -22.9068, -3.0, 0, 1000, 2460023.692668, 2460024.232255},
{2023, 3, 20.0, -43.1729, -22.9068, -3.0, 1, 0, 2460023.691609, 2460024.233270},
{2023, 3, 20.0, -43.1729, -22.9068, -3.0, 1, 100, 2460023.691087, 2460024.233769},
{2023, 3, 20.0, -43.1729, -22.9068, -3.0, 1, 1000, 2460023.689959, 2460024.234850},
{2023, 6, 21.0, -43.1729, -22.9068, -3.0, 0, 0, 2460116.892241, 2460117.344631},
{2023, 6, 21.0, -43.1729, -22.9068, -3.0, 0, 100, 2460116.891685, 2460117.345179},
{2023, 6, 21.0, -43.1729, -22.9068, -3.0, 0, 1000, 2460116.890485, 2460117.346361},
{2023, 6, 21.0, -43.1729, -22.9068, -3.0, 1, 0, 2460116.889358, 2460117.347471},
{2023, 6, 21.0, -43.1729, -22.9068, -3.0, 1, 100, 2460116.888804, 2460117.348016},
{2023, 6, 21.0, -43.1729, -22.9068, -3.0, 1, 1000, 2460116.887607, 2460117.349195},
{2023, 9, 23.0, -43.1729, -22.9068, -3.0, 0, 0, 2460210.989126, 2460210.536957},
{2023, 9, 23.0, -43.1729, -22.9068, -3.0, 0, 100, 2460210.988538, 2460210.537539},
{2023, 9, 23.0, -43.1729, -22.9068, -3.0, 0, 1000, 2460210.987264, 2460210.538800},
{2023, 9, 23.0, -43.1729, -22.9068, -3.0, 1, 0, 2460210.986066, 2460210.539987},
{2023, 9, 23.0, -43.1729, -22.9068, -3.0, 1, 100, 2460210.985475, 2460210.540571},
{2023, 9, 23.0, -43.1729, -22.9068, -3.0, 1, 1000, 2460210.984195, 2460210.541838},
{2023, 12, 22.0, -43.1729, -22.9068, -3.0, 0, 0, 2460301.112646, 2460300.554998},
{2023, 12, 22.0, -43.1729, -22.9068, -3.0, 0, 100, 2460301.112115, 2460300.555506},
{2023, 12, 22.0, -43.1729, -22.9068, -3.0, 0, 1000, 2460301.110966, 2460300.556605},
{2023, 12, 22.0, -43.1729, -22.9068, -3.0, 1, 0, 2460301.109888, 2460300.557636},
{2023, 12, 22.0, -43.1729, -22.9068, -3.0, 1, 100, 2460301.109358, 2460300.558144},
{2023, 12, 22.0, -43.1729, -22.9068, -3.0, 1, 1000, 2460301.108212, 2460300.559241},
{2024, 2, 29.0, -43.1729, -22.9068, -3.0, 0, 0, 2460370.388602, 2460369.907565},
{2024, 2, 29.0, -43.1729, -22.9068, -3.0, 0, 100, 2460370.388077, 2460369.908083},
{2024, 2, 29.0, -43.1729, -22.9068, -3.0, 0, 1000, 2460370.386942, 2460369.909204},
{2024, 2, 29.0, -43.1729, -22.9068, -3.0, 1, 0, 2460370.385874, 2460369.910257},
{2024, 2, 29.0, -43.1729, -22.9068, -3.0, 1, 100, 2460370.385348, 2460369.910776},
{2024, 2, 29.0, -43.1729, -22.9068, -3.0, 1, 1000, 2460370.384210, 2460369.911899},
{2025, 7, 4.0, -43.1729, -22.9068, -3.0, 0, 0, 2460861.024935, 2460860.540907},
{2025, 7, 4.0, -43.1729, -22.9068, -3.0, 0, 100, 2460861.024416, 2460860.541421},
{2025, 7, 4.0, -43.1729, -22.9068, -3.0, 0, 1000, 2460861.023292, 2460860.542532},
{2025, 7, 4.0, -43.1729, -22.9068, -3.0, 1, 0, 2460861.022235, 2460860.543577},
{2025, 7, 4.0, -43.1729, -22.9068, -3.0, 1, 100, 2460861.021714, 2460860.544092},
{2025, 7, 4.0, -43.1729, -22.9068, -3.0, 1, 1000, 2460861.020587, 2460860.545205},
{2023, 1, 15.0, 103.8198, 1.3521, 8.0, 0, 0, 2459959.533659, 2459960.042803},
{2023, 1, 15.0, 103.8198, 1.3521, 8.0, 0, 100, 2459959.533195, 2459960.043265},
{2023, 1, 15.0, 103.8198, 1.3521, 8.0, 0, 1000, 2459959.532189, 2459960.044264},
{2023, 1, 15.0, 103.8198, 1.3521, 8.0, 1, 0, 2459959.531245, 2459960.045203},
{2023, 1, 15.0, 103.8198, 1.3521, 8.0, 1, 100, 2459959.530780, 2459960.045665},
{2023, 1, 15.0, 103.8198, 1.3521, 8.0, 1, 1000, 2459959.529774, 2459960.046664},
{2023, 3, 20.0, 103.8198, 1.3521, 8.0, 0, 0, 2460023.744413, 2460024.255583},
{2023, 3, 20.0, 103.8198, 1.3521, 8.0, 0, 100, 2460023.743933, 2460024.256050},
{2023, 3, 20.0, 103.8198, 1.3521, 8.0, 0, 1000, 2460023.742895, 2460024.257061},
{2023, 3, 20.0, 103.8198, 1.3521, 8.0, 1, 0, 2460023.741919, 2460024.258011},
{2023, 3, 20.0, 103.8198, 1.3521, 8.0, 1, 100, 2460023.741439, 2460024.258479},
{2023, 3, 20.0, 103.8198, 1.3521, 8.0, 1, 1000, 2460023.740401, 2460024.259490},
{2023, 6, 21.0, 103.8198, 1.3521, 8.0, 0, 0, 2460116.896343, 2460117.411271},
{2023, 6, 21.0, 103.8198, 1.3521, 8.0, 0, 100, 2460116.895833, 2460117.411769},
{2023, 6, 21.0, 103.8198, 1.3521, 8.0, 0, 1000, 2460116.894729, 2460117.412845},
{2023, 6, 21.0, 103.8198, 1.3521, 8.0, 1, 0, 2460116.893692, 2460117.413857},
{2023, 6, 21.0, 103.8198, 1.3521, 8.0, 1, 100, 2460116.893181, 2460117.414355},
{2023, 6, 21.0, 103.8198, 1.3521, 8.0, 1, 1000, 2460116.892077, 2460117.415431},
{2023, 9, 23.0, 103.8198, 1.3521, 8.0, 0, 0, 2460211.061198, 2460210.530116},
{2023, 9, 23.0, 103.8198, 1.3521, 8.0, 0, 100, 2460211.060667, 2460210.530639},
{2023, 9, 23.0, 103.8198, 1.3521, 8.0, 0, 1000, 2460211.059519, 2460210.531771},
{2023, 9, 23.0, 103.8198, 1.3521, 8.0, 1, 0, 2460211.058440, 2460210.532834},
{2023, 9, 23.0, 103.8198, 1.3521, 8.0, 1, 100, 2460211.057909, 2460210.533357},
{2023, 9, 23.0, 103.8198, 1.3521, 8.0, 1, 1000, 2460211.056761, 2460210.534489},
{2023, 12, 22.0, 103.8198, 1.3521, 8.0, 0, 0, 2460301.128082, 2460300.607764},
{2023, 12, 22.0, 103.8198, 1.3521, 8.0, 0, 100, 2460301.127606, 2460300.608229},
{2023, 12, 22.0, 103.8198, 1.3521, 8.0, 0, 1000, 2460301.126577, 2460300.609234},
{2023, 12, 22.0, 103.8198, 1.3521, 8.0, 1, 0, 2460301.125610, 2460300.610178},
{2023, 12, 22.0, 103.8198, 1.3521, 8.0, 1, 100, 2460301.125133, 2460300.610643},
{2023, 12, 22.0, 103.8198, 1.3521, 8.0, 1, 1000, 2460301.124104, 2460300.611648},
{2024, 2, 29.0, 103.8198, 1.3521, 8.0, 0, 0, 2460370.448355, 2460369.926847},
{2024, 2, 29.0, 103.8198, 1.3521, 8.0, 0, 100, 2460370.447876, 2460369.927314},
{2024, 2, 29.0, 103.8198, 1.3521, 8.0, 0, 1000, 2460370.446841, 2460369.928323},
{2024, 2, 29.0, 103.8198, 1.3521, 8.0, 1, 0, 2460370.445868, 2460369.929271},
{2024, 2, 29.0, 103.8198, 1.3521, 8.0, 1, 100, 2460370.445389, 2460369.929738},
{2024, 2, 29.0, 103.8198, 1.3521, 8.0, 1, 1000, 2460370.444354, 2460369.930747},
{2025, 7, 4.0, 103.8198, 1.3521, 8.0, 0, 0, 2460861.083263, 2460860.562492},
{2025, 7, 4.0, 103.8198, 1.3521, 8.0, 0, 100, 2460861.082788, 2460860.562956},
{2025, 7, 4.0, 103.8198, 1.3521, 8.0, 0, 1000, 2460861.081761, 2460860.563959},
{2025, 7, 4.0, 103.8198, 1.3521, 8.0, 1, 0, 2460861.080795, 2460860.564902},
{2025, 7, 4.0, 103.8198, 1.3521, 8.0, 1, 100, 2460861.080320, 2460860.565366},
{2025, 7, 4.0, 103.8198, 1.3521, 8.0, 1, 1000, 2460861.079293, 2460860.566370},
{2023, 1, 15.0, -149.9003, 61.2181, -9.0, 0, 0, 2459959.611424, 2459959.989333},
{2023, 1, 15.0, -149.9003, 61.2181, -9.0, 0, 100, 2459959.610339, 2459959.990387},
{2023, 1, 15.0, -149.9003, 61.2181, -9.0, 0, 1000, 2459959.608002, 2459959.992654},
{2023, 1, 15.0, -149.9003, 61.2181, -9.0, 1, 0, 2459959.605825, 2459959.994766},
{2023, 1, 15.0, -149.9003, 61.2181, -9.0, 1, 100, 2459959.604754, 2459959.995804},
{2023, 1, 15.0, -149.9003, 61.2181, -9.0, 1, 1000, 2459959.602447, 2459959.998039},
{2023, 3, 20.0, -149.9003, 61.2181, -9.0, 0, 0, 2460023.818593, 2460024.240506},
{2023, 3, 20.0, -149.9003, 61.2181, -9.0, 0, 100, 2460023.817597, 2460024.241534},
{2023, 3, 20.0, -149.9003, 61.2181, -9.0, 0, 1000, 2460023.815451, 2460024.243752},
{2023, 3, 20.0, -149.9003, 61.2181, -9.0, 1, 0, 2460023.813448, 2460024.245824},
{2023, 3, 20.0, -149.9003, 61.2181, -9.0, 1, 100, 2460023.812461, 2460024.246844},
{2023, 3, 20.0, -149.9003, 61.2181, -9.0, 1, 1000, 2460023.810334, 2460024.249046},
{2023, 6, 21.0, -149.9003, 61.2181, -9.0, 0, 0, 2460116.779694, 2460116.541691},
{2023, 6, 21.0, -149.9003, 61.2181, -9.0, 0, 100, 2460116.778105, 2460116.543268},
{2023, 6, 21.0, -149.9003, 61.2181, -9.0, 0, 1000, 2460116.774605, 2460116.546739},
{2023, 6, 21.0, -149.9003, 61.2181, -9.0, 1, 0, 2460116.771242, 2460116.550076},
{2023, 6, 21.0, -149.9003, 61.2181, -9.0, 1, 100, 2460116.769551, 2460116.551755},
{2023, 6, 21.0, -149.9003, 61.2181, -9.0, 1, 1000, 2460116.765815, 2460116.555463},
{2023, 9, 23.0, -149.9003, 61.2181, -9.0, 0, 0, 2460211.309271, 2460211.381831},
{2023, 9, 23.0, -149.9003, 61.2181, -9.0, 0, 100, 2460211.304548, 2460211.386551},
{2023, 9, 23.0, -149.9003, 61.2181, -9.0, 0, 1000, 2460211.295817, 2460211.395275},
{2023, 9, 23.0, -149.9003, 61.2181, -9.0, 1, 0, 2460211.288811, 2460211.402275},
{2023, 9, 23.0, -149.9003, 61.2181, -9.0, 1, 100, 2460211.285643, 2460211.405440},
{2023, 9, 23.0, -149.9003, 61.2181, -9.0, 1, 1000, 2460211.279287, 2460211.411788},
{2023, 12, 22.0, -149.9003, 61.2181, -9.0, 0, 0, 2460301.058819, 2460300.705421},
{2023, 12, 22.0, -149.9003, 61.2181, -9.0, 0, 100, 2460301.057690, 2460300.706565},
{2023, 12, 22.0, -149.9003, 61.2181, -9.0, 0, 1000, 2460301.055234, 2460300.709054},
{2023, 12, 22.0, -149.9003, 61.2181, -9.0, 1, 0, 2460301.052913, 2460300.711406},
{2023, 12, 22.0, -149.9003, 61.2181, -9.0, 1, 100, 2460301.051759, 2460300.712574},
{2023, 12, 22.0, -149.9003, 61.2181, -9.0, 1, 1000, 2460301.049249, 2460300.715116},
{2024, 2, 29.0, -149.9003, 61.2181, -9.0, 0, 0, 2460369.515897, 2460369.852889},
{2024, 2, 29.0, -149.9003, 61.2181, -9.0, 0, 100, 2460369.514732, 2460369.854028},
{2024, 2, 29.0, -149.9003, 61.2181, -9.0, 0, 1000, 2460369.512230, 2460369.856476},
{2024, 2, 29.0, -149.9003, 61.2181, -9.0, 1, 0, 2460369.509904, 2460369.858750},
{2024, 2, 29.0, -149.9003, 61.2181, -9.0, 1, 100, 2460369.508763, 2460369.859866},
{2024, 2, 29.0, -149.9003, 61.2181, -9.0, 1, 1000, 2460369.506308, 2460369.862264},
{2025, 7, 4.0, -149.9003, 61.2181, -9.0, 0, 0, 2460861.205484, 2460861.493716},
{2025, 7, 4.0, -149.9003, 61.2181, -9.0, 0, 100, 2460861.204170, 2460861.495011},
{2025, 7, 4.0, -149.9003, 61.2181, -9.0, 0, 1000, 2460861.201358, 2460861.497780},
{2025, 7, 4.0, -149.9003, 61.2181, -9.0, 1, 0, 2460861.198757, -3.000000},
{2025, 7, 4.0, -149.9003, 61.2181, -9.0, 1, 100, 2460861.197484, -3.000000},
{2025, 7, 4.0, -149.9003, 61.2181, -9.0, 1, 1000, 2460861.194755, -3.000000},
{2023, 1, 15.0, -42.6043, 71.7069, -3.0, 0, 0, 2459959.583014, 2459959.895953},
{2023, 1, 15.0, -42.6043, 71.7069, -3.0, 0, 100, 2459959.581157, 2459959.897741},
{2023, 1, 15.0, -42.6043, 71.7069, -3.0, 0, 1000, 2459959.577188, 2459959.901560},
{2023, 1, 15.0, -42.6043, 71.7069, -3.0, 1, 0, 2459959.573523, 2459959.905081},
{2023, 1, 15.0, -42.6043, 71.7069, -3.0, 1, 100, 2459959.571731, 2459959.906801},
{2023, 1, 15.0, -42.6043, 71.7069, -3.0, 1, 1000, 2459959.567893, 2459959.910481},
{2023, 3, 20.0, -42.6043, 71.7069, -3.0, 0, 0, 2460023.817806, 2460024.130940},
{2023, 3, 20.0, -42.6043, 71.7069, -3.0, 0, 100, 2460023.816003, 2460024.132810},
{2023, 3, 20.0, -42.6043, 71.7069, -3.0, 0, 1000, 2460023.812151, 2460024.136808},
{2023, 3, 20.0, -42.6043, 71.7069, -3.0, 1, 0, 2460023.808601, 2460024.140499},
{2023, 3, 20.0, -42.6043, 71.7069, -3.0, 1, 100, 2460023.806866, 2460024.142304},
{2023, 3, 20.0, -42.6043, 71.7069, -3.0, 1, 1000, 2460023.803156, 2460024.146170},
{2023, 6, 21.0, -42.6043, 71.7069, -3.0, 0, 0, -1.000000, -1.000000},
{2023, 6, 21.0, -42.6043, 71.7069, -3.0, 0, 100, -1.000000, -1.000000},
{2023, 6, 21.0, -42.6043, 71.7069, -3.0, 0, 1000, -1.000000, -1.000000},
{2023, 6, 21.0, -42.6043, 71.7069, -3.0, 1, 0, -1.000000, -1.000000},
{2023, 6, 21.0, -42.6043, 71.7069, -3.0, 1, 100, -1.000000, -1.000000},
{2023, 6, 21.0, -42.6043, 71.7069, -3.0, 1, 1000, -1.000000, -1.000000},
{2023, 9, 23.0, -42.6043, 71.7069, -3.0, 0, 0, -2.000000, -2.000000},
{2023, 9, 23.0, -42.6043, 71.7069, -3.0, 0, 100, -2.000000, -2.000000},
{2023, 9, 23.0, -42.6043, 71.7069, -3.0, 0, 1000, -2.000000, -2.000000},
{2023, 9, 23.0, -42.6043, 71.7069, -3.0, 1, 0, -2.000000, -2.000000},
{2023, 9, 23.0, -42.6043, 71.7069, -3.0, 1, 100, -2.000000, -2.000000},
{2023, 9, 23.0, -42.6043, 71.7069, -3.0, 1, 1000, -2.000000, -2.000000},
{2023, 12, 22.0, -42.6043, 71.7069, -3.0, 0, 0, 2460300.951391, 2460300.689493},
{2023, 12, 22.0, -42.6043, 71.7069, -3.0, 0, 100, 2460300.949276, 2460300.691656},
{2023, 12, 22.0, -42.6043, 71.7069, -3.0, 0, 1000, 2460300.944604, 2460300.696431},
{2023, 12, 22.0, -42.6043, 71.7069, -3.0, 1, 0, 2460300.940091, 2460300.701037},
{2023, 12, 22.0, -42.6043, 71.7069, -3.0, 1, 100, 2460300.937809, 2460300.703365},
{2023, 12, 22.0, -42.6043, 71.7069, -3.0, 1, 1000, 2460300.932741, 2460300.708530},
{2024, 2, 29.0, -42.6043, 71.7069, -3.0, 0, 0, 2460369.510257, 2460369.739050},
{2024, 2, 29.0, -42.6043, 71.7069, -3.0, 0, 100, 2460369.507908, 2460369.741347},
{2024, 2, 29.0, -42.6043, 71.7069, -3.0, 0, 1000, 2460369.502952, 2460369.746190},
{2024, 2, 29.0, -42.6043, 71.7069, -3.0, 1, 0, -3.000000, 2460369.750583},
{2024, 2, 29.0, -42.6043, 71.7069, -3.0, 1, 100, -3.000000, 2460369.752708},
{2024, 2, 29.0, -42.6043, 71.7069, -3.0, 1, 1000, -3.000000, 2460369.757206},
{2025, 7, 4.0, -42.6043, 71.7069, -3.0, 0, 0, 2460861.253176, 2460861.327087},
{2025, 7, 4.0, -42.6043, 71.7069, -3.0, 0, 100, 2460861.246829, 2460861.333396},
{2025, 7, 4.0, -42.6043, 71.7069, -3.0, 0, 1000, 2460861.235509, 2460861.344631},
{2025, 7, 4.0, -42.6043, 71.7069, -3.0, 1, 0, 2460861.226647, 2460861.353412},
{2025, 7, 4.0, -42.6043, 71.7069, -3.0, 1, 100, 2460861.222676, 2460861.357343},
{2025, 7, 4.0, -42.6043, 71.7069, -3.0, 1, 1000, 2460861.214758, 2460861.365173},
{2023, 1, 15.0, 0.0000, -85.0000, 0.0, 0, 0, -1.000000, -1.000000},
{2023, 1, 15.0, 0.0000, -85.0000, 0.0, 0, 100, -1.000000, -1.000000},
{2023, 1, 15.0, 0.0000, -85.0000, 0.0, 0, 1000, -1.000000, -1.000000},
{2023, 1, 15.0, 0.0000, -85.0000, 0.0, 1, 0, -1.000000, -1.000000},
{2023, 1, 15.0, 0.0000, -85.0000, 0.0, 1, 100, -1.000000, -1.000000},
{2023, 1, 15.0, 0.0000, -85.0000, 0.0, 1, 1000, -1.000000, -1.000000},
{2023, 3, 20.0, 0.0000, -85.0000, 0.0, 0, 0, -1.000000, -1.000000},
{2023, 3, 20.0, 0.0000, -85.0000, 0.0, 0, 100, -1.000000, -1.000000},
{2023, 3, 20.0, 0.0000, -85.0000, 0.0, 0, 1000, -1.000000, -1.000000},
{2023, 3, 20.0, 0.0000, -85.0000, 0.0, 1, 0, -1.000000, -1.000000},
{2023, 3, 20.0, 0.0000, -85.0000, 0.0, 1, 100, -1.000000, -1.000000},
{2023, 3, 20.0, 0.0000, -85.0000, 0.0, 1, 1000, -1.000000, -1.000000},
{2023, 6, 21.0, 0.0000, -85.0000, 0.0, 0, 0, -2.000000, -2.000000},
{2023, 6, 21.0, 0.0000, -85.0000, 0.0, 0, 100, -2.000000, -2.000000},
{2023, 6, 21.0, 0.0000, -85.0000, 0.0, 0, 1000, -2.000000, -2.000000},
{2023, 6, 21.0, 0.0000, -85.0000, 0.0, 1, 0, -2.000000, -2.000000},
{2023, 6, 21.0, 0.0000, -85.0000, 0.0, 1, 100, -2.000000, -2.000000},
{2023, 6, 21.0, 0.0000, -85.0000, 0.0, 1, 1000, -2.000000, -2.000000},
{2023, 9, 23.0, 0.0000, -85.0000, 0.0, 0, 0, -1.000000, -1.000000},
{2023, 9, 23.0, 0.0000, -85.0000, 0.0, 0, 100, -1.000000, -1.000000},
{2023, 9, 23.0, 0.0000, -85.0000, 0.0, 0, 1000, -1.000000, -1.000000},
{2023, 9, 23.0, 0.0000, -85.0000, 0.0, 1, 0, -1.000000, -1.000000},
{2023, 9, 23.0, 0.0000, -85.0000, 0.0, 1, 100, -1.000000, -1.000000},
{2023, 9, 23.0, 0.0000, -85.0000, 0.0, 1, 1000, -1.000000, -1.000000},
{2023, 12, 22.0, 0.0000, -85.0000, 0.0, 0, 0, -2.000000, -2.000000},
{2023, 12, 22.0, 0.0000, -85.0000, 0.0, 0, 100, -2.000000, -2.000000},
{2023, 12, 22.0, 0.0000, -85.0000, 0.0, 0, 1000, -2.000000, -2.000000},
{2023, 12, 22.0, 0.0000, -85.0000, 0.0, 1, 0, -2.000000, -2.000000},
{2023, 12, 22.0, 0.0000, -85.0000, 0.0, 1, 100, -2.000000, -2.000000},
{2023, 12, 22.0, 0.0000, -85.0000, 0.0, 1, 1000, -2.000000, -2.000000},
{2024, 2, 29.0, 0.0000, -85.0000, 0.0, 0, 0, -1.000000, -1.000000},
{2024, 2, 29.0, 0.0000, -85.0000, 0.0, 0, 100, -1.000000, -1.000000},
{2024, 2, 29.0, 0.0000, -85.0000, 0.0, 0, 1000, -1.000000, -1.000000},
{2024, 2, 29.0, 0.0000, -85.0000, 0.0, 1, 0, -1.000000, -1.000000},
{2024, 2, 29.0, 0.0000, -85.0000, 0.0, 1, 100, -1.000000, -1.000000},
{2024, 2, 29.0, 0.0000, -85.0000, 0.0, 1, 1000, -1.000000, -1.000000},
{2025, 7, 4.0, 0.0000, -85.0000, 0.0, 0, 0, -1.000000, -1.000000},
{2025, 7, 4.0, 0.0000, -85.0000, 0.0, 0, 100, -1.000000, -1.000000},
{2025, 7, 4.0, 0.0000, -85.0000, 0.0, 0, 1000, -1.000000, -1.000000},
{2025, 7, 4.0, 0.0000, -85.0000, 0.0, 1, 0, -1.000000, -1.000000},
{2025, 7, 4.0, 0.0000, -85.0000, 0.0, 1, 100, -1.000000, -1.000000},
{2025, 7, 4.0, 0.0000, -85.0000, 0.0, 1, 1000, -1.000000, -1.000000},
}
// TestMoonRiseSetRegression 月出月落回归测试
func TestMoonRiseSetRegression(t *testing.T) {
beforeDeltaT := defDeltaTFn
SetDeltaTFn(DefaultDeltaT)
defer SetDeltaTFn(beforeDeltaT)
const tolerance = 0.000001 // 容差设为1微秒,对于天文计算来说已经足够精确
for i, testCase := range moonRiseSetTestData {
julianDay := JDECalc(testCase.Year, testCase.Month, testCase.Day)
// 测试月出时间
actualRise := GetMoonRiseTime(julianDay, testCase.Longitude, testCase.Latitude,
testCase.TimeZone, testCase.ZenithShift, testCase.Height)
if !floatEquals(actualRise, testCase.ExpectedRise, tolerance) {
t.Errorf("测试用例 %d 月出时间不匹配:\n"+
" 日期: %d-%d-%.1f, 经纬度: (%.4f, %.4f), 时区: %.1f, 天顶修正: %.0f, 海拔: %.0f\n"+
" 期望月出: %.6f, 实际月出: %.6f, 差值: %.9f",
i, testCase.Year, testCase.Month, testCase.Day,
testCase.Longitude, testCase.Latitude, testCase.TimeZone,
testCase.ZenithShift, testCase.Height,
testCase.ExpectedRise, actualRise, math.Abs(actualRise-testCase.ExpectedRise))
}
// 测试月落时间
actualSet := GetMoonSetTime(julianDay, testCase.Longitude, testCase.Latitude,
testCase.TimeZone, testCase.ZenithShift, testCase.Height)
if !floatEquals(actualSet, testCase.ExpectedSet, tolerance) {
t.Errorf("测试用例 %d 月落时间不匹配:\n"+
" 日期: %d-%d-%.1f, 经纬度: (%.4f, %.4f), 时区: %.1f, 天顶修正: %.0f, 海拔: %.0f\n"+
" 期望月落: %.6f, 实际月落: %.6f, 差值: %.9f",
i, testCase.Year, testCase.Month, testCase.Day,
testCase.Longitude, testCase.Latitude, testCase.TimeZone,
testCase.ZenithShift, testCase.Height,
testCase.ExpectedSet, actualSet, math.Abs(actualSet-testCase.ExpectedSet))
}
}
t.Logf("月出月落回归测试通过,共测试 %d 个用例", len(moonRiseSetTestData))
}
// TestMoonRiseSetSpecialCases 测试特殊情况
func TestMoonRiseSetSpecialCases(t *testing.T) {
beforeDeltaT := defDeltaTFn
SetDeltaTFn(DefaultDeltaT)
defer SetDeltaTFn(beforeDeltaT)
testCases := []struct {
name string
year int
month int
day float64
longitude float64
latitude float64
timeZone float64
zenithShift float64
height float64
expectedRiseCode float64 // -1=拱, -2=沉, -3=明日
expectedSetCode float64
}{
{
name: "极地地区极昼测试",
year: 2023, month: 6, day: 21,
longitude: 0, latitude: 85,
timeZone: 0, zenithShift: 1, height: 0,
expectedRiseCode: -1, // 可能出现拱的情况
expectedSetCode: -1,
},
{
name: "极地地区极夜测试",
year: 2023, month: 12, day: 22,
longitude: 0, latitude: -85,
timeZone: 0, zenithShift: 1, height: 0,
expectedRiseCode: -2, // 可能出现沉的情况
expectedSetCode: -2,
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
julianDay := JDECalc(tc.year, tc.month, tc.day)
actualRise := GetMoonRiseTime(julianDay, tc.longitude, tc.latitude,
tc.timeZone, tc.zenithShift, tc.height)
actualSet := GetMoonSetTime(julianDay, tc.longitude, tc.latitude,
tc.timeZone, tc.zenithShift, tc.height)
t.Logf("特殊情况测试结果: 月出=%.6f, 月落=%.6f", actualRise, actualSet)
// 对于极地条件,我们主要验证函数不会崩溃,具体的特殊返回值可能因条件而异
if math.IsNaN(actualRise) || math.IsInf(actualRise, 0) {
t.Errorf("月出时间计算异常: %f", actualRise)
}
if math.IsNaN(actualSet) || math.IsInf(actualSet, 0) {
t.Errorf("月落时间计算异常: %f", actualSet)
}
})
}
}
// floatEquals 比较两个浮点数是否在给定容差内相等
func floatEquals(a, b, tolerance float64) bool {
return math.Abs(a-b) <= tolerance
}
// BenchmarkMoonRiseTime 月出时间计算性能测试
func BenchmarkMoonRiseTime(b *testing.B) {
julianDay := JDECalc(2023, 6, 21)
longitude, latitude := 116.4074, 39.9042
timeZone, zenithShift, height := 8.0, 1.0, 0.0
b.ResetTimer()
for i := 0; i < b.N; i++ {
GetMoonRiseTime(julianDay, longitude, latitude, timeZone, zenithShift, height)
}
}
// BenchmarkMoonSetTime 月落时间计算性能测试
func BenchmarkMoonSetTime(b *testing.B) {
julianDay := JDECalc(2023, 6, 21)
longitude, latitude := 116.4074, 39.9042
timeZone, zenithShift, height := 8.0, 1.0, 0.0
b.ResetTimer()
for i := 0; i < b.N; i++ {
GetMoonSetTime(julianDay, longitude, latitude, timeZone, zenithShift, height)
}
}
+176 -115
View File
@@ -288,48 +288,66 @@ func GetJieqiLoops(year, loop int) []float64 {
return jq
}
func GetJQTime(Year, Angle int) float64 { //节气时间
var j int = 1
var Day int
var tp float64
if Angle%2 == 0 {
Day = 18
func GetJQTime(year, angle int) float64 {
// Calculate initial day based on angle parity
var initialDay float64
if angle%2 == 0 {
initialDay = 18
} else {
Day = 3
initialDay = 3
}
if Angle%10 != 0 {
tp = float64(Angle+15.0) / 30.0
// Calculate temporary factor for month offset
var tempFactor float64
if angle%10 != 0 {
tempFactor = float64(angle+15) / 30.0
} else {
tp = float64(Angle) / 30.0
tempFactor = float64(angle) / 30.0
}
Month := 3 + tp
if Month > 12 {
Month -= 12
// Calculate initial month, adjusting if超过 12
initialMonth := 3.0 + tempFactor
if initialMonth > 12.0 {
initialMonth -= 12.0
}
JD1 := JDECalc(int(Year), int(Month), float64(Day))
if Angle == 0 {
Angle = 360
// Calculate initial Julian date
initialJD := JDECalc(year, int(initialMonth), initialDay)
// Set target angle for iteration; if angle is 0, use 360
targetAngle := float64(angle)
if angle == 0 {
targetAngle = 360.0
}
for i := 0; i < j; i++ {
for {
JD0 := JD1
stDegree := JQLospec(JD0) - float64(Angle)
stDegreep := (JQLospec(JD0+0.000005) - JQLospec(JD0-0.000005)) / 0.00001
JD1 = JD0 - stDegree/stDegreep
if math.Abs(JD1-JD0) <= 0.00001 {
break
}
// Newton-Raphson iteration to find precise Julian date
currentJD := initialJD
for {
previousJD := currentJD
errorValue := JQLospec(previousJD, targetAngle) - targetAngle
derivative := (JQLospec(previousJD+0.000005, targetAngle) - JQLospec(previousJD-0.000005, targetAngle)) / 0.00001
currentJD = previousJD - errorValue/derivative
// Check for convergence
if math.Abs(currentJD-previousJD) <= 0.00001 {
break
}
JD1 -= 0.001
}
JD1 += 0.001
return TD2UT(JD1, false)
// Convert to UT and return
return TD2UT(currentJD, false)
}
func JQLospec(JD float64) float64 {
func JQLospec(JD float64, target float64) float64 {
t := HSunApparentLo(JD)
if t <= 12 {
t += 360
if target >= 345 {
if t <= 12 {
t += 360
}
} else if target <= 15 {
if t >= 350 {
t -= 360
}
}
return t
}
@@ -391,8 +409,8 @@ func GetWHTime(Year, Angle int) float64 {
}
for {
JD0 := JD1
stDegree := JQLospec(JD0) - float64(Angle)
stDegreep := (JQLospec(JD0+0.000005) - JQLospec(JD0-0.000005)) / 0.00001
stDegree := JQLospec(JD0, float64(Angle)) - float64(Angle)
stDegreep := (JQLospec(JD0+0.000005, float64(Angle)) - JQLospec(JD0-0.000005, float64(Angle))) / 0.00001
JD1 = JD0 - stDegree/stDegreep
if math.Abs(JD1-JD0) <= 0.00001 {
break
@@ -503,96 +521,133 @@ func SunTimeAngle(JD, Lon, Lat, TZ float64) float64 {
return timeangle
}
/*
* 精确计算传入当日0时JDE
*/
func GetSunRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 {
var An float64
JD = math.Floor(JD) + 1.5
ntz := math.Round(Lon / 15)
if ZS != 0 {
An = -0.8333
}
An = An - HeightDegreeByLat(HEI, Lat)
tztime := GetSunTZTime(JD, Lon, ntz)
if SunHeight(tztime, Lon, Lat, ntz) < An {
return -2 //极夜
}
if SunHeight(tztime-0.5, Lon, Lat, ntz) > An {
return -1 //极昼
}
//(sin(ho)-sin(φ)*sin(δ2))/(cos(φ)*cos(δ2))
tmp := (Sin(An) - Sin(HSunApparentDec(tztime))*Sin(Lat)) / (Cos(HSunApparentDec(tztime)) * Cos(Lat))
var sunrise float64
if math.Abs(tmp) <= 1 && Lat < 85 {
rzsc := ArcCos(tmp) / 15
sunrise = tztime - rzsc/24 - 25.0/24.0/60.0
} else {
sunrise = tztime
i := 0
//TODO:使用二分法计算
for LowSunHeight(sunrise, Lon, Lat, ntz) > An {
i++
sunrise -= 15.0 / 60.0 / 24.0
if i > 48 {
break
}
}
}
JD1 := sunrise
for {
JD0 := JD1
stDegree := SunHeight(JD0, Lon, Lat, ntz) - An
stDegreep := (SunHeight(JD0+0.000005, Lon, Lat, ntz) - SunHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001
JD1 = JD0 - stDegree/stDegreep
if math.Abs(JD1-JD0) <= 0.00001 {
break
}
}
return JD1 - ntz/24 + TZ/24
// GetSunRiseTime 精确计算日出时间,传入当日0时JDE
func GetSunRiseTime(julianDay, longitude, latitude, timeZone, zenithShift, height float64) float64 {
return calculateSunRiseSetTime(julianDay, longitude, latitude, timeZone, zenithShift, height, true)
}
func GetSunSetTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 {
var An float64
JD = math.Floor(JD) + 1.5
ntz := math.Round(Lon / 15)
if ZS != 0 {
An = -0.8333
// GetSunSetTime 精确计算日落时间,传入当日0时JDE
func GetSunSetTime(julianDay, longitude, latitude, timeZone, zenithShift, height float64) float64 {
return calculateSunRiseSetTime(julianDay, longitude, latitude, timeZone, zenithShift, height, false)
}
// calculateSunRiseSetTime 统一的日出日落计算函数
func calculateSunRiseSetTime(julianDay, longitude, latitude, timeZone, zenithShift, height float64, isSunrise bool) float64 {
var sunAngle float64
julianDay = math.Floor(julianDay) + 1.5
naturalTimeZone := math.Round(longitude / 15)
// 计算太阳高度角
if zenithShift != 0 {
sunAngle = -0.8333
}
An = An - HeightDegreeByLat(HEI, Lat)
tztime := GetSunTZTime(JD, Lon, ntz)
if SunHeight(tztime, Lon, Lat, ntz) < An {
return -2 //极夜
sunAngle = sunAngle - HeightDegreeByLat(height, latitude)
// 获取太阳上中天时间
solarNoonTime := GetSunTZTime(julianDay, longitude, naturalTimeZone)
// 检查极夜极昼条件
polarCondition := checkPolarConditions(solarNoonTime, longitude, latitude, naturalTimeZone, sunAngle, isSunrise)
if polarCondition != 0 {
return polarCondition
}
if SunHeight(tztime+0.5, Lon, Lat, ntz) > An {
return -1 //极昼
// 计算初始估算时间
initialTime := calculateInitialSunTime(solarNoonTime, longitude, latitude, naturalTimeZone, sunAngle, isSunrise)
// 牛顿-拉夫逊迭代求精确解
return sunRiseSetNewtonRaphsonIteration(initialTime, longitude, latitude, naturalTimeZone, sunAngle, timeZone)
}
// checkPolarConditions 检查极夜极昼条件
func checkPolarConditions(solarNoonTime, longitude, latitude, naturalTimeZone, sunAngle float64, isSunrise bool) float64 {
if SunHeight(solarNoonTime, longitude, latitude, naturalTimeZone) < sunAngle {
return -2 // 极夜
}
tmp := (Sin(An) - Sin(HSunApparentDec(tztime))*Sin(Lat)) / (Cos(HSunApparentDec(tztime)) * Cos(Lat))
var sundown float64
if math.Abs(tmp) <= 1 && Lat < 85 {
rzsc := ArcCos(tmp) / 15
sundown = tztime + rzsc/24.0 + 35.0/24.0/60.0
} else {
sundown = tztime
i := 0
for LowSunHeight(sundown, Lon, Lat, ntz) > An {
i++
sundown += 15.0 / 60.0 / 24.0
if i > 48 {
break
}
checkTime := solarNoonTime + 0.5
if isSunrise {
checkTime = solarNoonTime - 0.5
}
if SunHeight(checkTime, longitude, latitude, naturalTimeZone) > sunAngle {
return -1 // 极昼
}
return 0 // 正常条件
}
// calculateInitialSunTime 计算日出日落的初始估算时间
func calculateInitialSunTime(solarNoonTime, longitude, latitude, naturalTimeZone, sunAngle float64, isSunrise bool) float64 {
// 使用球面三角法计算: (sin(ho)-sin(φ)*sin(δ))/(cos(φ)*cos(δ))
apparentDeclination := HSunApparentDec(solarNoonTime)
cosHourAngle := (Sin(sunAngle) - Sin(apparentDeclination)*Sin(latitude)) / (Cos(apparentDeclination) * Cos(latitude))
if math.Abs(cosHourAngle) <= 1 && latitude < 85 {
// 使用解析解
hourAngle := ArcCos(cosHourAngle) / 15
timeOffset := 25.0 / 24.0 / 60.0 // 日出偏移
if !isSunrise {
timeOffset = 35.0 / 24.0 / 60.0 // 日落偏移
}
if isSunrise {
return solarNoonTime - hourAngle/24 - timeOffset
} else {
return solarNoonTime + hourAngle/24 + timeOffset
}
} else {
// 使用迭代逼近法(极地条件)
return iterativeApproach(solarNoonTime, longitude, latitude, naturalTimeZone, sunAngle, isSunrise)
}
JD1 := sundown
}
// iterativeApproach 迭代逼近法计算(用于极地等特殊条件)
func iterativeApproach(solarNoonTime, longitude, latitude, naturalTimeZone, sunAngle float64, isSunrise bool) float64 {
estimatedTime := solarNoonTime
stepSize := 15.0 / 60.0 / 24.0 // 15分钟步长
if isSunrise {
stepSize = -stepSize
}
const maxIterations = 48
for i := 0; i < maxIterations && LowSunHeight(estimatedTime, longitude, latitude, naturalTimeZone) > sunAngle; i++ {
estimatedTime += stepSize
}
return estimatedTime
}
// sunRiseSetNewtonRaphsonIteration 牛顿-拉夫逊迭代法求精确解
func sunRiseSetNewtonRaphsonIteration(initialTime, longitude, latitude, naturalTimeZone, sunAngle, timeZone float64) float64 {
const (
convergenceThreshold = 0.00001
derivativeStep = 0.000005
)
currentTime := initialTime
for {
JD0 := JD1
stDegree := SunHeight(JD0, Lon, Lat, ntz) - An
stDegreep := (SunHeight(JD0+0.000005, Lon, Lat, ntz) - SunHeight(JD0-0.000005, Lon, Lat, ntz)) / 0.00001
JD1 = JD0 - stDegree/stDegreep
if math.Abs(JD1-JD0) <= 0.00001 {
previousTime := currentTime
// 计算函数值:f(t) = SunHeight(t) - targetAngle
functionValue := SunHeight(previousTime, longitude, latitude, naturalTimeZone) - sunAngle
// 计算导数:f'(t) ≈ (f(t+h) - f(t-h)) / (2h)
derivative := (SunHeight(previousTime+derivativeStep, longitude, latitude, naturalTimeZone) -
SunHeight(previousTime-derivativeStep, longitude, latitude, naturalTimeZone)) / (2 * derivativeStep)
// 牛顿-拉夫逊公式:t_new = t_old - f(t) / f'(t)
currentTime = previousTime - functionValue/derivative
// 检查收敛
if math.Abs(currentTime-previousTime) <= convergenceThreshold {
break
}
}
return JD1 - ntz/24 + TZ/24
// 转换为指定时区
return currentTime - naturalTimeZone/24 + timeZone/24
}
/*
@@ -643,9 +698,15 @@ func SunAngle(JD, Lon, Lat, TZ float64) float64 {
* 干支
*/
func GetGZ(year int) string {
tiangan := []string{"庚", "辛", "壬", "癸", "甲", "乙", "丙", "丁", "戊", ""}
tiangan := []string{"庚", "辛", "壬", "癸", "甲", "乙", "丙", "丁", "戊", ""}
dizhi := []string{"申", "酉", "戌", "亥", "子", "丑", "寅", "卯", "辰", "巳", "午", "未"}
t := year - (year / 10 * 10)
if t < 0 {
t += 10
}
d := year % 12
return tiangan[t] + dizhi[d] + "年"
if d < 0 {
d += 12
}
return tiangan[t] + dizhi[d]
}