master
兔子 5 years ago
commit 9d047c848a

@ -0,0 +1,190 @@
package astro
import (
"errors"
"time"
"b612.me/astro/basic"
)
/*
*/
func NowJDE() float64 {
return basic.GetNowJDE()
}
/*
*/
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 basic.JDECalc(date.Year(), int(date.Month()), day)
}
/*
*/
func JDE2Date(jde float64) time.Time {
return basic.JDE2Date(jde)
}
/*
*/
func Lunar(year, month, day int) (int, int, bool, string) {
return basic.GetLunar(year, month, day)
}
/*
*/
func Solar(year, month, day int, leap bool) time.Time {
jde := basic.GetSolar(year, month, day, leap)
return JDE2Date(jde)
}
/*
jde0 JDE
lon西
lat
timezone西
aerotrue
*/
func SunRiseTime(jde, lon, lat, timezone float64, aero bool) (time.Time, error) {
var err error = nil
tz := 0.00
if aero {
tz = 1
}
tm := basic.GetSunRiseTime(jde, lon, lat, timezone, tz)
if tm == -2 {
err = errors.New("极夜")
}
if tm == -1 {
err = errors.New("极昼")
}
return JDE2Date(tm), err
}
/*
jde0 JDE
lon西
lat
timezone西
aerotrue
*/
func SunDownTime(jde, lon, lat, timezone float64, aero bool) (time.Time, error) {
var err error = nil
tz := 0.00
if aero {
tz = 1
}
tm := basic.GetSunDownTime(jde, lon, lat, timezone, tz)
if tm == -2 {
err = errors.New("极夜")
}
if tm == -1 {
err = errors.New("极昼")
}
return JDE2Date(tm), err
}
/*
jde0 JDE
lon西
lat
timezone西
angle-6 -12 -18
*/
func MorningTwilightTime(jde, lon, lat, timezone, angle float64) (time.Time, error) {
var err error = nil
tm := basic.GetAsaTime(jde, lon, lat, timezone, angle)
if tm == -2 {
err = errors.New("不存在")
}
if tm == -1 {
err = errors.New("不存在")
}
return JDE2Date(tm), err
}
/*
jde0 JDE
lon西
lat
timezone西
angle-6 -12 -18
*/
func EveningTwilightTime(jde, lon, lat, timezone, angle float64) (time.Time, error) {
var err error = nil
tm := basic.GetBanTime(jde, lon, lat, timezone, angle)
if tm == -2 {
err = errors.New("不存在")
}
if tm == -1 {
err = errors.New("不存在")
}
return JDE2Date(tm), err
}
/*
jde0 JDE
lon西
lat
timezone西
aerotrue
*/
func MoonRiseTime(jde, lon, lat, timezone float64, aero bool) (time.Time, error) {
var err error = nil
tz := 0.00
if aero {
tz = 1
}
tm := basic.GetMoonRiseTime(jde, lon, lat, timezone, tz)
if tm == -2 {
err = errors.New("极夜")
}
if tm == -1 {
err = errors.New("极昼")
}
return JDE2Date(tm), err
}
/*
jde0 JDE
lon西
lat
timezone西
aerotrue
*/
func MoonDownTime(jde, lon, lat, timezone float64, aero bool) (time.Time, error) {
var err error = nil
tz := 0.00
if aero {
tz = 1
}
tm := basic.GetMoonDownTime(jde, lon, lat, timezone, tz)
if tm == -2 {
err = errors.New("极夜")
}
if tm == -1 {
err = errors.New("极昼")
}
return JDE2Date(tm), err
}
/*
jdeUTC JDE
*/
func Phase(jde float64) float64 {
return basic.MoonLight(basic.TD2UT(jde, true))
}

@ -0,0 +1,29 @@
package basic
import (
"fmt"
"testing"
)
func Test_SunAndMoon(t *testing.T) {
jde := GetNowJDE() - 1
ra := HSunSeeRa(jde - 8.0/24.0)
dec := HSunSeeDec(jde - 8.0/24.0)
fmt.Printf("当前JDE:%.14f\n", jde)
fmt.Println("当前太阳黄经:", HSunSeeLo(jde-8.0/24.0))
fmt.Println("当前太阳赤经:", ra)
fmt.Println("当前太阳赤纬:", dec)
fmt.Println("当前太阳星座:", WhichCst(ra, dec, jde))
fmt.Println("当前黄赤交角:", EclipticObliquity(jde-8.0/24.0, true))
fmt.Println("当前日出:", JDE2Date(GetSunRiseTime(jde, 115, 32, 8, 1)))
fmt.Println("当前日落:", JDE2Date(GetSunDownTime(jde, 115, 32, 8, 1)))
fmt.Println("当前晨影 -6", JDE2Date(GetAsaTime(jde, 115, 32, 8, -6)))
fmt.Println("当前晨影 -12", JDE2Date(GetAsaTime(jde, 115, 32, 8, -12)))
fmt.Println("当前昏影 -6", JDE2Date(GetBanTime(jde, 115, 32, 8, -6)))
fmt.Println("当前昏影 -12", JDE2Date(GetBanTime(jde, 115, 32, 8, -12)))
fmt.Print("农历:")
fmt.Println(GetLunar(2019, 10, 23))
fmt.Println("当前月出:", JDE2Date(GetMoonRiseTime(jde, 115, 32, 8, 1)))
fmt.Println("当前月落:", JDE2Date(GetMoonDownTime(jde, 115, 32, 8, 1)))
fmt.Println("月相:", MoonLight(jde-8.0/24.0))
}

@ -0,0 +1,24 @@
package basic
import (
"fmt"
"testing"
"time"
)
func Test_JDECALC(t *testing.T) {
i := 10
for i > 0 {
fmt.Printf("%.18f\n", GetNowJDE())
time.Sleep(time.Second)
i--
}
}
func Test_TDUT(t *testing.T) {
fmt.Printf("%.18f\n", DeltaT(2119.5, false))
}
func Test_JDE2(t *testing.T) {
fmt.Println(JDE2Date(2458868.500))
}

@ -0,0 +1,323 @@
package basic
import (
"fmt"
"math"
"strings"
"time"
)
/*
@name:
@dec: 1582
@
*/
func JDECalc(Year, Month int, Day float64) float64 {
if Month == 1 || Month == 2 {
Year--
Month += 12
}
var tmpvarB int
tmpvar := fmt.Sprintf("%04d-%02d-%2d", Year, Month, int(math.Floor(Day)))
if strings.Compare(tmpvar, `1582-10-04`) != 1 {
tmpvarB = 0
} else {
tmpvarA := int(Year / 100)
tmpvarB = 2 - tmpvarA + int(tmpvarA/4)
}
return (math.Floor(365.25*(float64(Year)+4716.0)) + math.Floor(30.6001*float64(Month+1)) + Day + float64(tmpvarB) - 1524.5)
}
/*
@name:
*/
func GetNowJDE() (NowJDE float64) {
Time := float64(time.Now().Second())/3600.0/24.0 + float64(time.Now().Minute())/60.0/24.0 + float64(time.Now().Hour())/24.0
NowJDE = JDECalc(time.Now().Year(), int(time.Now().Month()), float64(time.Now().Day())+Time)
return
}
func dt_ext(y, jsd float64) float64 { // 二次曲线外推,用于数值外插
dy := (y - 1820) / 100.00
return -20 + jsd*dy*dy
}
func dt_cal(y float64) float64 { //传入年, 返回世界时UT与原子时力学时 TD之差, ΔT = TD - UT
dt_at := []float64{
-4000, 108371.7, -13036.80, 392.000, 0.0000,
-500, 17201.0, -627.82, 16.170, -0.3413,
-150, 12200.6, -346.41, 5.403, -0.1593,
150, 9113.8, -328.13, -1.647, 0.0377,
500, 5707.5, -391.41, 0.915, 0.3145,
900, 2203.4, -283.45, 13.034, -0.1778,
1300, 490.1, -57.35, 2.085, -0.0072,
1600, 120.0, -9.81, -1.532, 0.1403,
1700, 10.2, -0.91, 0.510, -0.0370,
1800, 13.4, -0.72, 0.202, -0.0193,
1830, 7.8, -1.81, 0.416, -0.0247,
1860, 8.3, -0.13, -0.406, 0.0292,
1880, -5.4, 0.32, -0.183, 0.0173,
1900, -2.3, 2.06, 0.169, -0.0135,
1920, 21.2, 1.69, -0.304, 0.0167,
1940, 24.2, 1.22, -0.064, 0.0031,
1960, 33.2, 0.51, 0.231, -0.0109,
1980, 51.0, 1.29, -0.026, 0.0032,
2000, 63.87, 0.1, 0, 0,
2005, 64.7, 0.4, 0, 0, //一次项记为x,则 10x=0.4秒/年*(2015-2005),解得x=0.4
2015, 69,
}
y0 := dt_at[len(dt_at)-2] //表中最后一年
t0 := dt_at[len(dt_at)-1] //表中最后一年的 deltatT
if y >= y0 {
jsd := float64(31) // sjd是y1年之后的加速度估计
// 瑞士星历表jsd=31, NASA网站jsd=32, skmap的jsd=29
if y > y0+100 {
return dt_ext(y, jsd)
}
v := dt_ext(y, jsd) //二次曲线外推
dv := dt_ext(y0, jsd) - t0 // ye年的二次外推与te的差
return (v - dv*(y0+100-y)/100)
}
d := dt_at
var i int
for i = 0; i < len(d); i += 5 {
if float64(y) < d[i+5] {
break
// 判断年所在的区间
}
}
t1 := (y - d[i]) / (d[i+5] - d[i]) * 10 //////// 三次插值, 保证精确性
t2 := t1 * t1
t3 := t2 * t1
res := d[i+1] + d[i+2]*t1 + d[i+3]*t2 + d[i+4]*t3
return (res)
}
func DeltaT(Date float64, IsJDE bool) (Result float64) { //传入年或儒略日,传出为秒
var Year float64
if IsJDE {
Year = (Date-2451545.0)/365.25 + 0.1 + 2000
} else {
Year = Date
}
if Year < 2010 {
Result = dt_cal(Year)
return
}
if Year < 2100 && Year >= 2010 {
Result = dt_cal(Year) //-3.2-(Year-2017)*0.029915;
return
}
if Year >= 2100 && Year <= 2150 {
Result = -20 + 32*(((Year-1820.0)/100.0)*((Year-1820.0)/100.0)) - 0.5628*(2150-Year)
return
}
if Year > 2150 {
//tmp=(Year-1820)/100;
//Result= -20 + 32 * tmp*tmp;
Result = dt_cal(Year)
return
}
return
}
func TD2UT(JDE float64, UT2TD bool) float64 { // true 世界时转力学时CCfalse 力学时转世界时VV
Deltat := DeltaT(JDE, true)
if UT2TD {
return JDE + Deltat/3600/24
} else {
return JDE - Deltat/3600/24
}
}
/*
* @name: JDE
*/
func JDE2Date(JD float64) time.Time {
JD = JD + 0.5
Z := float64(int(JD))
F := JD - Z
var A, B, Years, Months, Days float64
if Z < 2299161.0 {
A = Z
} else {
alpha := math.Floor((Z - 1867216.25) / 36524.25)
A = Z + 1 + alpha - math.Floor(alpha/4)
}
B = A + 1524
C := math.Floor((B - 122.1) / 365.25)
D := math.Floor(365.25 * C)
E := math.Floor((B - D) / 30.6001)
Days = B - D - math.Floor(30.6001*E) + F
if E < 14 {
Months = E - 1
}
if E == 14 || E == 15 {
Months = E - 13
}
if Months > 2 {
Years = C - 4716
}
if Months == 1 || Months == 2 {
Years = C - 4715
}
tms := (Days - math.Floor(Days)) * 24 * 3600
Days = math.Floor(Days)
tz, _ := time.LoadLocation("Local")
dates := time.Date(int(Years), time.Month(int(Months)), int(Days), 0, 0, 0, 0, tz)
dates = time.Unix(dates.Unix()+int64(tms), int64((tms-math.Floor(tms))*1000000000))
return dates
}
func GetLunar(year, month, day int) (lmonth, lday int, leap bool, result string) {
jde := JDECalc(year, month, float64(day)) //计算当前JDE时间
if month == 11 || month == 12 { //判断当前日期属于前一年周期还是后一年周期
//判断方法:当前日期与冬至日所在朔望月的关系
winterday := GetJQTime(year, 270) + 8.0/24.0 //冬至日日期(世界时,北京时间)
Fday := TD2UT(CalcMoonS(float64(year)+11.0/12.0+5.0/30.0/12.0, 0), true) + 8.0/24.0 //朔月(世界时,北京时间)
Yday := TD2UT(CalcMoonS(float64(year)+1.0, 0), true) + 8.0/24.0 //下一朔月(世界时,北京时间)
if Fday-math.Floor(Fday) > 0.5 {
Fday = math.Floor(Fday) + 0.5
} else {
Fday = math.Floor(Fday) - 0.5
}
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--
}
} else {
year--
}
jieqi := GetOneYearJQ(year) //一年的节气
moon := GetOneYearMoon(float64(year)) //一年朔月日
winter1 := jieqi[1] //第一年冬至日
winter2 := jieqi[25] //第二年冬至日
for k, v := range moon {
if v-math.Floor(v) > 0.5 {
moon[k] = math.Floor(v) + 0.5
} else {
moon[k] = math.Floor(v) - 0.5
}
} //置闰月为0点
for k, v := range jieqi {
if v-math.Floor(v) > 0.5 {
jieqi[k] = math.Floor(v) + 0.5
} else {
jieqi[k] = math.Floor(v) - 0.5
}
} //置节气为0点
mooncount := 0 //年内朔望月计数
var min, max int = 20, 0 //最大最小计数
for i := 1; i < 16; i++ {
if moon[i] >= winter1 && moon[i] < winter2 {
if i <= min {
min = i
}
if i >= max {
max = i
}
mooncount++
}
}
leapmonth := 20
if mooncount == 13 { //存在闰月
j, i := 3, 1
for i = min; i <= max; i++ {
if !(moon[i] <= jieqi[j] && moon[i+1] > jieqi[j]) {
break
}
j += 2
}
leapmonth = i - min + 1
}
i := 0
for i = min - 1; i <= max; i++ {
if moon[i] > jde {
break
}
}
lmonth = i - min
var sleap bool = false
leap = false
if lmonth >= leapmonth {
sleap = true
}
if lmonth == leapmonth {
leap = true
}
if lmonth < 2 {
lmonth += 11
} else {
lmonth--
}
if sleap {
lmonth--
}
lday = int(jde-moon[i-1]) + 1
strmonth := []string{"十", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"}
strday := []string{"初", "十", "廿", "三"}
if leap {
result += "闰"
}
result += strmonth[lmonth] + "月"
if lday == 20 {
result += "二十"
} else if lday == 10 {
result += "初十"
} else {
result += strday[lday/10] + strmonth[lday%10]
}
return
}
func GetSolar(year, month, day int, leap bool) float64 {
if month < 11 {
year--
}
jieqi := GetOneYearJQ(year) //一年的节气
moon := GetOneYearMoon(float64(year)) //一年朔月日
winter1 := jieqi[1] //第一年冬至日
winter2 := jieqi[25] //第二年冬至日
for k, v := range moon {
if v-math.Floor(v) > 0.5 {
moon[k] = math.Floor(v) + 0.5
} else {
moon[k] = math.Floor(v) - 0.5
}
} //置闰月为0点
for k, v := range jieqi {
if v-math.Floor(v) > 0.5 {
jieqi[k] = math.Floor(v) + 0.5
} else {
jieqi[k] = math.Floor(v) - 0.5
}
} //置节气为0点
mooncount := 0 //年内朔望月计数
var min, max int = 20, 0 //最大最小计数
for i := 1; i < 16; i++ {
if moon[i] >= winter1 && moon[i] < winter2 {
if i <= min {
min = i
}
if i >= max {
max = i
}
mooncount++
}
}
if leap {
month++
}
if month > 10 {
month -= 11
} else {
month++
}
jde := moon[min-1+month] + float64(day) - 1
return jde
}

