新增恒星相关计算

This commit is contained in:
2022-05-12 15:55:48 +08:00
parent 7604fabf8f
commit bb07e23238
16 changed files with 375 additions and 132 deletions
+13 -13
View File
@@ -14,12 +14,12 @@ func Test_Jq(t *testing.T) {
//fmt.Println(JDE2Date(GetWHTime(2019, 10)))
//fmt.Println(JDE2Date(GetJQTime(2020, 0)))
//date := TD2UT(GetJQTime(2020, 0), true)
//fmt.Println(HSunSeeLo(date))
//fmt.Println(HSunApparentLo(date))
}
func Test_SunLo(t *testing.T) {
fmt.Printf("%.14f\n", HSunTrueLo(2458840.0134162))
fmt.Printf("%.14f", HSunSeeLo(2458840.0134162))
fmt.Printf("%.14f", HSunApparentLo(2458840.0134162))
}
func Benchmark_SunRise(b *testing.B) {
@@ -35,7 +35,7 @@ func Benchmark_SunLo(b *testing.B) {
jde := GetNowJDE()
for i := 0; i < b.N; i++ {
//GetNowJDE()
HSunSeeLo(jde)
HSunApparentLo(jde)
}
}
@@ -51,16 +51,16 @@ func Test_Cal(t *testing.T) {
func Test_SunRise(t *testing.T) {
a := time.Now().UnixNano()
//b := GetSunRiseTime(GetNowJDE(), 115, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+1, 115, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+2, 115, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+3, 115, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+4, 115, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+5, 115, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+6, 115, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+7, 115, 32, 8, 0)
//b := GetSunRiseTime(GetNowJDE(), 120, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+1, 145, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+2, 135, 50, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+3, 125, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+4, 75, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+5, 85, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+6, 95, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+7, 105, 32, 8, 0)
//b = GetSunRiseTime(GetNowJDE()+8, 115, 32, 8, 0)
b := GetSunRiseTime(GetNowJDE()+9, 115, 32, 8, 0, 10)
b := GetSunRiseTime(GetNowJDE()+9, 125, 32, 8, 0, 10)
fmt.Println(time.Now().UnixNano() - a)
fmt.Println(SunHeight(b, 115, 32, 8))
fmt.Println(JDE2Date((b)))
@@ -73,7 +73,7 @@ func Test_SunTwilightMo(t *testing.T) {
fmt.Println(GetAsaTime(jde, 113.58880556, 87.66833333, 8, -6))
for i := 10.0; i < 90.0; i += 0.3 {
fmt.Println(i, GetAsaTime(jde, 113.5880556, float64(i), 8, -6))
fmt.Println(i, GetAsaTime(jde, 125.45506654, float64(i), 8, -6))
}
}