You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
astro/neptune/neptune_test.go

27 lines
565 B
Go

package neptune
import (
"fmt"
"testing"
"time"
)
func TestNeptune(t *testing.T) {
tz := time.FixedZone("CST", 8*3600)
date := time.Date(2022, 01, 20, 00, 00, 00, 00, tz)
if NextConjunction(date).Unix() != 1647171796 {
t.Fatal(NextConjunction(date).Unix())
}
if CulminationTime(date, 115).Unix() != 1642665021 {
t.Fatal(CulminationTime(date, 115).Unix())
}
date, err := (RiseTime(date, 115, 40, 0, false))
if err != nil {
t.Fatal(err)
}
if date.Unix() != 1642644398 {
t.Fatal(date.Unix())
}
fmt.Println(DownTime(date, 115, 40, 0, false))
}