@ -0,0 +1,141 @@
package basic
import (
"math"
. "b612.me/astro/tools"
)
/*
*
*/
func LoToRa(lo, bo, jde float64) float64 {
ra := math.Atan2(Sin(lo)*Cos(Sita(jde)-Tan(bo)*Sin(Sita(jde))), Cos(lo))
ra = ra * 180 / math.Pi
if ra < 0 {
ra += 360
}
return ra
}
func BoToDec(lo, bo, jde float64) float64 {
dec := ArcSin(Sin(bo)*Cos(Sita(jde)) + Cos(bo)*Sin(Sita(jde))*Sin(lo))
return dec
}
/*
* st end JDE
*/
func ZuoBiaoSuiCha(ra, dec, st, end float64) (float64, float64) {
t := (end - st) / 36525.0
l := (2306.2181*t + 0.30188*t*t + 0.017998*t*t*t) / 3600
z := (2306.2181*t + 1.09468*t*t + 0.018203*t*t*t) / 3600
o := (2004.3109*t - 0.42665*t*t + 0.041833*t*t*t) / 3600
A := Cos(dec) * Sin(ra+l)
B := Cos(o)*Cos(dec)*Cos(ra+l) - Sin(o)*Sin(dec)
C := Sin(o)*Cos(dec)*Cos(ra+l) + Cos(o)*Sin(dec)
ras := math.Atan2(A, B)
ras = ras * 180 / math.Pi
if ras < 0 {
ras += 360
}
ra = ras + z
dec = ArcSin(C)
return ra, dec
}
/*
* jdeau
*/
func pcosi(lat, h float64) float64 {
b := 6356.755
a := 6378.14
u := ArcTan(b / a * Tan(lat))
//psin=b/a*Sin(u)+h/6378140*Sin(lat);
pcos := Cos(u) + h/6378140.0*Cos(lat)
return pcos
}
func psini(lat, h float64) float64 {
b := 6356.755
a := 6378.14
u := ArcTan(b / a * Tan(lat))
psin := b/a*Sin(u) + h/6378140*Sin(lat)
//pcos=Cos(u)+h/6378140*Cos(lat);
return psin
}
func ZhanXinRaDec(ra, dec, lat, lon, jd, au, h float64) (float64, float64) {
sinpi := Sin(0.0024427777777) / au
pcosi := pcosi(lat, h)
psini := psini(lat, h)
tH := Limit360(TD2UT(SeeStarTime(jd), false)*15 + lon - ra)
nra := math.Atan2(-pcosi*sinpi*Sin(tH), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi
ndec := math.Atan2((Sin(dec)-psini*sinpi)*Cos(nra), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi
return ra + nra, ndec
}
func ZhanXinRa(ra, dec, lat, lon, jd, au, h float64) float64 { //jd为格林尼治标准时
sinpi := Sin(0.0024427777777) / au
pcosi := pcosi(lat, h)
tH := Limit360(TD2UT(SeeStarTime(jd), false)*15 + lon - ra)
nra := math.Atan2(-pcosi*sinpi*Sin(tH), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi
return ra + nra
}
func ZhanXinDec(ra, dec, lat, lon, jd, au, h float64) float64 { //jd为格林尼治标准时
sinpi := Sin(0.0024427777777) / au
pcosi := pcosi(lat, h)
psini := psini(lat, h)
tH := Limit360(TD2UT(SeeStarTime(jd), false)*15 + lon - ra)
nra := math.Atan2(-pcosi*sinpi*Sin(tH), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi
ndec := math.Atan2((Sin(dec)-psini*sinpi)*Cos(nra), (Cos(dec)-pcosi*sinpi*Cos(tH))) * 180 / math.Pi
return ndec
}
func ZhanXinLo(lo, bo, lat, lon, jd, au, h float64) float64 { //jd为格林尼治标准时
C := pcosi(lat, h)
S := psini(lat, h)
sinpi := Sin(0.0024427777777) / au
ra := LoToRa(lo, bo, jd)
tH := Limit360(TD2UT(SeeStarTime(jd), false)*15 + lon - ra)
N := Cos(lo)*Cos(bo) - C*sinpi*Cos(tH)
nlo := math.Atan2(Sin(lo)*Cos(bo)-sinpi*(S*Sin(Sita(jd))+C*Cos(Sita(jd))*Sin(tH)), N) * 180 / math.Pi
return nlo
}
func ZhanXinBo(lo, bo, lat, lon, jd, au, h float64) float64 { //jd为格林尼治标准时
C := pcosi(lat, h)
S := psini(lat, h)
sinpi := Sin(0.0024427777777) / au
ra := LoToRa(lo, bo, jd)
tH := Limit360(TD2UT(SeeStarTime(jd), false)*15 + lon - ra)
N := Cos(lo)*Cos(bo) - C*sinpi*Cos(tH)
nlo := math.Atan2(Sin(lo)*Cos(bo)-sinpi*(S*Sin(Sita(jd))+C*Cos(Sita(jd))*Sin(tH)), N) * 180 / math.Pi
nbo := math.Atan2(Cos(nlo)*(Sin(bo)-sinpi*(S*Cos(Sita(jd))-C*Sin(Sita(jd))*Sin(tH))), N) * 180 / math.Pi
return nbo
}
/*
func GXCLo(lo,bo,jd float64) float64{ //光行差修正
k:=20.49552;
sunlo:=SunTrueLo(jd);
e:=Earthe(jd);
epi=earth->EarthPI(jd);
tmp=(-k*this->CosR(sunlo-lo)+e*k*this->CosR(epi-lo))/this->CosR(bo);
return tmp;
}
public function GXCBo(lo,bo,jd)
{
earth=new Earth();
k=20.49552;
sunlo=earth->SunTrueLo(jd);
e=earth->Earthe(jd);
epi=earth->EarthPI(jd);
tmp=-k*this->SinR(bo)*(this->SinR(sunlo-lo)-e*this->SinR(epi-lo));
return tmp;
}
*/

@ -0,0 +1,10 @@
package basic
import (
"fmt"
"testing"
)
func Test_LoBo(t *testing.T) {
fmt.Sprintf("%.14f", LoToRa(22, 33, 2451545.0))
}

@ -0,0 +1,147 @@
package basic
import (
"math"
"b612.me/astro/planet"
. "b612.me/astro/tools"
)
func JupiterL(JD float64) float64 {
return planet.WherePlanet(4, 0, JD)
}
func JupiterB(JD float64) float64 {
return planet.WherePlanet(4, 1, JD)
}
func JupiterR(JD float64) float64 {
return planet.WherePlanet(4, 2, JD)
}
func AJupiterX(JD float64) float64 {
l := JupiterL(JD)
b := JupiterB(JD)
r := JupiterR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
return x
}
func AJupiterY(JD float64) float64 {
l := JupiterL(JD)
b := JupiterB(JD)
r := JupiterR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
return y
}
func AJupiterZ(JD float64) float64 {
//l := JupiterL(JD)
b := JupiterB(JD)
r := JupiterR(JD)
// el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
z := r*Sin(b) - er*Sin(eb)
return z
}
func AJupiterXYZ(JD float64) (float64, float64, float64) {
l := JupiterL(JD)
b := JupiterB(JD)
r := JupiterR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
z := r*Sin(b) - er*Sin(eb)
return x, y, z
}
func JupiterSeeRa(JD float64) float64 {
lo, bo := JupiterSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
return Limit360(ra)
}
func JupiterSeeDec(JD float64) float64 {
lo, bo := JupiterSeeLoBo(JD)
sita := Sita(JD)
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return dec
}
func JupiterSeeRaDec(JD float64) (float64, float64) {
lo, bo := JupiterSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return Limit360(ra), dec
}
func EarthJupiterAway(JD float64) float64 {
x, y, z := AJupiterXYZ(JD)
to := math.Sqrt(x*x + y*y + z*z)
return to
}
func JupiterSeeLo(JD float64) float64 {
x, y, z := AJupiterXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AJupiterXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo
}
func JupiterSeeBo(JD float64) float64 {
x, y, z := AJupiterXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AJupiterXYZ(JD - to)
//lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
//lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
//lo+=GXCLo(lo,bo,JD);
//bo+=GXCBo(lo,bo,JD)/3600;
//lo+=HJZD(JD);
return bo
}
func JupiterSeeLoBo(JD float64) (float64, float64) {
x, y, z := AJupiterXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AJupiterXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo, bo
}
func JupiterMag(JD float64) float64 {
AwaySun := JupiterR(JD)
AwayEarth := EarthJupiterAway(JD)
Away := planet.WherePlanet(-1, 2, JD)
i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth)
i = ArcCos(i)
Mag := -9.40 + 5*math.Log10(AwaySun*AwayEarth) + 0.0005*i
return FloatRound(Mag, 2)
}

@ -0,0 +1,147 @@
package basic
import (
"math"
"b612.me/astro/planet"
. "b612.me/astro/tools"
)
func MarsL(JD float64) float64 {
return planet.WherePlanet(3, 0, JD)
}
func MarsB(JD float64) float64 {
return planet.WherePlanet(3, 1, JD)
}
func MarsR(JD float64) float64 {
return planet.WherePlanet(3, 2, JD)
}
func AMarsX(JD float64) float64 {
l := MarsL(JD)
b := MarsB(JD)
r := MarsR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
return x
}
func AMarsY(JD float64) float64 {
l := MarsL(JD)
b := MarsB(JD)
r := MarsR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
return y
}
func AMarsZ(JD float64) float64 {
//l := MarsL(JD)
b := MarsB(JD)
r := MarsR(JD)
// el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
z := r*Sin(b) - er*Sin(eb)
return z
}
func AMarsXYZ(JD float64) (float64, float64, float64) {
l := MarsL(JD)
b := MarsB(JD)
r := MarsR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
z := r*Sin(b) - er*Sin(eb)
return x, y, z
}
func MarsSeeRa(JD float64) float64 {
lo, bo := MarsSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
return Limit360(ra)
}
func MarsSeeDec(JD float64) float64 {
lo, bo := MarsSeeLoBo(JD)
sita := Sita(JD)
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return dec
}
func MarsSeeRaDec(JD float64) (float64, float64) {
lo, bo := MarsSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return Limit360(ra), dec
}
func EarthMarsAway(JD float64) float64 {
x, y, z := AMarsXYZ(JD)
to := math.Sqrt(x*x + y*y + z*z)
return to
}
func MarsSeeLo(JD float64) float64 {
x, y, z := AMarsXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AMarsXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo
}
func MarsSeeBo(JD float64) float64 {
x, y, z := AMarsXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AMarsXYZ(JD - to)
//lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
//lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
//lo+=GXCLo(lo,bo,JD);
//bo+=GXCBo(lo,bo,JD)/3600;
//lo+=HJZD(JD);
return bo
}
func MarsSeeLoBo(JD float64) (float64, float64) {
x, y, z := AMarsXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AMarsXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo, bo
}
func MarsMag(JD float64) float64 {
AwaySun := MarsR(JD)
AwayEarth := EarthMarsAway(JD)
Away := planet.WherePlanet(-1, 2, JD)
i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth)
i = ArcCos(i)
Mag := -1.52 + 5*math.Log10(AwaySun*AwayEarth) + 0.016*i
return FloatRound(Mag, 2)
}

@ -0,0 +1,147 @@
package basic
import (
"math"
"b612.me/astro/planet"
. "b612.me/astro/tools"
)
func MercuryL(JD float64) float64 {
return planet.WherePlanet(1, 0, JD)
}
func MercuryB(JD float64) float64 {
return planet.WherePlanet(1, 1, JD)
}
func MercuryR(JD float64) float64 {
return planet.WherePlanet(1, 2, JD)
}
func AMercuryX(JD float64) float64 {
l := MercuryL(JD)
b := MercuryB(JD)
r := MercuryR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
return x
}
func AMercuryY(JD float64) float64 {
l := MercuryL(JD)
b := MercuryB(JD)
r := MercuryR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
return y
}
func AMercuryZ(JD float64) float64 {
//l := MercuryL(JD)
b := MercuryB(JD)
r := MercuryR(JD)
// el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
z := r*Sin(b) - er*Sin(eb)
return z
}
func AMercuryXYZ(JD float64) (float64, float64, float64) {
l := MercuryL(JD)
b := MercuryB(JD)
r := MercuryR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
z := r*Sin(b) - er*Sin(eb)
return x, y, z
}
func MercurySeeRa(JD float64) float64 {
lo, bo := MercurySeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
return Limit360(ra)
}
func MercurySeeDec(JD float64) float64 {
lo, bo := MercurySeeLoBo(JD)
sita := Sita(JD)
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return dec
}
func MercurySeeRaDec(JD float64) (float64, float64) {
lo, bo := MercurySeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return Limit360(ra), dec
}
func EarthMercuryAway(JD float64) float64 {
x, y, z := AMercuryXYZ(JD)
to := math.Sqrt(x*x + y*y + z*z)
return to
}
func MercurySeeLo(JD float64) float64 {
x, y, z := AMercuryXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AMercuryXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo
}
func MercurySeeBo(JD float64) float64 {
x, y, z := AMercuryXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AMercuryXYZ(JD - to)
//lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
//lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
//lo+=GXCLo(lo,bo,JD);
//bo+=GXCBo(lo,bo,JD)/3600;
//lo+=HJZD(JD);
return bo
}
func MercurySeeLoBo(JD float64) (float64, float64) {
x, y, z := AMercuryXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AMercuryXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo, bo
}
func MercuryMag(JD float64) float64 {
AwaySun := MercuryR(JD)
AwayEarth := EarthMercuryAway(JD)
Away := planet.WherePlanet(-1, 2, JD)
i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth)
i = ArcCos(i)
Mag := -0.42 + 5*math.Log10(AwaySun*AwayEarth) + 0.0380*i - 0.000273*i*i + 0.000002*i*i*i
return FloatRound(Mag, 2)
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,18 @@
package basic
import (
"fmt"
"testing"
"time"
)
func Test_MoonS(t *testing.T) {
//fmt.Println(Sita(2451547))
//fmt.Println(MoonHeight(2451547, 115, 32, 8))
a := time.Now().UnixNano()
b := GetMoonRiseTime(GetNowJDE(), 115, 32, 8, 0)
fmt.Println(time.Now().UnixNano() - a)
fmt.Println(JDE2Date((b)))
fmt.Println(time.Now().UnixNano() - a)
//fmt.Printf("%.14f", GetMoonRiseTime(2451547, 115, 32, 8, 0))
}

@ -0,0 +1,147 @@
package basic
import (
"math"
"b612.me/astro/planet"
. "b612.me/astro/tools"
)
func NeptuneL(JD float64) float64 {
return planet.WherePlanet(7, 0, JD)
}
func NeptuneB(JD float64) float64 {
return planet.WherePlanet(7, 1, JD)
}
func NeptuneR(JD float64) float64 {
return planet.WherePlanet(7, 2, JD)
}
func ANeptuneX(JD float64) float64 {
l := NeptuneL(JD)
b := NeptuneB(JD)
r := NeptuneR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
return x
}
func ANeptuneY(JD float64) float64 {
l := NeptuneL(JD)
b := NeptuneB(JD)
r := NeptuneR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
return y
}
func ANeptuneZ(JD float64) float64 {
//l := NeptuneL(JD)
b := NeptuneB(JD)
r := NeptuneR(JD)
// el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
z := r*Sin(b) - er*Sin(eb)
return z
}
func ANeptuneXYZ(JD float64) (float64, float64, float64) {
l := NeptuneL(JD)
b := NeptuneB(JD)
r := NeptuneR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
z := r*Sin(b) - er*Sin(eb)
return x, y, z
}
func NeptuneSeeRa(JD float64) float64 {
lo, bo := NeptuneSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
return Limit360(ra)
}
func NeptuneSeeDec(JD float64) float64 {
lo, bo := NeptuneSeeLoBo(JD)
sita := Sita(JD)
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return dec
}
func NeptuneSeeRaDec(JD float64) (float64, float64) {
lo, bo := NeptuneSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return Limit360(ra), dec
}
func EarthNeptuneAway(JD float64) float64 {
x, y, z := ANeptuneXYZ(JD)
to := math.Sqrt(x*x + y*y + z*z)
return to
}
func NeptuneSeeLo(JD float64) float64 {
x, y, z := ANeptuneXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ANeptuneXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo
}
func NeptuneSeeBo(JD float64) float64 {
x, y, z := ANeptuneXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ANeptuneXYZ(JD - to)
//lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
//lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
//lo+=GXCLo(lo,bo,JD);
//bo+=GXCBo(lo,bo,JD)/3600;
//lo+=HJZD(JD);
return bo
}
func NeptuneSeeLoBo(JD float64) (float64, float64) {
x, y, z := ANeptuneXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ANeptuneXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo, bo
}
func NeptuneMag(JD float64) float64 {
AwaySun := NeptuneR(JD)
AwayEarth := EarthNeptuneAway(JD)
Away := planet.WherePlanet(-1, 2, JD)
i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth)
i = ArcCos(i)
Mag := -6.87 + 5*math.Log10(AwaySun*AwayEarth)
return FloatRound(Mag, 2)
}

@ -0,0 +1,15 @@
package basic
import (
"fmt"
"testing"
)
func Test_Ra(t *testing.T) {
ra, dec := UranusSeeRaDec(2456789.12345)
fmt.Printf("%.14f\n%.14f\n", ra, dec)
fmt.Println(UranusMag(2456789.12345))
ra, dec = NeptuneSeeRaDec(2456789.12345)
fmt.Printf("%.14f\n%.14f\n", ra, dec)
fmt.Println(NeptuneMag(2456789.12345))
}

@ -0,0 +1,156 @@
package basic
import (
"math"
"b612.me/astro/planet"
. "b612.me/astro/tools"
)
func SaturnL(JD float64) float64 {
return planet.WherePlanet(5, 0, JD)
}
func SaturnB(JD float64) float64 {
return planet.WherePlanet(5, 1, JD)
}
func SaturnR(JD float64) float64 {
return planet.WherePlanet(5, 2, JD)
}
func ASaturnX(JD float64) float64 {
l := SaturnL(JD)
b := SaturnB(JD)
r := SaturnR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
return x
}
func ASaturnY(JD float64) float64 {
l := SaturnL(JD)
b := SaturnB(JD)
r := SaturnR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
return y
}
func ASaturnZ(JD float64) float64 {
//l := SaturnL(JD)
b := SaturnB(JD)
r := SaturnR(JD)
// el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
z := r*Sin(b) - er*Sin(eb)
return z
}
func ASaturnXYZ(JD float64) (float64, float64, float64) {
l := SaturnL(JD)
b := SaturnB(JD)
r := SaturnR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
z := r*Sin(b) - er*Sin(eb)
return x, y, z
}
func SaturnSeeRa(JD float64) float64 {
lo, bo := SaturnSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
return Limit360(ra)
}
func SaturnSeeDec(JD float64) float64 {
lo, bo := SaturnSeeLoBo(JD)
sita := Sita(JD)
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return dec
}
func SaturnSeeRaDec(JD float64) (float64, float64) {
lo, bo := SaturnSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return Limit360(ra), dec
}
func EarthSaturnAway(JD float64) float64 {
x, y, z := ASaturnXYZ(JD)
to := math.Sqrt(x*x + y*y + z*z)
return to
}
func SaturnSeeLo(JD float64) float64 {
x, y, z := ASaturnXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ASaturnXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo
}
func SaturnSeeBo(JD float64) float64 {
x, y, z := ASaturnXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ASaturnXYZ(JD - to)
//lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
//lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
//lo+=GXCLo(lo,bo,JD);
//bo+=GXCBo(lo,bo,JD)/3600;
//lo+=HJZD(JD);
return bo
}
func SaturnSeeLoBo(JD float64) (float64, float64) {
x, y, z := ASaturnXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = ASaturnXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo, bo
}
func SaturnMag(JD float64) float64 {
AwaySun := SaturnR(JD)
AwayEarth := EarthSaturnAway(JD)
Away := planet.WherePlanet(-1, 2, JD)
i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth)
i = ArcCos(i)
Mag := -8.68 + 5*math.Log10(AwaySun*AwayEarth) + 0.044*i - 2.6*Sin(math.Abs(SaturnRingB(JD))) + 1.25*Sin(math.Abs(SaturnRingB(JD)))*Sin(math.Abs(SaturnRingB(JD)))
return FloatRound(Mag, 2)
}
func SaturnRingB(JD float64) float64 {
T := (JD - 2451545) / 36525
i := 28.075216 - 0.012998*T + 0.000004*T*T
omi := 169.508470 + 1.394681*T + 0.000412*T*T
lo, bo := SaturnSeeLoBo(JD)
B := Sin(i)*Cos(bo)*Sin(lo-omi) - Cos(i)*Cos(bo)
return ArcSin(B)
}

