|
|
|
@ -1033,7 +1033,7 @@ func MoonAway(JD float64) float64 { //'月地距离
|
|
|
|
|
/*
|
|
|
|
|
* @name 月球视黄经
|
|
|
|
|
*/
|
|
|
|
|
func MoonSeeLo(JD float64) float64 {
|
|
|
|
|
func MoonApparentLo(JD float64) float64 {
|
|
|
|
|
return MoonTrueLo(JD) + HJZD(JD)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1041,7 +1041,7 @@ func MoonSeeLo(JD float64) float64 {
|
|
|
|
|
* 月球真赤纬
|
|
|
|
|
*/
|
|
|
|
|
func MoonTrueDec(JD float64) float64 {
|
|
|
|
|
MoonLo := MoonSeeLo(JD)
|
|
|
|
|
MoonLo := MoonApparentLo(JD)
|
|
|
|
|
MoonBo := MoonTrueBo(JD)
|
|
|
|
|
tmp := Sin(MoonBo)*Cos(Sita(JD)) + Cos(MoonBo)*Sin(Sita(JD))*Sin(MoonLo)
|
|
|
|
|
res := ArcSin(tmp)
|
|
|
|
@ -1052,7 +1052,7 @@ func MoonTrueDec(JD float64) float64 {
|
|
|
|
|
* 月球真赤经
|
|
|
|
|
*/
|
|
|
|
|
func MoonTrueRa(JD float64) float64 {
|
|
|
|
|
MoonLo := MoonSeeLo(JD)
|
|
|
|
|
MoonLo := MoonApparentLo(JD)
|
|
|
|
|
MoonBo := MoonTrueBo(JD)
|
|
|
|
|
tmp := (Sin(MoonLo)*Cos(Sita(JD)) - Tan(MoonBo)*Sin(Sita(JD))) / Cos(MoonLo)
|
|
|
|
|
tmp = ArcTan(tmp)
|
|
|
|
@ -1070,7 +1070,7 @@ func MoonTrueRa(JD float64) float64 {
|
|
|
|
|
*
|
|
|
|
|
传入世界时
|
|
|
|
|
*/
|
|
|
|
|
func MoonSeeRa(JD, lon, lat float64, tz int) float64 {
|
|
|
|
|
func MoonApparentRa(JD, lon, lat float64, tz int) float64 {
|
|
|
|
|
jde := TD2UT(JD, true)
|
|
|
|
|
ra := MoonTrueRa(jde - float64(tz)/24.000)
|
|
|
|
|
dec := MoonTrueDec(jde - float64(tz)/24.000)
|
|
|
|
@ -1079,7 +1079,7 @@ func MoonSeeRa(JD, lon, lat float64, tz int) float64 {
|
|
|
|
|
return nra
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func MoonSeeDec(JD, lon, lat, tz float64) float64 {
|
|
|
|
|
func MoonApparentDec(JD, lon, lat, tz float64) float64 {
|
|
|
|
|
jde := TD2UT(JD, true)
|
|
|
|
|
ra := MoonTrueRa(jde - tz/24.0)
|
|
|
|
|
dec := MoonTrueDec(jde - tz/24)
|
|
|
|
@ -1090,8 +1090,8 @@ func MoonSeeDec(JD, lon, lat, tz float64) float64 {
|
|
|
|
|
|
|
|
|
|
func MoonLight(JD float64) float64 {
|
|
|
|
|
MoonBo := HMoonTrueBo(JD)
|
|
|
|
|
SunLo := HSunSeeLo(JD)
|
|
|
|
|
MoonLo := HMoonSeeLo(JD)
|
|
|
|
|
SunLo := HSunApparentLo(JD)
|
|
|
|
|
MoonLo := HMoonApparentLo(JD)
|
|
|
|
|
tmp := Cos(MoonBo) * Cos(SunLo-MoonLo)
|
|
|
|
|
R := RDJL(JD) * 149597870.691
|
|
|
|
|
i := R * Sin(ArcCos(tmp)) / (HMoonAway(JD) - R*tmp)
|
|
|
|
@ -1107,7 +1107,7 @@ func MoonLight(JD float64) float64 {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func SunMoonSeek(JDE float64, degree float64) float64 {
|
|
|
|
|
p := HMoonSeeLo(JDE) - (HSunSeeLo(JDE)) - degree
|
|
|
|
|
p := HMoonApparentLo(JDE) - (HSunApparentLo(JDE)) - degree
|
|
|
|
|
for p < -180 {
|
|
|
|
|
p += 360
|
|
|
|
|
}
|
|
|
|
@ -1303,7 +1303,7 @@ func MoonAngle(JD, Lon, Lat, TZ float64) float64 {
|
|
|
|
|
ndec := ZhanXinDec(ra, dec, Lat, Lon, JD-TZ/24, away, 0)
|
|
|
|
|
nra := ZhanXinRa(ra, dec, Lat, Lon, JD-TZ/24, away, 0)
|
|
|
|
|
calcjd = JD - TZ/24
|
|
|
|
|
st := Limit360(SeeStarTime(calcjd)*15 + Lon)
|
|
|
|
|
st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon)
|
|
|
|
|
H := Limit360(st - nra)
|
|
|
|
|
tmp2 := Sin(H) / (Cos(H)*Sin(Lat) - Tan(ndec)*Cos(Lat))
|
|
|
|
|
Angle := ArcTan(tmp2)
|
|
|
|
@ -1333,7 +1333,7 @@ func MoonHeight(JD, Lon, Lat, TZ float64) float64 {
|
|
|
|
|
ndec := ZhanXinDec(ra, dec, Lat, Lon, JD-TZ/24, away, 0)
|
|
|
|
|
nra := ZhanXinRa(ra, dec, Lat, Lon, JD-TZ/24, away, 0)
|
|
|
|
|
calcjd = JD - TZ/24
|
|
|
|
|
st := Limit360(SeeStarTime(calcjd)*15 + Lon)
|
|
|
|
|
st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon)
|
|
|
|
|
H := Limit360(st - nra)
|
|
|
|
|
tmp2 := Sin(Lat)*Sin(ndec) + Cos(ndec)*Cos(Lat)*Cos(H)
|
|
|
|
|
return ArcSin(tmp2)
|
|
|
|
@ -1349,7 +1349,7 @@ func HMoonAngle(JD, Lon, Lat, TZ float64) float64 {
|
|
|
|
|
ndec := ZhanXinDec(ra, dec, Lat, Lon, JD-TZ/24, away, 0)
|
|
|
|
|
nra := ZhanXinRa(ra, dec, Lat, Lon, JD-TZ/24, away, 0)
|
|
|
|
|
calcjd = JD - TZ/24
|
|
|
|
|
st := Limit360(SeeStarTime(calcjd)*15 + Lon)
|
|
|
|
|
st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon)
|
|
|
|
|
H := Limit360(st - nra)
|
|
|
|
|
tmp2 := Sin(H) / (Cos(H)*Sin(Lat) - Tan(ndec)*Cos(Lat))
|
|
|
|
|
Angle := ArcTan(tmp2)
|
|
|
|
@ -1376,7 +1376,7 @@ func HMoonHeight(JD, Lon, Lat, TZ float64) float64 {
|
|
|
|
|
away := HMoonAway(calcjd) / 149597870.7
|
|
|
|
|
nra, ndec := ZhanXinRaDec(ra, dec, Lat, Lon, calcjd, away, 0)
|
|
|
|
|
calcjd = JD - TZ/24
|
|
|
|
|
st := Limit360(SeeStarTime(calcjd)*15 + Lon)
|
|
|
|
|
st := Limit360(ApparentSiderealTime(calcjd)*15 + Lon)
|
|
|
|
|
H := Limit360(st - nra)
|
|
|
|
|
tmp2 := Sin(Lat)*Sin(ndec) + Cos(ndec)*Cos(Lat)*Cos(H)
|
|
|
|
|
return ArcSin(tmp2)
|
|
|
|
@ -1402,8 +1402,8 @@ func GetMoonTZTime(JD, Lon, Lat, TZ float64) float64 { //实际中天时间{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func MoonTimeAngle(JD, Lon, Lat, TZ float64) float64 {
|
|
|
|
|
startime := Limit360(SeeStarTime(JD-TZ/24)*15 + Lon)
|
|
|
|
|
timeangle := startime - HMoonSeeRa(JD-TZ/24, Lon, Lat, TZ)
|
|
|
|
|
startime := Limit360(ApparentSiderealTime(JD-TZ/24)*15 + Lon)
|
|
|
|
|
timeangle := startime - HMoonApparentRa(JD-TZ/24, Lon, Lat, TZ)
|
|
|
|
|
if timeangle < 0 {
|
|
|
|
|
timeangle += 360
|
|
|
|
|
}
|
|
|
|
@ -1458,7 +1458,7 @@ func GetMoonRiseTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 {
|
|
|
|
|
return -2 //沉
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
dec := MoonSeeDec(JD1, Lon, Lat, TZ)
|
|
|
|
|
dec := MoonApparentDec(JD1, Lon, Lat, TZ)
|
|
|
|
|
tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat))
|
|
|
|
|
if math.Abs(tmp) <= 1 && Lat < 85 {
|
|
|
|
|
SJ := (180 - ArcCos(tmp)) / 15
|
|
|
|
@ -1536,7 +1536,7 @@ func GetMoonDownTime(JD, Lon, Lat, TZ, ZS, HEI float64) float64 {
|
|
|
|
|
return -1 //拱
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
dec := MoonSeeDec(JD1, Lon, Lat, TZ)
|
|
|
|
|
dec := MoonApparentDec(JD1, Lon, Lat, TZ)
|
|
|
|
|
tmp := (Sin(An) - Sin(dec)*Sin(Lat)) / (Cos(dec) * Cos(Lat))
|
|
|
|
|
if math.Abs(tmp) <= 1 && Lat < 85 {
|
|
|
|
|
SJ := (ArcCos(tmp)) / 15.0
|
|
|
|
@ -1662,12 +1662,12 @@ func HMoonAway(JD float64) float64 { //'月地距离
|
|
|
|
|
/*
|
|
|
|
|
* @name 月球视黄经
|
|
|
|
|
*/
|
|
|
|
|
func HMoonSeeLo(JD float64) float64 {
|
|
|
|
|
func HMoonApparentLo(JD float64) float64 {
|
|
|
|
|
return HMoonTrueLo(JD) + HJZD(JD)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func HMoonTrueRaDec(JD float64) (float64, float64) {
|
|
|
|
|
MoonLo := HMoonSeeLo(JD)
|
|
|
|
|
MoonLo := HMoonApparentLo(JD)
|
|
|
|
|
MoonBo := HMoonTrueBo(JD)
|
|
|
|
|
tmp := Sin(MoonBo)*Cos(Sita(JD)) + Cos(MoonBo)*Sin(Sita(JD))*Sin(MoonLo)
|
|
|
|
|
res := ArcSin(tmp)
|
|
|
|
@ -1687,7 +1687,7 @@ func HMoonTrueRaDec(JD float64) (float64, float64) {
|
|
|
|
|
* 月球真赤纬
|
|
|
|
|
*/
|
|
|
|
|
func HMoonTrueDec(JD float64) float64 {
|
|
|
|
|
MoonLo := HMoonSeeLo(JD)
|
|
|
|
|
MoonLo := HMoonApparentLo(JD)
|
|
|
|
|
MoonBo := HMoonTrueBo(JD)
|
|
|
|
|
tmp := Sin(MoonBo)*Cos(Sita(JD)) + Cos(MoonBo)*Sin(Sita(JD))*Sin(MoonLo)
|
|
|
|
|
res := ArcSin(tmp)
|
|
|
|
@ -1698,7 +1698,7 @@ func HMoonTrueDec(JD float64) float64 {
|
|
|
|
|
* 月球真赤经
|
|
|
|
|
*/
|
|
|
|
|
func HMoonTrueRa(JD float64) float64 {
|
|
|
|
|
MoonLo := HMoonSeeLo(JD)
|
|
|
|
|
MoonLo := HMoonApparentLo(JD)
|
|
|
|
|
MoonBo := HMoonTrueBo(JD)
|
|
|
|
|
tmp := (Sin(MoonLo)*Cos(Sita(JD)) - Tan(MoonBo)*Sin(Sita(JD))) / Cos(MoonLo)
|
|
|
|
|
tmp = ArcTan(tmp)
|
|
|
|
@ -1716,7 +1716,7 @@ func HMoonTrueRa(JD float64) float64 {
|
|
|
|
|
*
|
|
|
|
|
传入世界时
|
|
|
|
|
*/
|
|
|
|
|
func HMoonSeeRaDec(JD, lon, lat, tz float64) (float64, float64) {
|
|
|
|
|
func HMoonApparentRaDec(JD, lon, lat, tz float64) (float64, float64) {
|
|
|
|
|
jde := TD2UT(JD, true)
|
|
|
|
|
ra := HMoonTrueRa(jde - tz/24)
|
|
|
|
|
dec := HMoonTrueDec(jde - tz/24)
|
|
|
|
@ -1725,7 +1725,7 @@ func HMoonSeeRaDec(JD, lon, lat, tz float64) (float64, float64) {
|
|
|
|
|
return nra, ndec
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func HMoonSeeRa(JD, lon, lat, tz float64) float64 {
|
|
|
|
|
func HMoonApparentRa(JD, lon, lat, tz float64) float64 {
|
|
|
|
|
jde := TD2UT(JD, true)
|
|
|
|
|
ra := HMoonTrueRa(jde - tz/24)
|
|
|
|
|
dec := HMoonTrueDec(jde - tz/24)
|
|
|
|
@ -1733,7 +1733,7 @@ func HMoonSeeRa(JD, lon, lat, tz float64) float64 {
|
|
|
|
|
nra := ZhanXinRa(ra, dec, lat, lon, JD-tz/24, away, 0)
|
|
|
|
|
return nra
|
|
|
|
|
}
|
|
|
|
|
func HMoonSeeDec(JD, lon, lat, tz float64) float64 {
|
|
|
|
|
func HMoonApparentDec(JD, lon, lat, tz float64) float64 {
|
|
|
|
|
jde := TD2UT(JD, true)
|
|
|
|
|
ra := HMoonTrueRa(jde - tz/24)
|
|
|
|
|
dec := HMoonTrueDec(jde - tz/24)
|
|
|
|
|