2019-10-24 10:44:21 +08:00
|
|
|
package mercury
|
|
|
|
|
|
|
|
|
|
import (
|
2022-05-16 20:42:15 +08:00
|
|
|
"errors"
|
|
|
|
|
"time"
|
2026-10-15 23:54:15 +08:00
|
|
|
|
|
|
|
|
"b612.me/astro/basic"
|
|
|
|
|
"b612.me/astro/calendar"
|
2019-10-24 10:44:21 +08:00
|
|
|
)
|
|
|
|
|
|
2022-05-16 20:42:15 +08:00
|
|
|
var (
|
|
|
|
|
ERR_MERCURY_NEVER_RISE = errors.New("ERROR:极夜,水星今日永远在地平线下!")
|
2025-09-08 10:37:46 +08:00
|
|
|
ERR_MERCURY_NEVER_SET = errors.New("ERROR:极昼,水星今日永远在地平线上!")
|
2025-09-08 10:59:04 +08:00
|
|
|
// ERR_MERCURY_NEVER_DOWN deprecated: -- use ERR_MERCURY_NEVER_SET instead
|
2025-09-08 10:37:46 +08:00
|
|
|
ERR_MERCURY_NEVER_DOWN = ERR_MERCURY_NEVER_SET
|
2022-05-16 20:42:15 +08:00
|
|
|
)
|
|
|
|
|
|
2026-09-23 18:55:12 +08:00
|
|
|
func riseSetResult(date time.Time, jd float64, err error) (time.Time, error) {
|
2026-05-01 22:38:44 +08:00
|
|
|
if err != nil {
|
|
|
|
|
switch {
|
|
|
|
|
case errors.Is(err, basic.ErrNeverRise):
|
|
|
|
|
return time.Time{}, ERR_MERCURY_NEVER_RISE
|
|
|
|
|
case errors.Is(err, basic.ErrNeverSet):
|
|
|
|
|
return time.Time{}, ERR_MERCURY_NEVER_SET
|
|
|
|
|
default:
|
|
|
|
|
return time.Time{}, err
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
_, offset := date.Zone()
|
|
|
|
|
return basic.JD2DateByZone(jd-float64(offset)/86400, date.Location(), false), nil
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ApparentLo 视黄经 / apparent ecliptic longitude.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) ApparentLo(date time.Time) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
jd := calendar.Date2JD(date.UTC())
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryApparentLoWithInstance(basic.UTC2TT(jd), module.inst)
|
2019-10-24 10:44:21 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// ApparentBo 视黄纬 / apparent ecliptic latitude.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) ApparentBo(date time.Time) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
jd := calendar.Date2JD(date.UTC())
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryApparentBoWithInstance(basic.UTC2TT(jd), module.inst)
|
2019-10-24 10:44:21 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// ApparentRa 视赤经 / apparent right ascension.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) ApparentRa(date time.Time) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
jd := calendar.Date2JD(date.UTC())
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryApparentRaWithInstance(basic.UTC2TT(jd), module.inst)
|
2019-10-24 10:44:21 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// ApparentDec 视赤纬 / apparent declination.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) ApparentDec(date time.Time) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
jd := calendar.Date2JD(date.UTC())
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryApparentDecWithInstance(basic.UTC2TT(jd), module.inst)
|
2019-10-24 10:44:21 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// ApparentRaDec 视赤经、视赤纬 / apparent right ascension and declination.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) ApparentRaDec(date time.Time) (float64, float64) {
|
2026-09-23 18:55:12 +08:00
|
|
|
jd := calendar.Date2JD(date.UTC())
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryApparentRaDecWithInstance(basic.UTC2TT(jd), module.inst)
|
2019-10-24 10:44:21 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// ApparentMagnitude 视星等 / apparent magnitude.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) ApparentMagnitude(date time.Time) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
jd := calendar.Date2JD(date.UTC())
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryMagWithInstance(basic.UTC2TT(jd), module.inst)
|
2019-10-24 10:44:21 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// EarthDistance 地心距离 / Earth distance.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) EarthDistance(date time.Time) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
jd := calendar.Date2JD(date.UTC())
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.EarthMercuryAwayWithInstance(basic.UTC2TT(jd), module.inst)
|
2019-10-24 10:44:21 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// SunDistance 日心距离 / Sun distance.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) SunDistance(date time.Time) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
jd := calendar.Date2JD(date.UTC())
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.PlanetCoordinateWithInstance(1, 2, basic.UTC2TT(jd), module.inst)
|
2019-10-24 10:44:21 +08:00
|
|
|
}
|
2022-05-16 20:42:15 +08:00
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// Altitude 站心视高度角,不含大气折射 / topocentric apparent altitude without refraction.
|
|
|
|
|
func (module *Mercury) Altitude(date time.Time, lon, lat float64) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
localJD := basic.Date2JD(date)
|
2022-05-16 20:42:15 +08:00
|
|
|
_, loc := date.Zone()
|
|
|
|
|
timezone := float64(loc) / 3600.0
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryHeightWithInstance(localJD, lon, lat, timezone, module.inst)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// Zenith 天顶距 / zenith distance.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) Zenith(date time.Time, lon, lat float64) float64 {
|
|
|
|
|
return 90 - module.Altitude(date, lon, lat)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Azimuth 站心方位角 / topocentric azimuth.
|
|
|
|
|
func (module *Mercury) Azimuth(date time.Time, lon, lat float64) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
localJD := basic.Date2JD(date)
|
2022-05-16 20:42:15 +08:00
|
|
|
_, loc := date.Zone()
|
|
|
|
|
timezone := float64(loc) / 3600.0
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryAzimuthWithInstance(localJD, lon, lat, timezone, module.inst)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// HourAngle 地心视时角,不含站心视差 / geocentric apparent hour angle without topocentric parallax.
|
|
|
|
|
func (module *Mercury) HourAngle(date time.Time, lon float64) float64 {
|
2026-09-23 18:55:12 +08:00
|
|
|
localJD := basic.Date2JD(date)
|
2022-05-16 20:42:15 +08:00
|
|
|
_, loc := date.Zone()
|
|
|
|
|
timezone := float64(loc) / 3600.0
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.MercuryHourAngleWithInstance(localJD, lon, timezone, module.inst)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// CulminationTime 中天时刻 / culmination time.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) CulminationTime(date time.Time, lon float64) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
date = time.Date(date.Year(), date.Month(), date.Day(), 0, 0, 0, 0, date.Location())
|
|
|
|
|
localJD := basic.Date2JD(date)
|
2022-05-16 20:42:15 +08:00
|
|
|
_, loc := date.Zone()
|
|
|
|
|
timezone := float64(loc) / 3600.0
|
2026-10-15 23:54:15 +08:00
|
|
|
calcJD := basic.MercuryCulminationTimeWithInstance(localJD, lon, timezone, module.inst) - timezone/24.00
|
2026-09-23 18:55:12 +08:00
|
|
|
return basic.JD2DateByZone(calcJD, date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// RiseTime 升起时间 / rise time.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) RiseTime(date time.Time, lon, lat, height float64, aero bool) (time.Time, error) {
|
2022-05-16 20:42:15 +08:00
|
|
|
var aeroFloat float64
|
|
|
|
|
if aero {
|
|
|
|
|
aeroFloat = 1
|
|
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
date = time.Date(date.Year(), date.Month(), date.Day(), 0, 0, 0, 0, date.Location())
|
|
|
|
|
localJD := basic.Date2JD(date)
|
2022-05-16 20:42:15 +08:00
|
|
|
_, loc := date.Zone()
|
|
|
|
|
timezone := float64(loc) / 3600.0
|
2026-10-15 23:54:15 +08:00
|
|
|
riseJD, err := basic.MercuryRiseTimeWithInstance(localJD, lon, lat, timezone, aeroFloat, height, module.inst)
|
2026-09-23 18:55:12 +08:00
|
|
|
return riseSetResult(date, riseJD, err)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// DownTime 落下时间别名 / deprecated set-time alias.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) DownTime(date time.Time, lon, lat, height float64, aero bool) (time.Time, error) {
|
|
|
|
|
return module.SetTime(date, lon, lat, height, aero)
|
2025-09-08 10:37:46 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// SetTime 落下时间 / set time.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) SetTime(date time.Time, lon, lat, height float64, aero bool) (time.Time, error) {
|
2022-05-16 20:42:15 +08:00
|
|
|
var aeroFloat float64
|
|
|
|
|
if aero {
|
|
|
|
|
aeroFloat = 1
|
|
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
date = time.Date(date.Year(), date.Month(), date.Day(), 0, 0, 0, 0, date.Location())
|
|
|
|
|
localJD := basic.Date2JD(date)
|
2022-05-16 20:42:15 +08:00
|
|
|
_, loc := date.Zone()
|
|
|
|
|
timezone := float64(loc) / 3600.0
|
2026-10-15 23:54:15 +08:00
|
|
|
riseJD, err := basic.MercurySetTimeWithInstance(localJD, lon, lat, timezone, aeroFloat, height, module.inst)
|
2026-09-23 18:55:12 +08:00
|
|
|
return riseSetResult(date, riseJD, err)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastConjunction 上一次合日 / previous conjunction with the Sun.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastConjunction(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercuryConjunctionWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextConjunction 下一次合日 / next conjunction with the Sun.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextConjunction(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercuryConjunctionWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastInferiorConjunction 上一次下合 / previous inferior conjunction.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastInferiorConjunction(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercuryInferiorConjunctionInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextInferiorConjunction 下一次下合 / next inferior conjunction.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextInferiorConjunction(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercuryInferiorConjunctionInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastSuperiorConjunction 上一次上合 / previous superior conjunction.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastSuperiorConjunction(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercurySuperiorConjunctionInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextSuperiorConjunction 下一次上合 / next superior conjunction.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextSuperiorConjunction(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercurySuperiorConjunctionInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastRetrograde 上一次留 / previous stationary point.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastRetrograde(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercuryRetrogradeInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextRetrograde 下一次留 / next stationary point.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextRetrograde(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercuryRetrogradeInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastProgradeToRetrograde 上一次顺行转逆行留 / previous station from prograde to retrograde.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastProgradeToRetrograde(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercuryProgradeToRetrogradeInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextProgradeToRetrograde 下一次顺行转逆行留 / next station from prograde to retrograde.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextProgradeToRetrograde(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercuryProgradeToRetrogradeInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastRetrogradeToPrograde 上一次逆行转顺行留 / previous station from retrograde to prograde.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastRetrogradeToPrograde(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercuryRetrogradeToProgradeInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextRetrogradeToPrograde 下一次逆行转顺行留 / next station from retrograde to prograde.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextRetrogradeToPrograde(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercuryRetrogradeToProgradeInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastGreatestElongation 上一次大距 / previous greatest elongation.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastGreatestElongation(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercuryGreatestElongationInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextGreatestElongation 下一次大距 / next greatest elongation.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextGreatestElongation(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercuryGreatestElongationInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastGreatestElongationEast 上一次东大距 / previous greatest eastern elongation.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastGreatestElongationEast(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercuryGreatestElongationEastInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextGreatestElongationEast 下一次东大距 / next greatest eastern elongation.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextGreatestElongationEast(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercuryGreatestElongationEastInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// LastGreatestElongationWest 上一次西大距 / previous greatest western elongation.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) LastGreatestElongationWest(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.LastMercuryGreatestElongationWestInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
// NextGreatestElongationWest 下一次西大距 / next greatest western elongation.
|
2026-10-15 23:54:15 +08:00
|
|
|
func (module *Mercury) NextGreatestElongationWest(date time.Time) time.Time {
|
2026-09-23 18:55:12 +08:00
|
|
|
jde := basic.UTC2TT(basic.Date2JD(date.UTC()))
|
2026-10-15 23:54:15 +08:00
|
|
|
return basic.JD2DateByZone(basic.NextMercuryGreatestElongationWestInclusiveWithInstance(jde, module.inst), date.Location(), false)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ApparentMagnitude2018 视星等(Mallama & Hilton 2018 模型)/ apparent magnitude, Mallama & Hilton 2018 model.
|
|
|
|
|
func (module *Mercury) ApparentMagnitude2018(date time.Time) float64 {
|
|
|
|
|
jd := calendar.Date2JD(date.UTC())
|
|
|
|
|
return basic.MercuryMag2018WithInstance(basic.UTC2TT(jd), module.inst)
|
2022-05-16 20:42:15 +08:00
|
|
|
}
|