@ -0,0 +1,330 @@
package basic
import (
. "b612.me/astro/tools"
)
func TrueStarTime(JD float64) float64 {
T := (JD - 2451545) / 36525
return (Limit360(280.46061837+360.98564736629*(JD-2451545.0)+0.000387933*T*T-T*T*T/38710000) / 15)
}
func SeeStarTime(JD float64) float64 {
tmp := TrueStarTime(JD)
return tmp + HJZD(JD)*Cos(Sita(JD))/15
}
func StarAngle(RA, DEC, JD, Lon, Lat, TZ float64) float64 {
//JD=JD-8/24+TZ/24;
calcjd := JD - TZ/24
st := Limit360(SeeStarTime(calcjd)*15 + Lon)
H := Limit360(st - RA)
tmp2 := Sin(H) / (Cos(H)*Sin(Lat) - Tan(DEC)*Cos(Lat))
Angle := ArcTan(tmp2)
if Angle < 0 {
if H/15 < 12 {
return Angle + 360
} else {
return Angle + 180
}
} else {
if H/15 < 12 {
return Angle + 180
} else {
return Angle
}
}
}
func StarHeight(RA, DEC, JD, Lon, Lat, TZ float64) float64 {
//JD=JD-8/24+TZ/24;
calcjd := JD - TZ/24
st := Limit360(SeeStarTime(calcjd)*15 + Lon)
H := Limit360(st - RA)
tmp2 := Sin(Lat)*Sin(DEC) + Cos(DEC)*Cos(Lat)*Cos(H)
return ArcSin(tmp2)
}
type cst struct {
RA float64 //赤经
DEC float64 //赤纬
}
var CstLists map[string][]cst
func init() {
CstLists = make(map[string][]cst)
CstLists["AND"] = []cst{cst{344.46530375, 35.1682358}, cst{344.34285125, 53.1680298}, cst{351.45289375, 53.1870041}, cst{351.4656825, 50.6870193}, cst{355.27055708333, 50.6929131}, cst{355.27607875, 48.6929169}, cst{4.1463675, 48.6949348}, cst{4.14327875, 46.6949348}, cst{14.776077083333, 46.6757545}, cst{14.7888675, 48.6757393}, cst{18.588407916667, 48.6632690}, cst{18.60590375, 50.6632347}, cst{22.40793625, 50.6478767}, cst{26.96852375, 50.6257439}, cst{26.931439583333, 47.6258430}, cst{32.62149125, 47.5927505}, cst{32.67380125, 51.0925827}, cst{39.88547875, 51.0423737}, cst{39.67934125, 37.2931557}, cst{31.87109125, 37.3470840}, cst{31.854250416667, 35.5971375}, cst{22.910835, 35.6453362}, cst{22.89742625, 33.6453705}, cst{12.44306375, 33.6818962}, cst{12.41349125, 24.4319324}, cst{14.424064583333, 24.4266243}, cst{14.414815416667, 21.6766376}, cst{3.73992125, 21.6951923}, cst{3.7406445833333, 22.6951923}, cst{2.61001625, 22.6957588}, cst{2.6128425, 28.6957588}, cst{1.60621625, 28.6960354}, cst{1.6069770833333, 32.0293655}, cst{357.82874125, 32.0285034}, cst{357.8280825, 32.7785072}, cst{354.04915791667, 32.7746468}, cst{354.04417958333, 35.1913109}}
CstLists["ANT"] = []cst{cst{141.904335, -24.5425186}, cst{141.77159875, -37.2920151}, cst{141.73406125, -40.2918739}, cst{166.45650458333, -40.4246216}, cst{166.47936291667, -35.6746559}, cst{163.95851541667, -35.6664963}, cst{163.977885, -31.8332005}, cst{160.20137875, -31.8185863}, cst{160.21289375, -29.8186131}, cst{155.18132708333, -29.7947845}, cst{155.1993375, -27.1281624}, cst{147.65928291667, -27.0835037}, cst{147.67968125, -24.5835705}}
CstLists["APS"] = []cst{cst{209.11110875, -83.1200714}, cst{276.86599791667, -82.4582748}, cst{274.19506041667, -74.9745178}, cst{273.28007708333, -67.4800797}, cst{265.77572875, -67.5711060}, cst{258.2424825, -67.6610870}, cst{258.47067875, -70.1597443}, cst{224.16644125, -70.5115433}, cst{207.46087041667, -70.6244431}, cst{207.78143375, -75.6235962}}
CstLists["AQR"] = []cst{cst{309.59884625, 0.4361772}, cst{309.5798775, 2.4360874}, cst{314.08109708333, 2.4773185}, cst{321.58347125, 2.5393796}, cst{323.58427041667, 2.5544112}, cst{323.57874875, 3.3043909}, cst{326.58021875, 3.3256676}, cst{326.58708625, 2.3256910}, cst{331.588755, 2.3576119}, cst{331.58726708333, 2.6076074}, cst{342.84221708333, 2.6622071}, cst{342.8497125, 0.6622211}, cst{342.86470375, -3.3377509}, cst{359.10221125, -3.3042023}, cst{359.10329875, -6.3042021}, cst{359.11056458333, -24.8042011}, cst{346.68096625, -24.8250446}, cst{329.77028875, -24.9040413}, cst{329.6561625, -8.4043999}, cst{321.668415, -8.4602947}, cst{321.71645125, -14.4601107}, cst{309.74390125, -14.5631361}, cst{309.68464791667, -8.5634165}}
CstLists["AQL"] = []cst{cst{280.35020875, 0.1154895}, cst{280.3262325, 2.1153460}, cst{284.57642541667, 2.1659052}, cst{284.525985, 6.4156075}, cst{281.45856875, 6.3791943}, cst{281.388045, 12.1287737}, cst{284.45626208333, 12.1651964}, cst{284.37363625, 18.6647091}, cst{286.37549375, 18.6882229}, cst{286.4054775, 16.3550682}, cst{298.92116541667, 16.4957294}, cst{298.926, 16.0790844}, cst{303.5589975, 16.1275158}, cst{303.636675, 8.8779116}, cst{306.01395625, 8.9018240}, cst{306.07910125, 2.4021468}, cst{309.5798775, 2.4360874}, cst{309.59884625, 0.4361772}, cst{309.68464791667, -8.5634165}, cst{301.69369625, -8.6430750}, cst{301.72636958333, -11.6762342}, cst{284.74405375, -11.8664360}, cst{284.64729291667, -3.8336766}, cst{280.3981875, -3.8842230}}
CstLists["ARA"] = []cst{cst{249.03468125, -60.2644577}, cst{248.57062375, -45.7670517}, cst{269.80928375, -45.5163460}, cst{272.3090175, -45.4859734}, cst{272.67225291667, -56.9837723}, cst{265.16818958333, -57.0747757}, cst{265.77572875, -67.5711060}, cst{258.2424825, -67.6610870}, cst{255.72498291667, -67.6905823}, cst{255.5423925, -65.1916428}, cst{254.28351458333, -65.2062531}, cst{254.1951375, -63.7900925}, cst{251.67632125, -63.8189964}, cst{251.53784708333, -61.2364578}, cst{249.08163, -61.2641945}}
CstLists["ARI"] = []cst{cst{31.6652475, 10.5143948}, cst{26.65573375, 10.5432396}, cst{26.744674583333, 25.6263351}, cst{30.51371125, 25.6050701}, cst{30.53061625, 27.8550186}, cst{38.07014875, 27.8047638}, cst{38.10319375, 31.2213154}, cst{42.62838, 31.1865025}, cst{52.426667916667, 31.1003609}, cst{52.2906225, 19.4343338}, cst{51.037234583333, 19.4461136}, cst{50.94641125, 10.3632069}}
CstLists["AUR"] = []cst{cst{69.4869375, 30.9218750}, cst{69.57384125, 36.2547150}, cst{72.45734375, 36.2218513}, cst{72.840285, 52.7196465}, cst{77.484762083333, 52.6655540}, cst{77.606764583333, 56.1648331}, cst{94.13108875, 55.9658089}, cst{94.05736625, 53.9662552}, cst{100.04603125, 53.8938293}, cst{99.919459583333, 49.8945885}, cst{104.40635875, 49.8410034}, cst{104.26530291667, 44.3418388}, cst{112.73412458333, 44.2435493}, cst{112.56071875, 35.2445297}, cst{100.09027625, 35.3905640}, cst{99.965657916667, 27.8913116}, cst{90.22107125, 28.0092907}, cst{90.228902916667, 28.5092430}, cst{73.212475416667, 28.7124405}, cst{73.235342916667, 30.2123089}, cst{69.47678875, 30.2552605}}
CstLists["BOO"] = []cst{cst{227.78148625, 7.5253930}, cst{204.06384875, 7.3605771}, cst{204.02893041667, 14.3604937}, cst{203.95387208333, 27.8603134}, cst{210.7888275, 27.8976517}, cst{210.77085875, 30.1475964}, cst{211.88893375, 30.1545391}, cst{211.69873208333, 47.9039383}, cst{211.58439125, 54.9035759}, cst{217.25124875, 54.9422379}, cst{229.59105458333, 55.0448647}, cst{229.65737375, 52.5451736}, cst{237.08447375, 52.6174774}, cst{237.12458541667, 51.1176796}, cst{237.36542708333, 39.6189079}, cst{232.64365208333, 39.5721130}, cst{232.74697791667, 32.5726128}, cst{229.01591875, 32.5376778}, cst{229.09951625, 25.5380573}, cst{227.60549125, 25.5246105}}
CstLists["CAE"] = []cst{cst{65.0764125, -39.7007294}, cst{64.88238625, -48.6996651}, cst{68.362247916667, -48.7384491}, cst{68.42409625, -46.2387962}, cst{73.402082916667, -46.2959023}, cst{73.482370416667, -42.7963676}, cst{75.97444375, -42.8255501}, cst{76.2549375, -27.0772038}, cst{73.75929625, -27.0479794}, cst{71.76333125, -27.0248775}, cst{71.72241875, -29.7746429}, cst{69.97665125, -29.7546597}, cst{69.862375416667, -36.7540054}, cst{65.12985, -36.7010231}}
CstLists["CAM"] = []cst{cst{94.13108875, 55.9658089}, cst{77.606764583333, 56.1648331}, cst{77.484762083333, 52.6655540}, cst{72.840285, 52.7196465}, cst{52.31308625, 52.9366074}, cst{52.381900416667, 55.4362831}, cst{49.8540225, 55.4596519}, cst{49.91349625, 57.4593849}, cst{48.90093, 57.4684982}, cst{49.3954575, 68.4662857}, cst{54.237034583333, 68.4214401}, cst{55.30874875, 77.4163132}, cst{56.726209583333, 77.4025955}, cst{57.53049, 80.3986664}, cst{80.488894583333, 80.1478500}, cst{84.536117916667, 85.1239471}, cst{127.953615, 84.6103745}, cst{130.40275041667, 86.0975418}, cst{213.0229575, 85.9308090}, cst{216.78285625, 79.4449844}, cst{203.80918958333, 79.3629303}, cst{204.15701875, 76.3638153}, cst{195.8206125, 76.3289108}, cst{174.43479625, 76.3084106}, cst{174.53158375, 79.3083420}, cst{162.81859791667, 79.3401794}, cst{163.10541625, 81.3396072}, cst{142.191195, 81.4677658}, cst{140.61547375, 72.9741364}, cst{123.08622875, 73.1383743}, cst{122.12910125, 59.6433983}, cst{107.7531975, 59.8037262}, cst{107.8515525, 61.8031464}, cst{94.40745625, 61.9641266}}
CstLists["CNC"] = []cst{cst{140.40425875, 6.4700689}, cst{122.92139125, 6.6302376}, cst{120.54834291667, 6.6549850}, cst{120.5806725, 9.6548138}, cst{118.83248875, 9.6734257}, cst{118.87160541667, 13.1732168}, cst{118.94754458333, 19.6728077}, cst{120.07012375, 19.6608200}, cst{120.17164625, 27.6602821}, cst{121.91596958333, 27.6419144}, cst{121.99323125, 33.1415138}, cst{140.645985, 32.9691162}}
CstLists["CVN"] = []cst{cst{181.59450625, 33.3039627}, cst{181.59141625, 44.3039627}, cst{182.82643375, 44.3043365}, cst{182.8185225, 52.3043365}, cst{203.74239875, 52.3598061}, cst{203.79511375, 47.8599281}, cst{211.69873208333, 47.9039383}, cst{211.88893375, 30.1545391}, cst{210.77085875, 30.1475964}, cst{210.7888275, 27.8976517}, cst{203.95387208333, 27.8603134}, cst{200.22657458333, 27.8437748}, cst{200.20774791667, 31.3437366}, cst{186.55769375, 31.3074341}, cst{186.55426041667, 33.3074303}}
CstLists["CMA"] = []cst{cst{93.215625, -11.0301533}, cst{111.97339958333, -11.2521448}, cst{111.67719875, -33.2504692}, cst{99.903859583333, -33.1128159}, cst{92.899067916667, -33.0282326}, cst{92.99256625, -27.2787991}}
CstLists["CMI"] = []cst{cst{122.84900708333, -0.3693900}, cst{109.59966625, -0.2243290}, cst{109.61691875, 1.2755718}, cst{106.86739625, 1.3074419}, cst{106.91427458333, 5.3071680}, cst{106.66432208333, 5.3100886}, cst{106.71787958333, 9.8097754}, cst{106.7482275, 12.3095980}, cst{114.24100375, 12.2238722}, cst{114.2527275, 13.2238064}, cst{118.87160541667, 13.1732168}, cst{118.83248875, 9.6734257}, cst{120.5806725, 9.6548138}, cst{120.54834291667, 6.6549850}, cst{122.92139125, 6.6302376}}
CstLists["CAP"] = []cst{cst{309.68464791667, -8.5634165}, cst{301.69369625, -8.6430750}, cst{301.72636958333, -11.6762342}, cst{301.91596958333, -27.6419144}, cst{306.89795541667, -27.5913391}, cst{321.83163625, -27.4596672}, cst{321.80777541667, -24.9597607}, cst{329.77028875, -24.9040413}, cst{329.6561625, -8.4043999}, cst{321.668415, -8.4602947}, cst{321.71645125, -14.4601107}, cst{309.74390125, -14.5631361}}
CstLists["CAR"] = []cst{cst{170.15592125, -57.1843452}, cst{166.33725625, -57.1744423}, cst{133.32365541667, -56.9739723}, cst{133.38017375, -54.9742203}, cst{127.56711875, -54.9204712}, cst{127.60929125, -53.4206772}, cst{123.32011625, -53.3782196}, cst{123.38112875, -51.1285286}, cst{120.8616975, -51.1025848}, cst{90.748902083333, -50.7545471}, cst{90.693705, -52.5042114}, cst{93.19435375, -52.5345764}, cst{93.1074, -55.0340500}, cst{98.114275416667, -55.0945587}, cst{97.995077916667, -58.0938416}, cst{103.01111708333, -58.1537018}, cst{102.70331375, -64.1518784}, cst{136.09472708333, -64.4990387}, cst{135.24368708333, -75.4954681}, cst{169.85697291667, -75.6840134}, cst{170.08481125, -64.6842651}}
CstLists["CAS"] = []cst{cst{344.34285125, 53.1680298}, cst{344.30402708333, 56.9179611}, cst{344.26912375, 59.7512321}, cst{348.85966375, 59.7646751}, cst{348.81649041667, 63.6812897}, cst{355.21757125, 63.6928787}, cst{355.19785958333, 66.6928711}, cst{6.76376375, 66.6924438}, cst{6.92291375, 77.6923447}, cst{55.30874875, 77.4163132}, cst{54.237034583333, 68.4214401}, cst{49.3954575, 68.4662857}, cst{48.90093, 57.4684982}, cst{38.762337083333, 57.5513000}, cst{38.802355416667, 59.0511551}, cst{30.795625416667, 59.1046104}, cst{30.77362375, 58.1046753}, cst{27.5952225, 58.1227188}, cst{27.53364125, 54.6228828}, cst{22.45601375, 54.6477699}, cst{22.40793625, 50.6478767}, cst{18.60590375, 50.6632347}, cst{18.588407916667, 48.6632690}, cst{14.7888675, 48.6757393}, cst{14.776077083333, 46.6757545}, cst{4.14327875, 46.6949348}, cst{4.1463675, 48.6949348}, cst{355.27607875, 48.6929169}, cst{355.27055708333, 50.6929131}, cst{351.4656825, 50.6870193}, cst{351.45289375, 53.1870041}}
CstLists["CEN"] = []cst{cst{166.47936291667, -35.6746559}, cst{166.45650458333, -40.4246216}, cst{166.33725625, -57.1744423}, cst{170.15592125, -57.1843452}, cst{170.08481125, -64.6842651}, cst{179.05736375, -64.6957855}, cst{179.07076791667, -55.6957932}, cst{194.33451125, -55.6771049}, cst{194.43838041667, -64.6769638}, cst{204.68028625, -64.6379395}, cst{220.51497458333, -64.5390244}, cst{220.23446541667, -55.5400887}, cst{214.65681625, -55.5799522}, cst{214.45026458333, -42.5806465}, cst{225.79627958333, -42.4941750}, cst{225.63076958333, -29.9948788}, cst{190.41739958333, -30.1863899}, cst{190.42719875, -33.6863785}, cst{185.38743458333, -33.6938934}, cst{185.39029625, -35.6938896}}
CstLists["CEP"] = []cst{cst{300.5732625, 59.8510780}, cst{300.48520041667, 61.8506203}, cst{306.8118675, 61.9143791}, cst{306.51738125, 67.4129562}, cst{310.33401458333, 67.4490280}, cst{309.57304041667, 75.4455261}, cst{301.87339791667, 75.3708725}, cst{300.6738, 80.3647766}, cst{313.70587375, 80.4867859}, cst{308.72097, 86.4656219}, cst{308.33135541667, 86.6306305}, cst{343.51066625, 86.8368912}, cst{339.26098791667, 88.6638870}, cst{135.83247125, 87.5689163}, cst{130.40275041667, 86.0975418}, cst{127.953615, 84.6103745}, cst{84.536117916667, 85.1239471}, cst{80.488894583333, 80.1478500}, cst{57.53049, 80.3986664}, cst{56.726209583333, 77.4025955}, cst{55.30874875, 77.4163132}, cst{6.92291375, 77.6923447}, cst{6.76376375, 66.6924438}, cst{355.19785958333, 66.6928711}, cst{355.21757125, 63.6928787}, cst{348.81649041667, 63.6812897}, cst{348.85966375, 59.7646751}, cst{344.26912375, 59.7512321}, cst{344.30402708333, 56.9179611}, cst{335.91093, 56.8825760}, cst{335.93130125, 55.6326256}, cst{333.13762625, 55.6178436}, cst{333.17467625, 53.3679428}, cst{330.63921, 53.3532715}, cst{330.60218875, 55.4364891}, cst{309.83136125, 55.2753258}, cst{309.62379458333, 61.3576965}, cst{308.66080375, 61.3486443}, cst{308.71659291667, 59.9322395}}
CstLists["CET"] = []cst{cst{6.60132875, 0.6925398}, cst{6.6037875, 2.6925383}, cst{31.61526625, 2.5978806}, cst{31.6652475, 10.5143948}, cst{50.94641125, 10.3632069}, cst{50.85298375, 0.4469725}, cst{50.836682916667, -1.3029516}, cst{41.33922125, -1.2210265}, cst{41.14875875, -23.8536034}, cst{26.46599875, -23.7562580}, cst{26.45888875, -24.8729095}, cst{359.11056458333, -24.8042011}, cst{359.10329875, -6.3042021}, cst{6.5927025, -6.3074551}}
CstLists["CHA"] = []cst{cst{111.65211458333, -82.7758865}, cst{209.11110875, -83.1200714}, cst{207.78143375, -75.6235962}, cst{169.85697291667, -75.6840134}, cst{135.24368708333, -75.4954681}, cst{114.21470375, -75.2899170}}
CstLists["CIR"] = []cst{cst{204.68028625, -64.6379395}, cst{204.70747958333, -65.6378784}, cst{207.26802291667, -65.6249542}, cst{207.46087041667, -70.6244431}, cst{224.16644125, -70.5115433}, cst{224.00363375, -68.0122070}, cst{226.55712625, -67.9909286}, cst{226.35353541667, -64.0751266}, cst{230.16657875, -64.0415649}, cst{230.05456958333, -61.4587479}, cst{232.58976458333, -61.4353065}, cst{232.5498675, -60.4354935}, cst{232.38191125, -55.4362831}, cst{228.08351125, -55.4754944}, cst{220.23446541667, -55.5400887}, cst{220.51497458333, -64.5390244}}
CstLists["COL"] = []cst{cst{75.97444375, -42.8255501}, cst{76.2549375, -27.0772038}, cst{92.99256625, -27.2787991}, cst{92.899067916667, -33.0282326}, cst{99.903859583333, -33.1128159}, cst{99.70891625, -43.1116486}, cst{90.951777083333, -43.0057793}}
CstLists["COM"] = []cst{cst{179.60453541667, 13.3040485}, cst{179.60894125, 28.3040466}, cst{181.59566375, 28.3039627}, cst{181.59450625, 33.3039627}, cst{186.55426041667, 33.3074303}, cst{186.55769375, 31.3074341}, cst{200.20774791667, 31.3437366}, cst{200.22657458333, 27.8437748}, cst{203.95387208333, 27.8603134}, cst{204.02893041667, 14.3604937}, cst{194.05906625, 14.3225088}, cst{194.0620275, 13.3225126}}
CstLists["CRA"] = []cst{cst{269.62546375, -37.0174599}, cst{289.59631958333, -36.7785645}, cst{289.76964, -45.2775650}, cst{272.3090175, -45.4859734}, cst{269.80928375, -45.5163460}}
CstLists["CRB"] = []cst{cst{229.09951625, 25.5380573}, cst{229.01591875, 32.5376778}, cst{232.74697791667, 32.5726128}, cst{232.64365208333, 39.5721130}, cst{237.36542708333, 39.6189079}, cst{246.07194875, 39.7117195}, cst{246.2798025, 26.7128716}, cst{243.78670625, 26.6855240}, cst{243.8001825, 25.6855946}, cst{241.80573458333, 25.6641407}}
CstLists["CRV"] = []cst{cst{194.1330525, -11.6773882}, cst{179.09676, -11.6957970}, cst{179.09131041667, -25.1957951}, cst{190.404525, -25.1864014}, cst{190.3985025, -22.6864090}, cst{194.16687, -22.6773415}}
CstLists["CRT"] = []cst{cst{162.82713875, -6.6621790}, cst{162.80791375, -11.6621428}, cst{162.77554041667, -19.6620827}, cst{164.03058625, -19.6666222}, cst{164.00808291667, -25.1665821}, cst{179.09131041667, -25.1957951}, cst{179.09676, -11.6957970}, cst{179.09860625, -6.6957974}, cst{174.34229875, -6.6916924}}
CstLists["CRU"] = []cst{cst{179.07076791667, -55.6957932}, cst{179.05736375, -64.6957855}, cst{194.43838041667, -64.6769638}, cst{194.33451125, -55.6771049}}
CstLists["CYG"] = []cst{cst{290.13264625, 27.7324085}, cst{290.0952525, 30.2321968}, cst{291.5987775, 30.2493153}, cst{291.49260458333, 36.7487144}, cst{292.11965541667, 36.7558022}, cst{291.9835275, 43.7550354}, cst{288.47030708333, 43.7149391}, cst{288.37552041667, 47.7143936}, cst{287.1206475, 47.6998672}, cst{286.87645958333, 55.6984482}, cst{291.90459291667, 55.7560043}, cst{291.80955, 58.2554703}, cst{297.10055375, 58.3138733}, cst{297.03924125, 59.8135414}, cst{300.5732625, 59.8510780}, cst{308.71659291667, 59.9322395}, cst{308.66080375, 61.3486443}, cst{309.62379458333, 61.3576965}, cst{309.83136125, 55.2753258}, cst{330.60218875, 55.4364891}, cst{330.63921, 53.3532715}, cst{330.76266291667, 44.6036453}, cst{329.87860625, 44.5982513}, cst{329.88163958333, 44.3482628}, cst{329.37664041667, 44.3451195}, cst{329.4610125, 36.5953827}, cst{327.319965, 36.5815468}, cst{327.39518125, 28.5817947}, cst{322.62016375, 28.5480537}, cst{315.08391458333, 28.4871883}, cst{315.07258375, 29.4871387}, cst{296.25094375, 29.3010578}, cst{296.27220125, 27.8011742}}
CstLists["DEL"] = []cst{cst{309.5798775, 2.4360874}, cst{306.07910125, 2.4021468}, cst{306.01395625, 8.9018240}, cst{303.636675, 8.8779116}, cst{303.5589975, 16.1275158}, cst{305.18694875, 16.1439629}, cst{305.13404875, 20.8936996}, cst{309.89693708333, 20.9399471}, cst{309.907665, 19.9399967}, cst{317.17878291667, 20.0046406}, cst{317.24836375, 12.3382607}, cst{314.61859625, 12.3157644}, cst{314.67109625, 6.4826641}, cst{314.045505, 6.4771614}, cst{314.08109708333, 2.4773185}}
CstLists["DOR"] = []cst{cst{58.318787916667, -52.7968445}, cst{60.79789625, -52.8228111}, cst{60.69291875, -56.1555862}, cst{65.6504625, -56.2093849}, cst{65.55459, -58.7088547}, cst{69.274534583333, -58.7506638}, cst{68.79401875, -67.2479248}, cst{68.58152375, -69.7467194}, cst{98.454422916667, -70.1041336}, cst{98.93724875, -64.1070251}, cst{90.173642916667, -64.0010529}, cst{90.34506125, -61.0020981}, cst{82.85761375, -60.9112892}, cst{83.01880375, -57.4122620}, cst{75.547742916667, -57.3230400}, cst{75.6770175, -53.8238029}, cst{68.217745416667, -53.7376366}, cst{68.362247916667, -48.7384491}, cst{64.88238625, -48.6996651}, cst{62.149907916667, -48.6699715}, cst{62.098639583333, -50.6697006}, cst{58.37716625, -50.6304779}}
CstLists["DRA"] = []cst{cst{140.61547375, 72.9741364}, cst{142.191195, 81.4677658}, cst{163.10541625, 81.3396072}, cst{162.81859791667, 79.3401794}, cst{174.53158375, 79.3083420}, cst{174.43479625, 76.3084106}, cst{195.8206125, 76.3289108}, cst{196.09747375, 69.3293610}, cst{210.65081125, 69.3991165}, cst{210.82055541667, 65.3996506}, cst{235.32956541667, 65.6023483}, cst{235.05063, 69.6009445}, cst{247.8410625, 69.7383041}, cst{247.2207075, 74.7347870}, cst{261.53663708333, 74.9033127}, cst{260.21790458333, 79.8953476}, cst{267.65602041667, 79.9857483}, cst{261.72223041667, 85.9495697}, cst{308.72097, 86.4656219}, cst{313.70587375, 80.4867859}, cst{300.6738, 80.3647766}, cst{301.87339791667, 75.3708725}, cst{309.57304041667, 75.4455261}, cst{310.33401458333, 67.4490280}, cst{306.51738125, 67.4129562}, cst{306.8118675, 61.9143791}, cst{300.48520041667, 61.8506203}, cst{300.5732625, 59.8510780}, cst{297.03924125, 59.8135414}, cst{297.10055375, 58.3138733}, cst{291.80955, 58.2554703}, cst{291.90459291667, 55.7560043}, cst{286.87645958333, 55.6984482}, cst{287.1206475, 47.6998672}, cst{274.34237541667, 47.5476036}, cst{274.25768875, 50.5470886}, cst{255.7863525, 50.3244438}, cst{255.75682625, 51.3242683}, cst{237.12458541667, 51.1176796}, cst{237.08447375, 52.6174774}, cst{229.65737375, 52.5451736}, cst{229.59105458333, 55.0448647}, cst{217.25124875, 54.9422379}, cst{217.04525375, 62.4414825}, cst{203.57364125, 62.3593979}, cst{203.55053875, 63.3593445}, cst{181.58155958333, 63.3039627}, cst{181.57925541667, 65.8039627}, cst{171.84934625, 65.8126068}, cst{171.96136958333, 72.8125000}}
CstLists["EQU"] = []cst{cst{314.08109708333, 2.4773185}, cst{314.045505, 6.4771614}, cst{314.67109625, 6.4826641}, cst{314.61859625, 12.3157644}, cst{317.24836375, 12.3382607}, cst{318.25026458333, 12.3465548}, cst{318.244515, 13.0132008}, cst{321.50110208333, 13.0390635}, cst{321.58347125, 2.5393796}}
CstLists["ERI"] = []cst{cst{55.352905416667, 0.4037257}, cst{70.852360416667, 0.2375014}, cst{71.60231375, 0.2289162}, cst{71.55635875, -3.7708201}, cst{77.804395416667, -3.8437285}, cst{77.72003125, -10.8432293}, cst{75.22175125, -10.8138046}, cst{75.178714583333, -14.3135529}, cst{73.929797916667, -14.2989721}, cst{73.75929625, -27.0479794}, cst{71.76333125, -27.0248775}, cst{71.72241875, -29.7746429}, cst{69.97665125, -29.7546597}, cst{69.862375416667, -36.7540054}, cst{65.12985, -36.7010231}, cst{65.0764125, -39.7007294}, cst{59.105884583333, -39.6368256}, cst{59.031364583333, -43.6364403}, cst{52.3267725, -43.5694046}, cst{52.2890025, -45.5692215}, cst{46.09077125, -45.5124779}, cst{46.03451375, -48.5122337}, cst{41.08530875, -48.4710045}, cst{41.04769375, -50.4708595}, cst{37.34121, -50.4425697}, cst{37.28334625, -53.4423561}, cst{33.58414375, -53.4164696}, cst{33.489424583333, -57.9161568}, cst{21.20622875, -57.8484154}, cst{21.2732625, -52.8485603}, cst{24.967354583333, -52.8658562}, cst{24.9938475, -50.8659210}, cst{28.693257083333, -50.8859215}, cst{28.738322916667, -47.5527229}, cst{36.1529475, -47.6004944}, cst{36.26401375, -39.4342155}, cst{46.187260416667, -39.5128975}, cst{46.193322083333, -39.0962563}, cst{53.64428375, -39.1650963}, cst{53.699605416667, -35.5820351}, cst{57.430512083333, -35.6192436}, cst{57.58890125, -24.0033779}, cst{41.14875875, -23.8536034}, cst{41.33922125, -1.2210265}, cst{50.836682916667, -1.3029516}, cst{55.335582083333, -1.3461887}}
CstLists["FOR"] = []cst{cst{26.46599875, -23.7562580}, cst{41.14875875, -23.8536034}, cst{57.58890125, -24.0033779}, cst{57.430512083333, -35.6192436}, cst{53.699605416667, -35.5820351}, cst{53.64428375, -39.1650963}, cst{46.193322083333, -39.0962563}, cst{46.187260416667, -39.5128975}, cst{36.26401375, -39.4342155}, cst{26.350727916667, -39.3726234}, cst{26.45888875, -24.8729095}}
CstLists["GEM"] = []cst{cst{96.37276375, 11.9332972}, cst{96.4439175, 17.4328651}, cst{95.069575416667, 17.4495068}, cst{95.1241275, 21.4491768}, cst{90.125155416667, 21.5098724}, cst{90.1440375, 22.8430862}, cst{90.22107125, 28.0092907}, cst{99.965657916667, 27.8913116}, cst{100.09027625, 35.3905640}, cst{112.56071875, 35.2445297}, cst{118.28970875, 35.1810532}, cst{118.25808, 33.1812286}, cst{121.99323125, 33.1415138}, cst{121.91596958333, 27.6419144}, cst{120.17164625, 27.6602821}, cst{120.07012375, 19.6608200}, cst{118.94754458333, 19.6728077}, cst{118.87160541667, 13.1732168}, cst{114.2527275, 13.2238064}, cst{114.24100375, 12.2238722}, cst{106.7482275, 12.3095980}, cst{106.71787958333, 9.8097754}, cst{105.71845958333, 9.8214874}, cst{105.742815, 11.8213453}}
CstLists["GRU"] = []cst{cst{321.92805291667, -36.4592972}, cst{322.04232125, -44.9588585}, cst{322.11736625, -49.4585724}, cst{331.998825, -49.3911743}, cst{332.113695, -56.3908348}, cst{351.76852208333, -56.3126869}, cst{351.69270458333, -39.3127594}, cst{351.6833775, -36.3127670}, cst{346.72751375, -36.3249741}}
CstLists["HER"] = []cst{cst{245.558595, 3.7033811}, cst{242.80966791667, 3.6735139}, cst{242.67663, 15.6728001}, cst{240.18107375, 15.6463346}, cst{240.1110075, 21.6459675}, cst{241.85657541667, 21.6644115}, cst{241.80573458333, 25.6641407}, cst{243.8001825, 25.6855946}, cst{243.78670625, 26.6855240}, cst{246.2798025, 26.7128716}, cst{246.07194875, 39.7117195}, cst{237.36542708333, 39.6189079}, cst{237.12458541667, 51.1176796}, cst{255.75682625, 51.3242683}, cst{255.7863525, 50.3244438}, cst{274.25768875, 50.5470886}, cst{274.34237541667, 47.5476036}, cst{273.46687375, 47.5369873}, cst{273.82438625, 30.0391560}, cst{276.70077291667, 30.0739765}, cst{276.76288625, 26.0743504}, cst{284.2698675, 26.1640968}, cst{284.27716208333, 25.6641407}, cst{284.33913291667, 21.2478352}, cst{284.37363625, 18.6647091}, cst{284.45626208333, 12.1651964}, cst{281.388045, 12.1287737}, cst{275.20308458333, 12.0543308}, cst{275.17327375, 14.3874788}, cst{260.17687791667, 14.2060347}, cst{260.19584708333, 12.7061481}, cst{252.7014825, 12.6179380}, cst{252.80590958333, 3.7852108}}
CstLists["HOR"] = []cst{cst{65.0764125, -39.7007294}, cst{64.88238625, -48.6996651}, cst{62.149907916667, -48.6699715}, cst{62.098639583333, -50.6697006}, cst{58.37716625, -50.6304779}, cst{58.318787916667, -52.7968445}, cst{53.365002083333, -52.7470779}, cst{53.23681625, -57.0797844}, cst{48.79113125, -57.0377846}, cst{48.362689583333, -67.0358200}, cst{33.202360416667, -66.9151917}, cst{33.489424583333, -57.9161568}, cst{33.58414375, -53.4164696}, cst{37.28334625, -53.4423561}, cst{37.34121, -50.4425697}, cst{41.04769375, -50.4708595}, cst{41.08530875, -48.4710045}, cst{46.03451375, -48.5122337}, cst{46.09077125, -45.5124779}, cst{52.2890025, -45.5692215}, cst{52.3267725, -43.5694046}, cst{59.031364583333, -43.6364403}, cst{59.105884583333, -39.6368256}}
CstLists["HYA"] = []cst{cst{122.84900708333, -0.3693900}, cst{122.92139125, 6.6302376}, cst{140.40425875, 6.4700689}, cst{145.39841708333, 6.4327669}, cst{145.34890625, -0.5670585}, cst{145.27027208333, -11.5667810}, cst{162.80791375, -11.6621428}, cst{162.77554041667, -19.6620827}, cst{164.03058625, -19.6666222}, cst{164.00808291667, -25.1665821}, cst{179.09131041667, -25.1957951}, cst{190.404525, -25.1864014}, cst{190.3985025, -22.6864090}, cst{194.16687, -22.6773415}, cst{215.51309125, -22.5727749}, cst{215.53369041667, -25.0727024}, cst{225.57655375, -24.9951096}, cst{225.63076958333, -29.9948788}, cst{190.41739958333, -30.1863899}, cst{190.42719875, -33.6863785}, cst{185.38743458333, -33.6938934}, cst{185.39029625, -35.6938896}, cst{166.47936291667, -35.6746559}, cst{163.95851541667, -35.6664963}, cst{163.977885, -31.8332005}, cst{160.20137875, -31.8185863}, cst{160.21289375, -29.8186131}, cst{155.18132708333, -29.7947845}, cst{155.1993375, -27.1281624}, cst{147.65928291667, -27.0835037}, cst{147.67968125, -24.5835705}, cst{141.904335, -24.5425186}, cst{137.63677625, -24.5086308}, cst{137.68497, -19.5088310}, cst{130.1635125, -19.4423733}, cst{130.18434, -17.4424706}, cst{126.92709458333, -17.4112568}, cst{126.98977958333, -11.4115648}, cst{122.73417875, -11.3687992}}
CstLists["HYI"] = []cst{cst{68.79401875, -67.2479248}, cst{68.58152375, -69.7467194}, cst{67.957485, -74.7431641}, cst{52.075782083333, -74.5741272}, cst{50.091655416667, -82.0644531}, cst{1.53339125, -81.8039551}, cst{1.5662970833333, -74.3039627}, cst{12.3324375, -74.3185730}, cst{12.295414583333, -75.3185272}, cst{20.654050416667, -75.3472214}, cst{21.20622875, -57.8484154}, cst{33.489424583333, -57.9161568}, cst{33.202360416667, -66.9151917}, cst{48.362689583333, -67.0358200}}
CstLists["IND"] = []cst{cst{323.1847575, -74.4544678}, cst{351.99783291667, -74.3124619}, cst{351.86139125, -66.8125992}, cst{332.3985675, -66.8899918}, cst{332.113695, -56.3908348}, cst{331.998825, -49.3911743}, cst{322.11736625, -49.4585724}, cst{322.04232125, -44.9588585}, cst{307.169295, -45.0900002}, cst{307.45880125, -56.5885773}, cst{307.56480125, -59.5880547}, cst{322.34865125, -59.4576836}}
CstLists["LAC"] = []cst{cst{329.4610125, 36.5953827}, cst{329.37664041667, 44.3451195}, cst{329.88163958333, 44.3482628}, cst{329.87860625, 44.5982513}, cst{330.76266291667, 44.6036453}, cst{330.63921, 53.3532715}, cst{333.17467625, 53.3679428}, cst{333.13762625, 55.6178436}, cst{335.93130125, 55.6326256}, cst{335.91093, 56.8825760}, cst{344.30402708333, 56.9179611}, cst{344.34285125, 53.1680298}, cst{344.46530375, 35.1682358}, cst{343.70919291667, 35.1656151}, cst{343.70653208333, 35.6656113}, cst{331.35955791667, 35.6069336}, cst{331.35046041667, 36.6069069}}
CstLists["LEO"] = []cst{cst{162.8497125, -0.6622211}, cst{162.87601958333, 6.3377299}, cst{145.39841708333, 6.4327669}, cst{140.40425875, 6.4700689}, cst{140.645985, 32.9691162}, cst{150.08438541667, 32.9022789}, cst{150.04234375, 27.9024086}, cst{159.23840125, 27.8529167}, cst{159.2108775, 22.8529778}, cst{162.94253875, 22.8376045}, cst{162.95149375, 24.8375893}, cst{166.6809375, 24.8250446}, cst{166.69399791667, 28.3250256}, cst{179.60894125, 28.3040466}, cst{179.60453541667, 13.3040485}, cst{179.60373458333, 10.3040485}, cst{174.36568791667, 10.3082914}, cst{174.35052458333, -0.6916979}, cst{174.34229875, -6.6916924}, cst{162.82713875, -6.6621790}}
CstLists["LMI"] = []cst{cst{140.645985, 32.9691162}, cst{140.72163125, 39.2188187}, cst{145.6819725, 39.1817665}, cst{145.70923791667, 41.4316750}, cst{154.37822375, 41.3773613}, cst{154.3594125, 39.3774109}, cst{163.52316875, 39.3356133}, cst{163.48940875, 33.3356781}, cst{166.71422541667, 33.3249931}, cst{166.69399791667, 28.3250256}, cst{166.6809375, 24.8250446}, cst{162.95149375, 24.8375893}, cst{162.94253875, 22.8376045}, cst{159.2108775, 22.8529778}, cst{159.23840125, 27.8529167}, cst{150.04234375, 27.9024086}, cst{150.08438541667, 32.9022789}}
CstLists["LEP"] = []cst{cst{73.75929625, -27.0479794}, cst{76.2549375, -27.0772038}, cst{92.99256625, -27.2787991}, cst{93.215625, -11.0301533}, cst{88.965790416667, -10.9785318}, cst{77.72003125, -10.8432293}, cst{75.22175125, -10.8138046}, cst{75.178714583333, -14.3135529}, cst{73.929797916667, -14.2989721}}
CstLists["LIB"] = []cst{cst{227.85301208333, -0.4742887}, cst{221.6030925, -0.5269387}, cst{221.66710791667, -8.5266848}, cst{215.40850625, -8.5731344}, cst{215.51309125, -22.5727749}, cst{215.53369041667, -25.0727024}, cst{225.57655375, -24.9951096}, cst{225.63076958333, -29.9948788}, cst{236.92998, -29.8896160}, cst{236.81306375, -20.3902016}, cst{240.57177625, -20.3516178}, cst{240.43727875, -8.3523235}, cst{240.38695375, -3.6025870}, cst{227.88195125, -3.7241600}}
CstLists["LUP"] = []cst{cst{214.65681625, -55.5799522}, cst{220.23446541667, -55.5400887}, cst{228.08351125, -55.4754944}, cst{228.05671625, -54.4756165}, cst{232.35337208333, -54.4364166}, cst{232.20724625, -48.4371071}, cst{237.24728125, -48.3880234}, cst{237.12458541667, -42.3886375}, cst{242.15280625, -42.3366776}, cst{241.94769875, -29.8377628}, cst{236.92998, -29.8896160}, cst{225.63076958333, -29.9948788}, cst{225.79627958333, -42.4941750}, cst{214.45026458333, -42.5806465}}
CstLists["LYN"] = []cst{cst{112.56071875, 35.2445297}, cst{112.73412458333, 44.2435493}, cst{104.26530291667, 44.3418388}, cst{104.40635875, 49.8410034}, cst{99.919459583333, 49.8945885}, cst{100.04603125, 53.8938293}, cst{94.05736625, 53.9662552}, cst{94.13108875, 55.9658089}, cst{94.40745625, 61.9641266}, cst{107.8515525, 61.8031464}, cst{107.7531975, 59.8037262}, cst{122.12910125, 59.6433983}, cst{128.79913375, 59.5759888}, cst{128.44010375, 46.5777283}, cst{139.59071125, 46.4782791}, cst{139.51249041667, 41.4785957}, cst{145.70923791667, 41.4316750}, cst{145.6819725, 39.1817665}, cst{140.72163125, 39.2188187}, cst{140.645985, 32.9691162}, cst{121.99323125, 33.1415138}, cst{118.25808, 33.1812286}, cst{118.28970875, 35.1810532}}
CstLists["LYR"] = []cst{cst{284.27716208333, 25.6641407}, cst{284.2698675, 26.1640968}, cst{276.76288625, 26.0743504}, cst{276.70077291667, 30.0739765}, cst{273.82438625, 30.0391560}, cst{273.46687375, 47.5369873}, cst{274.34237541667, 47.5476036}, cst{287.1206475, 47.6998672}, cst{288.37552041667, 47.7143936}, cst{288.47030708333, 43.7149391}, cst{291.9835275, 43.7550354}, cst{292.11965541667, 36.7558022}, cst{291.49260458333, 36.7487144}, cst{291.5987775, 30.2493153}, cst{290.0952525, 30.2321968}, cst{290.13264625, 27.7324085}, cst{290.16131375, 25.7325745}}
CstLists["MEN"] = []cst{cst{109.01970875, -85.2614441}, cst{48.23292, -84.5553818}, cst{50.091655416667, -82.0644531}, cst{52.075782083333, -74.5741272}, cst{67.957485, -74.7431641}, cst{68.58152375, -69.7467194}, cst{98.454422916667, -70.1041336}, cst{97.770709583333, -75.1000366}, cst{114.21470375, -75.2899170}, cst{111.65211458333, -82.7758865}}
CstLists["MIC"] = []cst{cst{306.89795541667, -27.5913391}, cst{321.83163625, -27.4596672}, cst{321.92805291667, -36.4592972}, cst{322.04232125, -44.9588585}, cst{307.169295, -45.0900002}}
CstLists["MON"] = []cst{cst{95.225680416667, -0.0537102}, cst{95.34803125, 9.9455481}, cst{96.347665416667, 9.9334478}, cst{96.37276375, 11.9332972}, cst{105.742815, 11.8213453}, cst{105.71845958333, 9.8214874}, cst{106.71787958333, 9.8097754}, cst{106.66432208333, 5.3100886}, cst{106.91427458333, 5.3071680}, cst{106.86739625, 1.3074419}, cst{109.61691875, 1.2755718}, cst{109.59966625, -0.2243290}, cst{122.84900708333, -0.3693900}, cst{122.73417875, -11.3687992}, cst{111.97339958333, -11.2521448}, cst{93.215625, -11.0301533}, cst{88.965790416667, -10.9785318}, cst{89.052372083333, -3.9790573}, cst{95.177142083333, -4.0534163}}
CstLists["MUS"] = []cst{cst{170.08481125, -64.6842651}, cst{169.85697291667, -75.6840134}, cst{207.78143375, -75.6235962}, cst{207.46087041667, -70.6244431}, cst{207.26802291667, -65.6249542}, cst{204.70747958333, -65.6378784}, cst{204.68028625, -64.6379395}, cst{194.43838041667, -64.6769638}, cst{179.05736375, -64.6957855}}
CstLists["NOR"] = []cst{cst{232.5498675, -60.4354935}, cst{249.03468125, -60.2644577}, cst{248.57062375, -45.7670517}, cst{248.4947775, -42.2674789}, cst{242.15280625, -42.3366776}, cst{237.12458541667, -42.3886375}, cst{237.24728125, -48.3880234}, cst{232.20724625, -48.4371071}, cst{232.35337208333, -54.4364166}, cst{228.05671625, -54.4756165}, cst{228.08351125, -55.4754944}, cst{232.38191125, -55.4362831}}
CstLists["OCT"] = []cst{cst{0.80064625, -89.3039017}, cst{1.53339125, -81.8039551}, cst{50.091655416667, -82.0644531}, cst{48.23292, -84.5553818}, cst{109.01970875, -85.2614441}, cst{111.65211458333, -82.7758865}, cst{209.11110875, -83.1200714}, cst{276.86599791667, -82.4582748}, cst{274.19506041667, -74.9745178}, cst{323.1847575, -74.4544678}, cst{351.99783291667, -74.3124619}, cst{1.56630625, -74.3039627}, cst{0.80064625, -89.3039017}, cst{0.80065208333333, -89.3038940}}
CstLists["OPH"] = []cst{cst{245.6026275, -0.2963768}, cst{245.558595, 3.7033811}, cst{252.80590958333, 3.7852108}, cst{252.7014825, 12.6179380}, cst{260.19584708333, 12.7061481}, cst{260.17687791667, 14.2060347}, cst{275.17327375, 14.3874788}, cst{275.20308458333, 12.0543308}, cst{281.388045, 12.1287737}, cst{281.45856875, 6.3791943}, cst{275.27461041667, 6.3047633}, cst{275.29601125, 4.5548930}, cst{277.87113125, 4.5860157}, cst{277.88929958333, 3.0861249}, cst{275.31423625, 3.0550034}, cst{275.35059875, 0.0552235}, cst{269.10103791667, -0.0206471}, cst{269.14970375, -4.0203514}, cst{271.14967375, -3.9960551}, cst{271.22371625, -9.9956055}, cst{266.72375708333, -10.0502338}, cst{266.7447, -11.7167768}, cst{265.49440375, -11.7319136}, cst{265.47349041667, -10.0653696}, cst{259.22206958333, -10.1404381}, cst{259.29742791667, -16.1399899}, cst{265.80019041667, -16.0618820}, cst{266.00183541667, -30.0606632}, cst{253.23534875, -30.2123089}, cst{253.15567041667, -24.7960968}, cst{245.89144625, -24.8781185}, cst{245.82298375, -19.5451660}, cst{247.45067541667, -19.5271549}, cst{247.43823, -18.5272255}, cst{245.81068041667, -18.5452347}, cst{245.69120375, -8.2958899}, cst{240.43727875, -8.3523235}, cst{240.38695375, -3.6025870}, cst{245.63838875, -3.5461800}}
CstLists["ORI"] = []cst{cst{70.852360416667, 0.2375014}, cst{71.03402875, 15.7364635}, cst{76.28892625, 15.6755352}, cst{76.29527875, 16.1754990}, cst{81.7987125, 16.1101055}, cst{81.7922325, 15.6101446}, cst{85.79364625, 15.5619202}, cst{85.755057083333, 12.5621548}, cst{88.255369583333, 12.5318508}, cst{88.327167083333, 18.0314159}, cst{87.326982083333, 18.0435486}, cst{87.39379375, 22.8764725}, cst{90.1440375, 22.8430862}, cst{90.125155416667, 21.5098724}, cst{95.1241275, 21.4491768}, cst{95.069575416667, 17.4495068}, cst{96.4439175, 17.4328651}, cst{96.37276375, 11.9332972}, cst{96.347665416667, 9.9334478}, cst{95.34803125, 9.9455481}, cst{95.225680416667, -0.0537102}, cst{95.177142083333, -4.0534163}, cst{89.052372083333, -3.9790573}, cst{88.965790416667, -10.9785318}, cst{77.72003125, -10.8432293}, cst{77.804395416667, -3.8437285}, cst{71.55635875, -3.7708201}, cst{71.60231375, 0.2289162}}
CstLists["PAV"] = []cst{cst{274.19506041667, -74.9745178}, cst{323.1847575, -74.4544678}, cst{322.34865125, -59.4576836}, cst{307.56480125, -59.5880547}, cst{307.45880125, -56.5885773}, cst{272.67225291667, -56.9837723}, cst{265.16818958333, -57.0747757}, cst{265.77572875, -67.5711060}, cst{273.28007708333, -67.4800797}}
CstLists["PEG"] = []cst{cst{321.58347125, 2.5393796}, cst{321.50110208333, 13.0390635}, cst{318.244515, 13.0132008}, cst{318.25026458333, 12.3465548}, cst{317.24836375, 12.3382607}, cst{317.17878291667, 20.0046406}, cst{320.18840875, 20.0290813}, cst{320.15170041667, 24.0289364}, cst{322.66201958333, 24.0482101}, cst{322.62016375, 28.5480537}, cst{327.39518125, 28.5817947}, cst{327.319965, 36.5815468}, cst{329.4610125, 36.5953827}, cst{331.35046041667, 36.6069069}, cst{331.35955791667, 35.6069336}, cst{343.70653208333, 35.6656113}, cst{343.70919291667, 35.1656151}, cst{344.46530375, 35.1682358}, cst{354.04417958333, 35.1913109}, cst{354.04915791667, 32.7746468}, cst{357.8280825, 32.7785072}, cst{357.82874125, 32.0285034}, cst{1.6069770833333, 32.0293655}, cst{1.60621625, 28.6960354}, cst{2.6128425, 28.6957588}, cst{2.61001625, 22.6957588}, cst{3.7406445833333, 22.6951923}, cst{3.73992125, 21.6951923}, cst{3.7341179166667, 13.1951942}, cst{1.6031745833333, 13.1960354}, cst{1.6027304166667, 10.6960354}, cst{359.09711875, 10.6957970}, cst{359.09803375, 8.1957970}, cst{342.82141625, 8.1621685}, cst{342.84221708333, 2.6622071}, cst{331.58726708333, 2.6076074}, cst{331.588755, 2.3576119}, cst{326.58708625, 2.3256910}, cst{326.58021875, 3.3256676}, cst{323.57874875, 3.3043909}, cst{323.58427041667, 2.5544112}}
CstLists["PER"] = []cst{cst{42.62838, 31.1865025}, cst{42.666467916667, 34.5196762}, cst{40.402382916667, 34.5375137}, cst{40.43465875, 37.2873878}, cst{39.67934125, 37.2931557}, cst{39.88547875, 51.0423737}, cst{32.67380125, 51.0925827}, cst{32.62149125, 47.5927505}, cst{26.931439583333, 47.6258430}, cst{26.96852375, 50.6257439}, cst{22.40793625, 50.6478767}, cst{22.45601375, 54.6477699}, cst{27.53364125, 54.6228828}, cst{27.5952225, 58.1227188}, cst{30.77362375, 58.1046753}, cst{30.795625416667, 59.1046104}, cst{38.802355416667, 59.0511551}, cst{38.762337083333, 57.5513000}, cst{48.90093, 57.4684982}, cst{49.91349625, 57.4593849}, cst{49.8540225, 55.4596519}, cst{52.381900416667, 55.4362831}, cst{52.31308625, 52.9366074}, cst{72.840285, 52.7196465}, cst{72.45734375, 36.2218513}, cst{69.57384125, 36.2547150}, cst{69.4869375, 30.9218750}, cst{52.426667916667, 31.1003609}}
CstLists["PHE"] = []cst{cst{351.69270458333, -39.3127594}, cst{351.76852208333, -56.3126869}, cst{351.77839375, -57.8126793}, cst{21.20622875, -57.8484154}, cst{21.2732625, -52.8485603}, cst{24.967354583333, -52.8658562}, cst{24.9938475, -50.8659210}, cst{28.693257083333, -50.8859215}, cst{28.738322916667, -47.5527229}, cst{36.1529475, -47.6004944}, cst{36.26401375, -39.4342155}, cst{26.350727916667, -39.3726234}}
CstLists["PIC"] = []cst{cst{90.951777083333, -43.0057793}, cst{75.97444375, -42.8255501}, cst{73.482370416667, -42.7963676}, cst{73.402082916667, -46.2959023}, cst{68.42409625, -46.2387962}, cst{68.362247916667, -48.7384491}, cst{68.217745416667, -53.7376366}, cst{75.6770175, -53.8238029}, cst{75.547742916667, -57.3230400}, cst{83.01880375, -57.4122620}, cst{82.85761375, -60.9112892}, cst{90.34506125, -61.0020981}, cst{90.173642916667, -64.0010529}, cst{98.93724875, -64.1070251}, cst{102.70331375, -64.1518784}, cst{103.01111708333, -58.1537018}, cst{97.995077916667, -58.0938416}, cst{98.114275416667, -55.0945587}, cst{93.1074, -55.0340500}, cst{93.19435375, -52.5345764}, cst{90.693705, -52.5042114}, cst{90.748902083333, -50.7545471}}
CstLists["PSC"] = []cst{cst{342.8497125, 0.6622211}, cst{342.84221708333, 2.6622071}, cst{342.82141625, 8.1621685}, cst{359.09803375, 8.1957970}, cst{359.09711875, 10.6957970}, cst{1.6027304166667, 10.6960354}, cst{1.6031745833333, 13.1960354}, cst{3.7341179166667, 13.1951942}, cst{3.73992125, 21.6951923}, cst{14.414815416667, 21.6766376}, cst{14.424064583333, 24.4266243}, cst{12.41349125, 24.4319324}, cst{12.44306375, 33.6818962}, cst{22.89742625, 33.6453705}, cst{22.86642, 28.6454391}, cst{26.76471, 28.6262817}, cst{26.744674583333, 25.6263351}, cst{26.65573375, 10.5432396}, cst{31.6652475, 10.5143948}, cst{31.61526625, 2.5978806}, cst{6.6037875, 2.6925383}, cst{6.60132875, 0.6925398}, cst{6.5927025, -6.3074551}, cst{359.10329875, -6.3042021}, cst{359.10221125, -3.3042023}, cst{342.86470375, -3.3377509}}
CstLists["PSA"] = []cst{cst{346.68096625, -24.8250446}, cst{329.77028875, -24.9040413}, cst{321.80777541667, -24.9597607}, cst{321.83163625, -27.4596672}, cst{321.92805291667, -36.4592972}, cst{346.72751375, -36.3249741}}
CstLists["PUP"] = []cst{cst{111.97339958333, -11.2521448}, cst{111.67719875, -33.2504692}, cst{99.903859583333, -33.1128159}, cst{99.70891625, -43.1116486}, cst{90.951777083333, -43.0057793}, cst{90.748902083333, -50.7545471}, cst{120.8616975, -51.1025848}, cst{121.03827875, -43.3535042}, cst{126.57231291667, -43.4095192}, cst{126.67779875, -37.1600380}, cst{126.92709458333, -17.4112568}, cst{126.98977958333, -11.4115648}, cst{122.73417875, -11.3687992}}
CstLists["PYX"] = []cst{cst{126.92709458333, -17.4112568}, cst{130.18434, -17.4424706}, cst{130.1635125, -19.4423733}, cst{137.68497, -19.5088310}, cst{137.63677625, -24.5086308}, cst{141.904335, -24.5425186}, cst{141.77159875, -37.2920151}, cst{126.67779875, -37.1600380}}
CstLists["RET"] = []cst{cst{48.362689583333, -67.0358200}, cst{68.79401875, -67.2479248}, cst{69.274534583333, -58.7506638}, cst{65.55459, -58.7088547}, cst{65.6504625, -56.2093849}, cst{60.69291875, -56.1555862}, cst{60.79789625, -52.8228111}, cst{58.318787916667, -52.7968445}, cst{53.365002083333, -52.7470779}, cst{53.23681625, -57.0797844}, cst{48.79113125, -57.0377846}}
CstLists["SGE"] = []cst{cst{284.37363625, 18.6647091}, cst{284.33913291667, 21.2478352}, cst{290.09631125, 21.3148155}, cst{290.12128791667, 19.3982983}, cst{298.88568875, 19.4955387}, cst{298.860255, 21.5787334}, cst{305.12540875, 21.6436558}, cst{305.13404875, 20.8936996}, cst{305.18694875, 16.1439629}, cst{303.5589975, 16.1275158}, cst{298.926, 16.0790844}, cst{298.92116541667, 16.4957294}, cst{286.4054775, 16.3550682}, cst{286.37549375, 18.6882229}}
CstLists["SGR"] = []cst{cst{284.74405375, -11.8664360}, cst{284.79372, -15.8328123}, cst{275.54952625, -15.9435720}, cst{265.80019041667, -16.0618820}, cst{266.00183541667, -30.0606632}, cst{269.50281125, -30.0182076}, cst{269.62546375, -37.0174599}, cst{289.59631958333, -36.7785645}, cst{289.76964, -45.2775650}, cst{307.169295, -45.0900002}, cst{306.89795541667, -27.5913391}, cst{301.91596958333, -27.6419144}, cst{301.72636958333, -11.6762342}}
CstLists["SCO"] = []cst{cst{240.43727875, -8.3523235}, cst{245.69120375, -8.2958899}, cst{245.81068041667, -18.5452347}, cst{247.43823, -18.5272255}, cst{247.45067541667, -19.5271549}, cst{245.82298375, -19.5451660}, cst{245.89144625, -24.8781185}, cst{253.15567041667, -24.7960968}, cst{253.23534875, -30.2123089}, cst{266.00183541667, -30.0606632}, cst{269.50281125, -30.0182076}, cst{269.62546375, -37.0174599}, cst{269.80928375, -45.5163460}, cst{248.57062375, -45.7670517}, cst{248.4947775, -42.2674789}, cst{242.15280625, -42.3366776}, cst{241.94769875, -29.8377628}, cst{236.92998, -29.8896160}, cst{236.81306375, -20.3902016}, cst{240.57177625, -20.3516178}}
CstLists["SCL"] = []cst{cst{346.68096625, -24.8250446}, cst{359.11056458333, -24.8042011}, cst{26.45888875, -24.8729095}, cst{26.350727916667, -39.3726234}, cst{351.69270458333, -39.3127594}, cst{351.6833775, -36.3127670}, cst{346.72751375, -36.3249741}}
CstLists["SCT"] = []cst{cst{275.54952625, -15.9435720}, cst{284.79372, -15.8328123}, cst{284.74405375, -11.8664360}, cst{284.64729291667, -3.8336766}, cst{280.3981875, -3.8842230}, cst{275.3991225, -3.9444826}}
CstLists["SER1"] = []cst{cst{227.85301208333, -0.4742887}, cst{227.78148625, 7.5253930}, cst{227.60549125, 25.5246105}, cst{229.09951625, 25.5380573}, cst{241.80573458333, 25.6641407}, cst{241.85657541667, 21.6644115}, cst{240.1110075, 21.6459675}, cst{240.18107375, 15.6463346}, cst{242.67663, 15.6728001}, cst{242.80966791667, 3.6735139}, cst{245.558595, 3.7033811}, cst{245.6026275, -0.2963768}, cst{245.63838875, -3.5461800}, cst{240.38695375, -3.6025870}, cst{227.88195125, -3.7241600}}
CstLists["SER2"] = []cst{cst{275.35059875, 0.0552235}, cst{275.31423625, 3.0550034}, cst{277.93922375, 3.0867271}, cst{277.92105625, 4.5866175}, cst{275.29601125, 4.5548930}, cst{275.27461041667, 6.3047633}, cst{281.45856875, 6.3791943}, cst{284.525985, 6.4156075}, cst{284.57642541667, 2.1659052}, cst{280.3262325, 2.1153460}, cst{280.35020875, 0.1154895}, cst{280.3981875, -3.8842230}, cst{275.3991225, -3.9444826}, cst{275.54952625, -15.9435720}, cst{265.80019041667, -16.0618820}, cst{259.29742791667, -16.1399899}, cst{259.22206958333, -10.1404381}, cst{265.47349041667, -10.0653696}, cst{265.49440375, -11.7319136}, cst{266.7447, -11.7167768}, cst{266.72375708333, -10.0502338}, cst{271.22371625, -9.9956055}, cst{271.14967375, -3.9960551}, cst{269.14970375, -4.0203514}, cst{269.10103791667, -0.0206471}}
CstLists["SEX"] = []cst{cst{145.34890625, -0.5670585}, cst{145.39841708333, 6.4327669}, cst{162.87601958333, 6.3377299}, cst{162.8497125, -0.6622211}, cst{162.82713875, -6.6621790}, cst{162.80791375, -11.6621428}, cst{145.27027208333, -11.5667810}}
CstLists["TAU"] = []cst{cst{50.836682916667, -1.3029516}, cst{50.85298375, 0.4469725}, cst{50.94641125, 10.3632069}, cst{51.037234583333, 19.4461136}, cst{52.2906225, 19.4343338}, cst{52.426667916667, 31.1003609}, cst{69.4869375, 30.9218750}, cst{69.47678875, 30.2552605}, cst{73.235342916667, 30.2123089}, cst{73.212475416667, 28.7124405}, cst{90.228902916667, 28.5092430}, cst{90.22107125, 28.0092907}, cst{90.1440375, 22.8430862}, cst{87.39379375, 22.8764725}, cst{87.326982083333, 18.0435486}, cst{88.327167083333, 18.0314159}, cst{88.255369583333, 12.5318508}, cst{85.755057083333, 12.5621548}, cst{85.79364625, 15.5619202}, cst{81.7922325, 15.6101446}, cst{81.7987125, 16.1101055}, cst{76.29527875, 16.1754990}, cst{76.28892625, 15.6755352}, cst{71.03402875, 15.7364635}, cst{70.852360416667, 0.2375014}, cst{55.352905416667, 0.4037257}, cst{55.335582083333, -1.3461887}}
CstLists["TEL"] = []cst{cst{307.45880125, -56.5885773}, cst{307.169295, -45.0900002}, cst{289.76964, -45.2775650}, cst{272.3090175, -45.4859734}, cst{272.67225291667, -56.9837723}}
CstLists["TRI"] = []cst{cst{26.744674583333, 25.6263351}, cst{26.76471, 28.6262817}, cst{22.86642, 28.6454391}, cst{22.89742625, 33.6453705}, cst{22.910835, 35.6453362}, cst{31.854250416667, 35.5971375}, cst{31.87109125, 37.3470840}, cst{39.67934125, 37.2931557}, cst{40.43465875, 37.2873878}, cst{40.402382916667, 34.5375137}, cst{42.666467916667, 34.5196762}, cst{42.62838, 31.1865025}, cst{38.10319375, 31.2213154}, cst{38.07014875, 27.8047638}, cst{30.53061625, 27.8550186}, cst{30.51371125, 25.6050701}}
CstLists["TRA"] = []cst{cst{224.16644125, -70.5115433}, cst{224.00363375, -68.0122070}, cst{226.55712625, -67.9909286}, cst{226.35353541667, -64.0751266}, cst{230.16657875, -64.0415649}, cst{230.05456958333, -61.4587479}, cst{232.58976458333, -61.4353065}, cst{232.5498675, -60.4354935}, cst{249.03468125, -60.2644577}, cst{249.08163, -61.2641945}, cst{251.53784708333, -61.2364578}, cst{251.67632125, -63.8189964}, cst{254.1951375, -63.7900925}, cst{254.28351458333, -65.2062531}, cst{255.5423925, -65.1916428}, cst{255.72498291667, -67.6905823}, cst{258.2424825, -67.6610870}, cst{258.47067875, -70.1597443}}
CstLists["TUC"] = []cst{cst{351.99783291667, -74.3124619}, cst{1.5662970833333, -74.3039627}, cst{12.3324375, -74.3185730}, cst{12.295414583333, -75.3185272}, cst{20.654050416667, -75.3472214}, cst{21.20622875, -57.8484154}, cst{351.77839375, -57.8126793}, cst{351.76852208333, -56.3126869}, cst{332.113695, -56.3908348}, cst{332.3985675, -66.8899918}, cst{351.86139125, -66.8125992}}
CstLists["UMA"] = []cst{cst{145.70923791667, 41.4316750}, cst{139.51249041667, 41.4785957}, cst{139.59071125, 46.4782791}, cst{128.44010375, 46.5777283}, cst{128.79913375, 59.5759888}, cst{122.12910125, 59.6433983}, cst{123.08622875, 73.1383743}, cst{140.61547375, 72.9741364}, cst{171.96136958333, 72.8125000}, cst{171.84934625, 65.8126068}, cst{181.57925541667, 65.8039627}, cst{181.58155958333, 63.3039627}, cst{203.55053875, 63.3593445}, cst{203.57364125, 62.3593979}, cst{217.04525375, 62.4414825}, cst{217.25124875, 54.9422379}, cst{211.58439125, 54.9035759}, cst{211.69873208333, 47.9039383}, cst{203.79511375, 47.8599281}, cst{203.74239875, 52.3598061}, cst{182.8185225, 52.3043365}, cst{182.82643375, 44.3043365}, cst{181.59141625, 44.3039627}, cst{181.59450625, 33.3039627}, cst{181.59566375, 28.3039627}, cst{179.60894125, 28.3040466}, cst{166.69399791667, 28.3250256}, cst{166.71422541667, 33.3249931}, cst{163.48940875, 33.3356781}, cst{163.52316875, 39.3356133}, cst{154.3594125, 39.3774109}, cst{154.37822375, 41.3773613}}
CstLists["UMI"] = []cst{cst{195.8206125, 76.3289108}, cst{196.09747375, 69.3293610}, cst{210.65081125, 69.3991165}, cst{210.82055541667, 65.3996506}, cst{235.32956541667, 65.6023483}, cst{235.05063, 69.6009445}, cst{247.8410625, 69.7383041}, cst{247.2207075, 74.7347870}, cst{261.53663708333, 74.9033127}, cst{260.21790458333, 79.8953476}, cst{267.65602041667, 79.9857483}, cst{261.72223041667, 85.9495697}, cst{308.72097, 86.4656219}, cst{308.33135541667, 86.6306305}, cst{343.51066625, 86.8368912}, cst{339.26098791667, 88.6638870}, cst{135.83247125, 87.5689163}, cst{130.40275041667, 86.0975418}, cst{213.0229575, 85.9308090}, cst{216.78285625, 79.4449844}, cst{203.80918958333, 79.3629303}, cst{204.15701875, 76.3638153}}
CstLists["VEL"] = []cst{cst{166.33725625, -57.1744423}, cst{166.45650458333, -40.4246216}, cst{141.73406125, -40.2918739}, cst{141.77159875, -37.2920151}, cst{126.67779875, -37.1600380}, cst{126.57231291667, -43.4095192}, cst{121.03827875, -43.3535042}, cst{120.8616975, -51.1025848}, cst{123.38112875, -51.1285286}, cst{123.32011625, -53.3782196}, cst{127.60929125, -53.4206772}, cst{127.56711875, -54.9204712}, cst{133.38017375, -54.9742203}, cst{133.32365541667, -56.9739723}}
CstLists["VIR"] = []cst{cst{174.35052458333, -0.6916979}, cst{174.36568791667, 10.3082914}, cst{179.60373458333, 10.3040485}, cst{179.60453541667, 13.3040485}, cst{194.0620275, 13.3225126}, cst{194.05906625, 14.3225088}, cst{204.02893041667, 14.3604937}, cst{204.06384875, 7.3605771}, cst{227.78148625, 7.5253930}, cst{227.85301208333, -0.4742887}, cst{221.6030925, -0.5269387}, cst{221.66710791667, -8.5266848}, cst{215.40850625, -8.5731344}, cst{215.51309125, -22.5727749}, cst{194.16687, -22.6773415}, cst{194.1330525, -11.6773882}, cst{179.09676, -11.6957970}, cst{179.09860625, -6.6957974}, cst{174.34229875, -6.6916924}}
CstLists["VOL"] = []cst{cst{98.93724875, -64.1070251}, cst{98.454422916667, -70.1041336}, cst{97.770709583333, -75.1000366}, cst{114.21470375, -75.2899170}, cst{135.24368708333, -75.4954681}, cst{136.09472708333, -64.4990387}, cst{102.70331375, -64.1518784}}
CstLists["VUL"] = []cst{cst{284.33913291667, 21.2478352}, cst{284.27716208333, 25.6641407}, cst{290.16131375, 25.7325745}, cst{290.13264625, 27.7324085}, cst{296.27220125, 27.8011742}, cst{296.25094375, 29.3010578}, cst{315.07258375, 29.4871387}, cst{315.08391458333, 28.4871883}, cst{322.62016375, 28.5480537}, cst{322.66201958333, 24.0482101}, cst{320.15170041667, 24.0289364}, cst{320.18840875, 20.0290813}, cst{317.17878291667, 20.0046406}, cst{309.907665, 19.9399967}, cst{309.89693708333, 20.9399471}, cst{305.13404875, 20.8936996}, cst{305.12540875, 21.6436558}, cst{298.860255, 21.5787334}, cst{298.88568875, 19.4955387}, cst{290.12128791667, 19.3982983}, cst{290.09631125, 21.3148155}}
change := []string{"PSC", "TUC", "PHE", "SCL", "CET", "PEG", "AND", "CAS", "CEP"}
for _, v := range change {
for k, v2 := range CstLists[v] {
if v2.RA < 270 {
CstLists[v][k].RA = v2.RA + 360
}
}
}
}
//选定 RA=277.5 DEC=-40
func isCross(a, b, c, d cst) bool {
var ac, bc, ad, bd, ca, cb, da, db cst
var r1, r2 float64
ac.RA = a.RA - c.RA
ac.DEC = a.DEC - c.DEC
ad.RA = a.RA - d.RA
ad.DEC = a.DEC - d.DEC
r1 = ac.RA*ad.DEC - ad.RA*ac.DEC
bc.RA = b.RA - c.RA
bc.DEC = b.DEC - c.DEC
bd.RA = b.RA - d.RA
bd.DEC = b.DEC - d.DEC
r2 = bc.RA*bd.DEC - bd.RA*bc.DEC
//echo r1.' '.r2;
if r1*r2 > 0 {
return false
}
ca.RA = c.RA - a.RA
ca.DEC = c.DEC - a.DEC
cb.RA = c.RA - b.RA
cb.DEC = c.DEC - b.DEC
r1 = ca.RA*cb.DEC - cb.RA*ca.DEC
da.RA = d.RA - a.RA
da.DEC = d.DEC - a.DEC
db.RA = d.RA - b.RA
db.DEC = d.DEC - b.DEC
r2 = da.RA*db.DEC - db.RA*da.DEC
if r1*r2 > 0 {
return false
}
return true
}
func IsXZ(ra, dec, jde float64) string {
var nra, ndec float64
nra = ra
if ra > 360 {
nra = ra - 360
}
nra, ndec = ZuoBiaoSuiCha(nra, dec, jde, 2451545.0)
if ra > 360 && nra < 300 {
nra += 360
}
for k, v := range CstLists {
var count int = 0
for i := 0; i < len(v)-1; i++ {
if k == "UMI" || k == "OCT" {
continue
}
if i == 0 {
if isCross(cst{277.5, -100}, cst{nra, ndec}, v[len(v)-1], v[0]) {
count++
}
}
if isCross(cst{277.5, -100}, cst{nra, ndec}, v[i], v[i+1]) {
count++
}
if FR((nra-277.5)*(v[i].DEC+100)) == FR((v[i].RA-277.5)*(ndec+100)) {
count++
}
}
if count%2 == 1 {
return k
}
}
if nra <= 360 {
ra = ra + 360
return IsXZ(ra, dec, jde)
}
if ndec > 50 {
return "UMI"
} else if ndec < -50 {
return "OCT"
} else {
return ""
}
}
func WhichCst(ra, dec, jde float64) string {
cst := make(map[string]string)
cst["AND"] = "仙女座"
cst["ANT"] = "唧筒座"
cst["APS"] = "天燕座"
cst["AQR"] = "宝瓶座"
cst["AQL"] = "天鹰座"
cst["ARA"] = "天坛座"
cst["ARI"] = "白羊座"
cst["AUR"] = "御夫座"
cst["BOO"] = "牧夫座"
cst["CAE"] = "雕具座"
cst["CAM"] = "鹿豹座"
cst["CNC"] = "巨蟹座"
cst["CVN"] = "猎犬座"
cst["CMA"] = "大犬座"
cst["CMI"] = "小犬座"
cst["CAP"] = "摩羯座"
cst["CAR"] = "船底座"
cst["CAS"] = "仙后座"
cst["CEN"] = "半人马座"
cst["CEP"] = "仙王座"
cst["CET"] = "鲸鱼座"
cst["CHA"] = "蝘蜓座"
cst["CIR"] = "圆规座"
cst["COL"] = "天鸽座"
cst["COM"] = "后发座"
cst["CRA"] = "南冕座"
cst["CRB"] = "北冕座"
cst["CRV"] = "乌鸦座"
cst["CRT"] = "巨爵座"
cst["CRU"] = "南十字座"
cst["CYG"] = "天鹅座"
cst["DEL"] = "海豚座"
cst["DOR"] = "剑鱼座"
cst["DRA"] = "天龙座"
cst["EQU"] = "小马座"
cst["ERI"] = "波江座"
cst["FOR"] = "天炉座"
cst["GEM"] = "双子座"
cst["GRU"] = "天鹤座"
cst["HER"] = "武仙座"
cst["HOR"] = "时钟座"
cst["HYA"] = "长蛇座"
cst["HYI"] = "水蛇座"
cst["IND"] = "印第安座"
cst["LAC"] = "蝎虎座"
cst["LEO"] = "狮子座"
cst["LMI"] = "小狮座"
cst["LEP"] = "天兔座"
cst["LIB"] = "天秤座"
cst["LUP"] = "豺狼座"
cst["LYN"] = "天猫座"
cst["LYR"] = "天琴座"
cst["MEN"] = "山案座"
cst["MIC"] = "显微镜座"
cst["MON"] = "麒麟座"
cst["MUS"] = "苍蝇座"
cst["NOR"] = "矩尺座"
cst["OCT"] = "南极座"
cst["OPH"] = "蛇夫座"
cst["ORI"] = "猎户座"
cst["PAV"] = "孔雀座"
cst["PEG"] = "飞马座"
cst["PER"] = "英仙座"
cst["PHE"] = "凤凰座"
cst["PIC"] = "绘架座"
cst["PSC"] = "双鱼座"
cst["PSA"] = "南鱼座"
cst["PUP"] = "船尾座"
cst["PYX"] = "罗盘座"
cst["RET"] = "网罟座"
cst["SGE"] = "天箭座"
cst["SGR"] = "人马座"
cst["SCO"] = "天蝎座"
cst["SCL"] = "玉夫座"
cst["SCT"] = "盾牌座"
cst["SER1"] = "巨蛇座"
cst["SER2"] = "巨蛇座"
cst["SEX"] = "六分仪座"
cst["TAU"] = "金牛座"
cst["TEL"] = "望远镜座"
cst["TRI"] = "三角座"
cst["TRA"] = "南三角座"
cst["TUC"] = "杜鹃座"
cst["UMA"] = "大熊座"
cst["UMI"] = "小熊座"
cst["VEL"] = "船帆座"
cst["VIR"] = "室女座"
cst["VOL"] = "飞鱼座"
cst["VUL"] = "狐狸座"
mystar := IsXZ(ra, dec, jde)
return cst[mystar]
}

@ -0,0 +1,9 @@
package basic
import (
"testing"
)
func Test_Isxz(t *testing.T) {
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,45 @@
package basic
import (
"fmt"
"testing"
"time"
)
func Test_Jq(t *testing.T) {
//fmt.Println(GetOneYearJQ(2019))
fmt.Println(JDE2Date(GetWHTime(2019, 10)))
fmt.Println(JDE2Date(GetJQTime(2019, 15)))
fmt.Println(JDE2Date(GetJQTime(2019, 0)))
}
func Test_SunLo(t *testing.T) {
fmt.Printf("%.14f\n", HSunTrueLo(2458840.0134162))
fmt.Printf("%.14f", HSunSeeLo(2458840.0134162))
}
func Test_Cal(t *testing.T) {
fmt.Println(JDE2Date(GetSolar(2020, 1, 1, false)))
fmt.Println(JDE2Date(GetSolar(2020, 4, 1, false)))
fmt.Println(JDE2Date(GetSolar(2020, 4, 1, true)))
fmt.Println(JDE2Date(GetSolar(2033, 11, 3, false)))
fmt.Println(JDE2Date(GetSolar(2033, 11, 3, true)))
fmt.Println(JDE2Date(GetSolar(2034, 1, 1, false)))
}
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()+8, 115, 32, 8, 0)
b = GetSunRiseTime(GetNowJDE()+9, 115, 32, 8, 0)
fmt.Println(time.Now().UnixNano() - a)
fmt.Println(JDE2Date((b)))
fmt.Println(time.Now().UnixNano() - a)
}

@ -0,0 +1,147 @@
package basic
import (
"math"
"b612.me/astro/planet"
. "b612.me/astro/tools"
)
func UranusL(JD float64) float64 {
return planet.WherePlanet(6, 0, JD)
}
func UranusB(JD float64) float64 {
return planet.WherePlanet(6, 1, JD)
}
func UranusR(JD float64) float64 {
return planet.WherePlanet(6, 2, JD)
}
func AUranusX(JD float64) float64 {
l := UranusL(JD)
b := UranusB(JD)
r := UranusR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
return x
}
func AUranusY(JD float64) float64 {
l := UranusL(JD)
b := UranusB(JD)
r := UranusR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
return y
}
func AUranusZ(JD float64) float64 {
//l := UranusL(JD)
b := UranusB(JD)
r := UranusR(JD)
// el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
z := r*Sin(b) - er*Sin(eb)
return z
}
func AUranusXYZ(JD float64) (float64, float64, float64) {
l := UranusL(JD)
b := UranusB(JD)
r := UranusR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
z := r*Sin(b) - er*Sin(eb)
return x, y, z
}
func UranusSeeRa(JD float64) float64 {
lo, bo := UranusSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
return Limit360(ra)
}
func UranusSeeDec(JD float64) float64 {
lo, bo := UranusSeeLoBo(JD)
sita := Sita(JD)
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return dec
}
func UranusSeeRaDec(JD float64) (float64, float64) {
lo, bo := UranusSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return Limit360(ra), dec
}
func EarthUranusAway(JD float64) float64 {
x, y, z := AUranusXYZ(JD)
to := math.Sqrt(x*x + y*y + z*z)
return to
}
func UranusSeeLo(JD float64) float64 {
x, y, z := AUranusXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AUranusXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo
}
func UranusSeeBo(JD float64) float64 {
x, y, z := AUranusXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AUranusXYZ(JD - to)
//lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
//lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
//lo+=GXCLo(lo,bo,JD);
//bo+=GXCBo(lo,bo,JD)/3600;
//lo+=HJZD(JD);
return bo
}
func UranusSeeLoBo(JD float64) (float64, float64) {
x, y, z := AUranusXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AUranusXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo, bo
}
func UranusMag(JD float64) float64 {
AwaySun := UranusR(JD)
AwayEarth := EarthUranusAway(JD)
Away := planet.WherePlanet(-1, 2, JD)
i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth)
i = ArcCos(i)
Mag := -7.19 + 5*math.Log10(AwaySun*AwayEarth) + 0.016*i
return FloatRound(Mag, 2)
}

@ -0,0 +1,147 @@
package basic
import (
"math"
"b612.me/astro/planet"
. "b612.me/astro/tools"
)
func VenusL(JD float64) float64 {
return planet.WherePlanet(2, 0, JD)
}
func VenusB(JD float64) float64 {
return planet.WherePlanet(2, 1, JD)
}
func VenusR(JD float64) float64 {
return planet.WherePlanet(2, 2, JD)
}
func AVenusX(JD float64) float64 {
l := VenusL(JD)
b := VenusB(JD)
r := VenusR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
return x
}
func AVenusY(JD float64) float64 {
l := VenusL(JD)
b := VenusB(JD)
r := VenusR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
return y
}
func AVenusZ(JD float64) float64 {
//l := VenusL(JD)
b := VenusB(JD)
r := VenusR(JD)
// el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
z := r*Sin(b) - er*Sin(eb)
return z
}
func AVenusXYZ(JD float64) (float64, float64, float64) {
l := VenusL(JD)
b := VenusB(JD)
r := VenusR(JD)
el := planet.WherePlanet(-1, 0, JD)
eb := planet.WherePlanet(-1, 1, JD)
er := planet.WherePlanet(-1, 2, JD)
x := r*Cos(b)*Cos(l) - er*Cos(eb)*Cos(el)
y := r*Cos(b)*Sin(l) - er*Cos(eb)*Sin(el)
z := r*Sin(b) - er*Sin(eb)
return x, y, z
}
func VenusSeeRa(JD float64) float64 {
lo, bo := VenusSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
return Limit360(ra)
}
func VenusSeeDec(JD float64) float64 {
lo, bo := VenusSeeLoBo(JD)
sita := Sita(JD)
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return dec
}
func VenusSeeRaDec(JD float64) (float64, float64) {
lo, bo := VenusSeeLoBo(JD)
sita := Sita(JD)
ra := math.Atan2((Sin(lo)*Cos(sita) - Tan(bo)*Sin(sita)), Cos(lo))
ra = ra * 180 / math.Pi
dec := ArcSin(Sin(bo)*Cos(sita) + Cos(bo)*Sin(sita)*Sin(lo))
return Limit360(ra), dec
}
func EarthVenusAway(JD float64) float64 {
x, y, z := AVenusXYZ(JD)
to := math.Sqrt(x*x + y*y + z*z)
return to
}
func VenusSeeLo(JD float64) float64 {
x, y, z := AVenusXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AVenusXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo
}
func VenusSeeBo(JD float64) float64 {
x, y, z := AVenusXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AVenusXYZ(JD - to)
//lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
//lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
//lo+=GXCLo(lo,bo,JD);
//bo+=GXCBo(lo,bo,JD)/3600;
//lo+=HJZD(JD);
return bo
}
func VenusSeeLoBo(JD float64) (float64, float64) {
x, y, z := AVenusXYZ(JD)
to := 0.0057755183 * math.Sqrt(x*x+y*y+z*z)
x, y, z = AVenusXYZ(JD - to)
lo := math.Atan2(y, x)
bo := math.Atan2(z, math.Sqrt(x*x+y*y))
lo = lo * 180 / math.Pi
bo = bo * 180 / math.Pi
lo = Limit360(lo)
//lo-=GXCLo(lo,bo,JD)/3600;
//bo+=GXCBo(lo,bo,JD);
lo += HJZD(JD)
return lo, bo
}
func VenusMag(JD float64) float64 {
AwaySun := VenusR(JD)
AwayEarth := EarthVenusAway(JD)
Away := planet.WherePlanet(-1, 2, JD)
i := (AwaySun*AwaySun + AwayEarth*AwayEarth - Away*Away) / (2 * AwaySun * AwayEarth)
i = ArcCos(i)
Mag := -4.40 + 5*math.Log10(AwaySun*AwayEarth) + 0.0009*i + 0.000239*i*i - 0.00000065*i*i*i
return FloatRound(Mag, 2)
}

@ -0,0 +1,14 @@
package earth
import (
"b612.me/astro/basic"
)
/*
jde, utc
*/
func EarthEccentricity(jde float64) float64 {
return basic.Earthe(basic.TD2UT(jde, true))
}

@ -0,0 +1,70 @@
package jupiter
import (
"b612.me/astro/basic"
"b612.me/astro/planet"
)
/*
jde: UTC
*/
func SeeLo(jde float64) float64 {
return basic.JupiterSeeLo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeBo(jde float64) float64 {
return basic.JupiterSeeBo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRa(jde float64) float64 {
return basic.JupiterSeeRa(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeDec(jde float64) float64 {
return basic.JupiterSeeDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRaDec(jde float64) (float64, float64) {
return basic.JupiterSeeRaDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeMag(jde float64) float64 {
return basic.JupiterMag(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func EarthAway(jde float64) float64 {
return basic.EarthJupiterAway(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SunAway(jde float64) float64 {
return planet.WherePlanet(1, 2, basic.TD2UT(jde, true))
}

@ -0,0 +1,70 @@
package mars
import (
"b612.me/astro/basic"
"b612.me/astro/planet"
)
/*
jde: UTC
*/
func SeeLo(jde float64) float64 {
return basic.MarsSeeLo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeBo(jde float64) float64 {
return basic.MarsSeeBo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRa(jde float64) float64 {
return basic.MarsSeeRa(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeDec(jde float64) float64 {
return basic.MarsSeeDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRaDec(jde float64) (float64, float64) {
return basic.MarsSeeRaDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeMag(jde float64) float64 {
return basic.MarsMag(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func EarthAway(jde float64) float64 {
return basic.EarthMarsAway(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SunAway(jde float64) float64 {
return planet.WherePlanet(1, 2, basic.TD2UT(jde, true))
}

@ -0,0 +1,70 @@
package mercury
import (
"b612.me/astro/basic"
"b612.me/astro/planet"
)
/*
jde: UTC
*/
func SeeLo(jde float64) float64 {
return basic.MercurySeeLo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeBo(jde float64) float64 {
return basic.MercurySeeBo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRa(jde float64) float64 {
return basic.MercurySeeRa(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeDec(jde float64) float64 {
return basic.MercurySeeDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRaDec(jde float64) (float64, float64) {
return basic.MercurySeeRaDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeMag(jde float64) float64 {
return basic.MercuryMag(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func EarthAway(jde float64) float64 {
return basic.EarthMercuryAway(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SunAway(jde float64) float64 {
return planet.WherePlanet(1, 2, basic.TD2UT(jde, true))
}

@ -0,0 +1,203 @@
package moon
import (
"errors"
"b612.me/astro/basic"
)
/*
jdeUTC
*/
func TrueLo(jde float64) float64 {
return basic.HMoonTrueLo(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func SeeLo(jde float64) float64 {
return basic.HMoonSeeLo(basic.TD2UT(jde, true))
}
/*
jdeUTC
lon,
lat,
timezone,
*/
func SeeRa(jde, lon, lat, timezone float64) float64 {
return basic.HMoonSeeRa(basic.TD2UT(jde, true), lon, lat, timezone)
}
/*
jdeUTC
lon,
lat,
timezone,
*/
func SeeDec(jde, lon, lat, timezone float64) float64 {
return basic.HMoonSeeDec(basic.TD2UT(jde, true), lon, lat, timezone)
}
/*
jdeUTC
lon,
lat,
timezone,
*/
func SeeRaDec(jde, lon, lat, timezone float64) (float64, float64) {
return basic.HMoonSeeRaDec(basic.TD2UT(jde, true), lon, lat, timezone)
}
/*
jdeUTC
*/
func TrueRa(jde float64) float64 {
return basic.HMoonTrueRa(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func TrueDec(jde float64) float64 {
return basic.HMoonTrueDec(basic.TD2UT(jde, true))
}
/*
jde
lon西
lat
timezone西
*/
func HourAngle(jde, lon, lat, timezone float64) float64 {
return basic.MoonTimeAngle(jde, lon, lat, timezone)
}
/*
jde
lon西
lat
timezone西
*/
func Azimuth(jde, lon, lat, timezone float64) float64 {
return basic.HMoonAngle(jde, lon, lat, timezone)
}
/*
jde
lon西
lat
timezone西
*/
func Zenith(jde, lon, lat, timezone float64) float64 {
return basic.HMoonHeight(jde, lon, lat, timezone)
}
/*
jde0
lon西
lat
timezone西
*/
func CulminationTime(jde, lon, lat, timezone float64) float64 {
return basic.GetMoonTZTime(jde, lon, lat, timezone)
}
/*
jde0 JDE
lon西
lat
timezone西
aerotrue
*/
func RiseTime(jde, lon, lat, timezone float64, aero bool) (float64, error) {
var err error = nil
tz := 0.00
if aero {
tz = 1
}
tm := basic.GetMoonRiseTime(jde, lon, lat, timezone, tz)
if tm == -2 {
err = errors.New("极夜")
}
if tm == -1 {
err = errors.New("极昼")
}
return tm, err
}
/*
jde0 JDE
lon西
lat
timezone西
aerotrue
*/
func DownTime(jde, lon, lat, timezone float64, aero bool) (float64, error) {
var err error = nil
tz := 0.00
if aero {
tz = 1
}
tm := basic.GetMoonDownTime(jde, lon, lat, timezone, tz)
if tm == -2 {
err = errors.New("极夜")
}
if tm == -1 {
err = errors.New("极昼")
}
return tm, err
}
/*
jdeUTC JDE
*/
func Phase(jde float64) float64 {
return basic.MoonLight(basic.TD2UT(jde, true))
}
/*
*/
func ShuoYue(year float64) float64 {
return basic.CalcMoonSH(year, 0)
}
/*
*/
func WangYue(year float64) float64 {
return basic.CalcMoonSH(year, 1)
}
/*
*/
func ShangXianYue(year float64) float64 {
return basic.CalcMoonXH(year, 0)
}
/*
*/
func XiaXianYue(year float64) float64 {
return basic.CalcMoonXH(year, 1)
}

@ -0,0 +1,14 @@
package moon
import (
"fmt"
"testing"
)
func TestMoonI(t *testing.T) {
fmt.Println(MoonR(2465445.9755443))
}
func Test_NewCalc(t *testing.T) {
fmt.Printf("%.14f", MoonCalcNew(2, 2451546.0))
}

@ -0,0 +1,70 @@
package neptune
import (
"b612.me/astro/basic"
"b612.me/astro/planet"
)
/*
jde: UTC
*/
func SeeLo(jde float64) float64 {
return basic.NeptuneSeeLo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeBo(jde float64) float64 {
return basic.NeptuneSeeBo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRa(jde float64) float64 {
return basic.NeptuneSeeRa(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeDec(jde float64) float64 {
return basic.NeptuneSeeDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRaDec(jde float64) (float64, float64) {
return basic.NeptuneSeeRaDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeMag(jde float64) float64 {
return basic.NeptuneMag(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func EarthAway(jde float64) float64 {
return basic.EarthNeptuneAway(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SunAway(jde float64) float64 {
return planet.WherePlanet(1, 2, basic.TD2UT(jde, true))
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,23 @@
package planet
import (
"fmt"
"testing"
)
func Test_WherePlanet(t *testing.T) {
fmt.Println(WherePlanet(0, 0, 2452545.56))
fmt.Println(WherePlanet(0, 1, 2452545.56))
fmt.Println(WherePlanet(0, 2, 2452545.56))
fmt.Println(WherePlanet(1, 0, 2452545.56))
fmt.Println(WherePlanet(1, 1, 2452545.56))
fmt.Println(WherePlanet(1, 2, 2452545.56))
/*
184.76617673228
1.623745085328E-6
1.0021086365503
5.917793283752
-4.7404269321589
0.34835392797302
*/
}

@ -0,0 +1,70 @@
package saturn
import (
"b612.me/astro/basic"
"b612.me/astro/planet"
)
/*
jde: UTC
*/
func SeeLo(jde float64) float64 {
return basic.SaturnSeeLo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeBo(jde float64) float64 {
return basic.SaturnSeeBo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRa(jde float64) float64 {
return basic.SaturnSeeRa(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeDec(jde float64) float64 {
return basic.SaturnSeeDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRaDec(jde float64) (float64, float64) {
return basic.SaturnSeeRaDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeMag(jde float64) float64 {
return basic.SaturnMag(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func EarthAway(jde float64) float64 {
return basic.EarthSaturnAway(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SunAway(jde float64) float64 {
return planet.WherePlanet(1, 2, basic.TD2UT(jde, true))
}

@ -0,0 +1,244 @@
package sun
import (
"errors"
"b612.me/astro/basic"
)
/*
jdeUTC
nutationtrue
*/
func EclipticObliquity(jde float64, nutation bool) float64 {
jde = basic.TD2UT(jde, true)
return basic.EclipticObliquity(jde, nutation)
}
/*
jdeUTC
*/
func EclipticNutation(jde float64) float64 {
return basic.HJZD(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func AxialtiltNutation(jde float64) float64 {
return basic.JJZD(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func GeometricLo(jde float64) float64 {
return basic.SunLo(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func TrueLo(jde float64) float64 {
return basic.HSunTrueLo(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func SeeLo(jde float64) float64 {
return basic.HSunSeeLo(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func SeeRa(jde float64) float64 {
return basic.HSunSeeRa(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func SeeDec(jde float64) float64 {
return basic.HSunSeeDec(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func SeeRaDec(jde float64) (float64, float64) {
return basic.HSunSeeRaDec(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func TrueRa(jde float64) float64 {
return basic.HSunTrueRa(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func TrueDec(jde float64) float64 {
return basic.HSunTrueDec(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func MidFunc(jde float64) float64 {
return basic.SunMidFun(basic.TD2UT(jde, true))
}
/*
jdeUTC
*/
func EquationTime(jde float64) float64 {
return basic.SunTime(basic.TD2UT(jde, true))
}
/*
jde
lon西
lat
timezone西
*/
func HourAngle(jde, lon, lat, timezone float64) float64 {
return basic.SunTimeAngle(jde, lon, lat, timezone)
}
/*
jde
lon西
lat
timezone西
*/
func Azimuth(jde, lon, lat, timezone float64) float64 {
return basic.SunAngle(jde, lon, lat, timezone)
}
/*
jde
lon西
lat
timezone西
*/
func Zenith(jde, lon, lat, timezone float64) float64 {
return basic.SunHeight(jde, lon, lat, timezone)
}
/*
jde0
lon西
timezone西
*/
func CulminationTime(jde, lon, timezone float64) float64 {
return basic.GetSunTZTime(jde, lon, timezone)
}
/*
jde0 JDE
lon西
lat
timezone西
aerotrue
*/
func RiseTime(jde, lon, lat, timezone float64, aero bool) (float64, error) {
var err error = nil
tz := 0.00
if aero {
tz = 1
}
tm := basic.GetSunRiseTime(jde, lon, lat, timezone, tz)
if tm == -2 {
err = errors.New("极夜")
}
if tm == -1 {
err = errors.New("极昼")
}
return tm, err
}
/*
jde0 JDE
lon西
lat
timezone西
aerotrue
*/
func DownTime(jde, lon, lat, timezone float64, aero bool) (float64, error) {
var err error = nil
tz := 0.00
if aero {
tz = 1
}
tm := basic.GetSunDownTime(jde, lon, lat, timezone, tz)
if tm == -2 {
err = errors.New("极夜")
}
if tm == -1 {
err = errors.New("极昼")
}
return tm, err
}
/*
jde0 JDE
lon西
lat
timezone西
angle-6 -12 -18
*/
func MorningTwilightTime(jde, lon, lat, timezone, angle float64) (float64, error) {
var err error = nil
tm := basic.GetAsaTime(jde, lon, lat, timezone, angle)
if tm == -2 {
err = errors.New("不存在")
}
if tm == -1 {
err = errors.New("不存在")
}
return tm, err
}
/*
jde0 JDE
lon西
lat
timezone西
angle-6 -12 -18
*/
func EveningTwilightTime(jde, lon, lat, timezone, angle float64) (float64, error) {
var err error = nil
tm := basic.GetBanTime(jde, lon, lat, timezone, angle)
if tm == -2 {
err = errors.New("不存在")
}
if tm == -1 {
err = errors.New("不存在")
}
return tm, err
}

@ -0,0 +1,58 @@
package tools
import (
"fmt"
"math"
"strconv"
)
func Sin(x float64) float64 {
return (math.Sin(x * math.Pi / 180.00000))
}
func Cos(x float64) float64 {
return (math.Cos(x * math.Pi / 180.00000))
}
func Tan(x float64) float64 {
return (math.Tan(x * math.Pi / 180.00000))
}
func ArcSin(x float64) float64 {
return (math.Asin(x) / math.Pi * 180.00000)
}
func ArcCos(x float64) float64 {
return (math.Acos(x) / math.Pi * 180.00000)
}
func ArcTan(x float64) float64 {
return (math.Atan(x) / math.Pi * 180.00000)
}
func FloatRound(f float64, n int) float64 {
format := "%." + strconv.Itoa(n) + "f"
res, _ := strconv.ParseFloat(fmt.Sprintf(format, f), 64)
return res
}
func Limit360(x float64) float64 {
for x > 360 {
x -= 360
}
for x < 0 {
x += 360
}
return x
}
func FR(f float64) float64 {
return FloatRound(f, 14)
}
func Abs(x int) int {
if x < 0 {
return -x
}
return x
}

@ -0,0 +1,70 @@
package uranus
import (
"b612.me/astro/basic"
"b612.me/astro/planet"
)
/*
jde: UTC
*/
func SeeLo(jde float64) float64 {
return basic.UranusSeeLo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeBo(jde float64) float64 {
return basic.UranusSeeBo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRa(jde float64) float64 {
return basic.UranusSeeRa(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeDec(jde float64) float64 {
return basic.UranusSeeDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRaDec(jde float64) (float64, float64) {
return basic.UranusSeeRaDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeMag(jde float64) float64 {
return basic.UranusMag(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func EarthAway(jde float64) float64 {
return basic.EarthUranusAway(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SunAway(jde float64) float64 {
return planet.WherePlanet(1, 2, basic.TD2UT(jde, true))
}

@ -0,0 +1,70 @@
package venus
import (
"b612.me/astro/basic"
"b612.me/astro/planet"
)
/*
jde: UTC
*/
func SeeLo(jde float64) float64 {
return basic.VenusSeeLo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeBo(jde float64) float64 {
return basic.VenusSeeBo(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRa(jde float64) float64 {
return basic.VenusSeeRa(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeDec(jde float64) float64 {
return basic.VenusSeeDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeRaDec(jde float64) (float64, float64) {
return basic.VenusSeeRaDec(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SeeMag(jde float64) float64 {
return basic.VenusMag(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func EarthAway(jde float64) float64 {
return basic.EarthVenusAway(basic.TD2UT(jde, true))
}
/*
jde: UTC
*/
func SunAway(jde float64) float64 {
return planet.WherePlanet(1, 2, basic.TD2UT(jde, true))
}
Loading…
Cancel
Save