2026-05-01 22:38:44 +08:00
|
|
|
package basic
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"math"
|
|
|
|
|
|
|
|
|
|
. "b612.me/astro/tools"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Pos
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
URANUS_S_PERIOD = 1 / ((1 / 365.256363004) - (1 / 30799.095))
|
|
|
|
|
uranusEventSearchN = 16
|
|
|
|
|
uranusPhaseCoarseTolerance = 30.0 / 86400.0
|
|
|
|
|
)
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
func uranusSunLongitudeDelta(jde, degree float64, filter bool, instances ...*Instance) float64 {
|
|
|
|
|
inst := instanceValue(instances)
|
|
|
|
|
|
|
|
|
|
sub := Limit360(Limit360(UranusApparentLoWithInstance(jde, inst)-HSunApparentLoWithInstance(jde, inst)) - degree)
|
2026-05-01 22:38:44 +08:00
|
|
|
if filter {
|
|
|
|
|
if sub > 180 {
|
|
|
|
|
sub -= 360
|
|
|
|
|
}
|
|
|
|
|
if sub < -180 {
|
|
|
|
|
sub += 360
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return sub
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
func uranusSunLongitudeDeltaN(jde, degree float64, filter bool, n int, instances ...*Instance) float64 {
|
|
|
|
|
inst := instanceValue(instances)
|
|
|
|
|
|
|
|
|
|
sub := Limit360(Limit360(UranusApparentLoNWithInstance(jde, n, inst)-HSunApparentLoNWithInstance(jde, n, inst)) - degree)
|
2026-05-01 22:38:44 +08:00
|
|
|
if filter {
|
|
|
|
|
if sub > 180 {
|
|
|
|
|
sub -= 360
|
|
|
|
|
}
|
|
|
|
|
if sub < -180 {
|
|
|
|
|
sub += 360
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return sub
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
func uranusRADerivative(jde, delta float64, instances ...*Instance) float64 {
|
|
|
|
|
inst := instanceValue(instances)
|
|
|
|
|
|
|
|
|
|
sub := UranusApparentRaWithInstance(jde+delta, inst) - UranusApparentRaWithInstance(jde-delta, inst)
|
2026-05-22 12:24:41 +08:00
|
|
|
if sub > 180 {
|
|
|
|
|
sub -= 360
|
|
|
|
|
}
|
|
|
|
|
if sub < -180 {
|
|
|
|
|
sub += 360
|
|
|
|
|
}
|
|
|
|
|
return sub / (2 * delta)
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
func uranusRADerivativeN(jde, delta float64, n int, instances ...*Instance) float64 {
|
|
|
|
|
inst := instanceValue(instances)
|
|
|
|
|
|
|
|
|
|
sub := UranusApparentRaNWithInstance(jde+delta, n, inst) - UranusApparentRaNWithInstance(jde-delta, n, inst)
|
2026-05-22 12:24:41 +08:00
|
|
|
if sub > 180 {
|
|
|
|
|
sub -= 360
|
|
|
|
|
}
|
|
|
|
|
if sub < -180 {
|
|
|
|
|
sub += 360
|
|
|
|
|
}
|
|
|
|
|
return sub / (2 * delta)
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
func uranusConjunctionFull(jde, degree float64, next uint8, instances ...*Instance) float64 {
|
|
|
|
|
inst := instanceValue(instances)
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
//0=last 1=next
|
2026-08-06 12:00:56 +08:00
|
|
|
if !isFiniteFloat(jde) || !isFiniteFloat(degree) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-05-01 22:38:44 +08:00
|
|
|
daysPerDegree := URANUS_S_PERIOD / 360
|
2026-10-15 23:54:15 +08:00
|
|
|
currentDelta := uranusSunLongitudeDelta(jde, degree, false, inst)
|
2026-05-01 22:38:44 +08:00
|
|
|
if next == 0 {
|
|
|
|
|
jde -= (360 - currentDelta) * daysPerDegree
|
|
|
|
|
} else {
|
|
|
|
|
jde += daysPerDegree * currentDelta
|
|
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
estimateJDE := jde
|
2026-08-06 12:00:56 +08:00
|
|
|
converged := false
|
|
|
|
|
for i := 0; i < eventNewtonMaxIterations; i++ {
|
2026-09-23 18:55:12 +08:00
|
|
|
prevJDE := estimateJDE
|
2026-10-15 23:54:15 +08:00
|
|
|
longitudeDelta := uranusSunLongitudeDelta(prevJDE, degree, true, inst)
|
|
|
|
|
longitudeSlope := (uranusSunLongitudeDelta(prevJDE+0.000005, degree, true, inst) - uranusSunLongitudeDelta(prevJDE-0.000005, degree, true, inst)) / 0.00001
|
2026-09-23 18:55:12 +08:00
|
|
|
nextJD := prevJDE - longitudeDelta/longitudeSlope
|
|
|
|
|
estimateJDE = nextJD
|
|
|
|
|
if math.Abs(nextJD-prevJDE) <= 0.00001 {
|
2026-08-06 12:00:56 +08:00
|
|
|
converged = true
|
2026-05-01 22:38:44 +08:00
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-08-06 12:00:56 +08:00
|
|
|
if !converged {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
return TT2UTC(estimateJDE)
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
func uranusConjunction(jde, degree float64, next uint8, instances ...*Instance) float64 {
|
|
|
|
|
inst := instanceValue(instances)
|
|
|
|
|
|
2026-05-01 22:38:44 +08:00
|
|
|
//0=last 1=next
|
2026-08-06 12:00:56 +08:00
|
|
|
if !isFiniteFloat(jde) || !isFiniteFloat(degree) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-05-01 22:38:44 +08:00
|
|
|
daysPerDegree := URANUS_S_PERIOD / 360
|
2026-10-15 23:54:15 +08:00
|
|
|
currentDelta := uranusSunLongitudeDelta(jde, degree, false, inst)
|
2026-05-01 22:38:44 +08:00
|
|
|
if next == 0 {
|
|
|
|
|
jde -= (360 - currentDelta) * daysPerDegree
|
|
|
|
|
} else {
|
|
|
|
|
jde += daysPerDegree * currentDelta
|
|
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
estimateJDE := jde
|
2026-08-06 12:00:56 +08:00
|
|
|
converged := false
|
|
|
|
|
for i := 0; i < eventNewtonMaxIterations; i++ {
|
2026-09-23 18:55:12 +08:00
|
|
|
prevJDE := estimateJDE
|
2026-10-15 23:54:15 +08:00
|
|
|
longitudeDelta := uranusSunLongitudeDeltaN(prevJDE, degree, true, uranusEventSearchN, inst)
|
|
|
|
|
longitudeSlope := (uranusSunLongitudeDeltaN(prevJDE+0.000005, degree, true, uranusEventSearchN, inst) - uranusSunLongitudeDeltaN(prevJDE-0.000005, degree, true, uranusEventSearchN, inst)) / 0.00001
|
2026-09-23 18:55:12 +08:00
|
|
|
nextJD := prevJDE - longitudeDelta/longitudeSlope
|
|
|
|
|
estimateJDE = nextJD
|
|
|
|
|
if math.Abs(nextJD-prevJDE) <= uranusPhaseCoarseTolerance {
|
2026-08-06 12:00:56 +08:00
|
|
|
converged = true
|
2026-05-01 22:38:44 +08:00
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-08-06 12:00:56 +08:00
|
|
|
if !converged {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
|
|
|
|
converged = false
|
|
|
|
|
for i := 0; i < eventNewtonMaxIterations; i++ {
|
2026-09-23 18:55:12 +08:00
|
|
|
prevJDE := estimateJDE
|
2026-10-15 23:54:15 +08:00
|
|
|
longitudeDelta := uranusSunLongitudeDelta(prevJDE, degree, true, inst)
|
|
|
|
|
longitudeSlope := (uranusSunLongitudeDelta(prevJDE+0.000005, degree, true, inst) - uranusSunLongitudeDelta(prevJDE-0.000005, degree, true, inst)) / 0.00001
|
2026-09-23 18:55:12 +08:00
|
|
|
nextJD := prevJDE - longitudeDelta/longitudeSlope
|
|
|
|
|
estimateJDE = nextJD
|
|
|
|
|
if math.Abs(nextJD-prevJDE) <= 0.00001 {
|
2026-08-06 12:00:56 +08:00
|
|
|
converged = true
|
2026-05-01 22:38:44 +08:00
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-08-06 12:00:56 +08:00
|
|
|
if !converged {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
return TT2UTC(estimateJDE)
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// LastUranusConjunctionWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func LastUranusConjunctionWithInstance(jde float64, inst *Instance) float64 {
|
|
|
|
|
return inclusiveLastPhaseEvent(jde, 0, func(jde, degree float64, next uint8) float64 {
|
|
|
|
|
return uranusConjunction(jde, degree, next, inst)
|
|
|
|
|
})
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// NextUranusConjunctionWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func NextUranusConjunctionWithInstance(jde float64, inst *Instance) float64 {
|
|
|
|
|
return inclusiveNextPhaseEvent(jde, 0, func(jde, degree float64, next uint8) float64 {
|
|
|
|
|
return uranusConjunction(jde, degree, next, inst)
|
|
|
|
|
})
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// LastUranusOppositionWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func LastUranusOppositionWithInstance(jde float64, inst *Instance) float64 {
|
|
|
|
|
return inclusiveLastPhaseEvent(jde, 180, func(jde, degree float64, next uint8) float64 {
|
|
|
|
|
return uranusConjunction(jde, degree, next, inst)
|
|
|
|
|
})
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// NextUranusOppositionWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func NextUranusOppositionWithInstance(jde float64, inst *Instance) float64 {
|
|
|
|
|
return inclusiveNextPhaseEvent(jde, 180, func(jde, degree float64, next uint8) float64 {
|
|
|
|
|
return uranusConjunction(jde, degree, next, inst)
|
|
|
|
|
})
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// NextUranusEasternQuadratureWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func NextUranusEasternQuadratureWithInstance(jde float64, inst *Instance) float64 {
|
|
|
|
|
return inclusiveNextPhaseEvent(jde, 90, func(jde, degree float64, next uint8) float64 {
|
|
|
|
|
return uranusConjunction(jde, degree, next, inst)
|
|
|
|
|
})
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// LastUranusEasternQuadratureWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func LastUranusEasternQuadratureWithInstance(jde float64, inst *Instance) float64 {
|
|
|
|
|
return inclusiveLastPhaseEvent(jde, 90, func(jde, degree float64, next uint8) float64 {
|
|
|
|
|
return uranusConjunction(jde, degree, next, inst)
|
|
|
|
|
})
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// NextUranusWesternQuadratureWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func NextUranusWesternQuadratureWithInstance(jde float64, inst *Instance) float64 {
|
|
|
|
|
return inclusiveNextPhaseEvent(jde, 270, func(jde, degree float64, next uint8) float64 {
|
|
|
|
|
return uranusConjunction(jde, degree, next, inst)
|
|
|
|
|
})
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// LastUranusWesternQuadratureWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func LastUranusWesternQuadratureWithInstance(jde float64, inst *Instance) float64 {
|
|
|
|
|
return inclusiveLastPhaseEvent(jde, 270, func(jde, degree float64, next uint8) float64 {
|
|
|
|
|
return uranusConjunction(jde, degree, next, inst)
|
|
|
|
|
})
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
func uranusRetrogradeAroundOpposition(oppositionJD float64, searchBeforeOpposition bool, instances ...*Instance) float64 {
|
|
|
|
|
inst := instanceValue(instances)
|
|
|
|
|
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(oppositionJD) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
oppositionTT := UTC2TT(oppositionJD)
|
2026-05-22 12:24:41 +08:00
|
|
|
startTT := oppositionTT
|
|
|
|
|
endTT := oppositionTT
|
2026-05-01 22:38:44 +08:00
|
|
|
if searchBeforeOpposition {
|
2026-10-15 23:54:15 +08:00
|
|
|
easternQuadratureUT := uranusConjunction(oppositionTT, 90, 0, inst)
|
2026-09-23 18:55:12 +08:00
|
|
|
startTT = UTC2TT(easternQuadratureUT)
|
2026-05-01 22:38:44 +08:00
|
|
|
} else {
|
2026-10-15 23:54:15 +08:00
|
|
|
westernQuadratureUT := uranusConjunction(oppositionTT, 270, 1, inst)
|
2026-09-23 18:55:12 +08:00
|
|
|
endTT = UTC2TT(westernQuadratureUT)
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
2026-09-23 18:55:12 +08:00
|
|
|
bestJDE := zeroEventInWindow(startTT, endTT, 2.0, 2.0, 30.0/86400.0, func(jd float64) float64 {
|
2026-10-15 23:54:15 +08:00
|
|
|
return uranusRADerivativeN(jd, stationDerivativeStepDay, uranusEventSearchN, inst)
|
2026-05-22 12:24:41 +08:00
|
|
|
}, func(jd float64) float64 {
|
2026-10-15 23:54:15 +08:00
|
|
|
return uranusRADerivative(jd, stationDerivativeStepDay, inst)
|
2026-05-01 22:38:44 +08:00
|
|
|
})
|
2026-09-23 18:55:12 +08:00
|
|
|
return TT2UTC(bestJDE)
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// NextUranusRetrogradeToProgradeWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func NextUranusRetrogradeToProgradeWithInstance(jde float64, inst *Instance) float64 {
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(jde) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
lastOppositionJD := uranusConjunctionFull(jde, 180, 0, inst)
|
|
|
|
|
date := uranusRetrogradeAroundOpposition(lastOppositionJD, false, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if isFiniteFloat(date) && stationUTQueryAfterOrEqual(date, jde) {
|
2026-05-22 12:24:41 +08:00
|
|
|
return date
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
nextOppositionJD := uranusConjunctionFull(jde, 180, 1, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(nextOppositionJD) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
date = uranusRetrogradeAroundOpposition(nextOppositionJD, false, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(date) || !stationUTQueryAfterOrEqual(date, jde) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
|
|
|
|
return date
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// LastUranusRetrogradeToProgradeWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func LastUranusRetrogradeToProgradeWithInstance(jde float64, inst *Instance) float64 {
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(jde) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
lastOppositionJD := uranusConjunctionFull(jde, 180, 0, inst)
|
|
|
|
|
date := uranusRetrogradeAroundOpposition(lastOppositionJD, false, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if isFiniteFloat(date) && stationUTQueryBeforeOrEqual(date, jde) {
|
2026-05-22 12:24:41 +08:00
|
|
|
return date
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(lastOppositionJD) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
previousOppositionJD := uranusConjunctionFull(eventUTLastQueryTT(lastOppositionJD), 180, 0, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(previousOppositionJD) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
date = uranusRetrogradeAroundOpposition(previousOppositionJD, false, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(date) || !stationUTQueryBeforeOrEqual(date, jde) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
|
|
|
|
return date
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// NextUranusProgradeToRetrogradeWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func NextUranusProgradeToRetrogradeWithInstance(jde float64, inst *Instance) float64 {
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(jde) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
nextOppositionJD := uranusConjunctionFull(jde, 180, 1, inst)
|
|
|
|
|
date := uranusRetrogradeAroundOpposition(nextOppositionJD, true, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if isFiniteFloat(date) && stationUTQueryAfterOrEqual(date, jde) {
|
2026-05-22 12:24:41 +08:00
|
|
|
return date
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(nextOppositionJD) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
followingOppositionJD := uranusConjunctionFull(eventUTNextQueryTT(nextOppositionJD), 180, 1, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(followingOppositionJD) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
date = uranusRetrogradeAroundOpposition(followingOppositionJD, true, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(date) || !stationUTQueryAfterOrEqual(date, jde) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
|
|
|
|
return date
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 23:54:15 +08:00
|
|
|
// LastUranusProgradeToRetrogradeWithInstance 用指定星历实例求值;inst 为 nil 时用进程当前模型 / evaluation with an explicit instance; nil uses the process model.
|
|
|
|
|
func LastUranusProgradeToRetrogradeWithInstance(jde float64, inst *Instance) float64 {
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(jde) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
nextOppositionJD := uranusConjunctionFull(jde, 180, 1, inst)
|
|
|
|
|
date := uranusRetrogradeAroundOpposition(nextOppositionJD, true, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if isFiniteFloat(date) && stationUTQueryBeforeOrEqual(date, jde) {
|
2026-05-22 12:24:41 +08:00
|
|
|
return date
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(nextOppositionJD) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
lastOppositionJD := uranusConjunctionFull(jde, 180, 0, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(lastOppositionJD) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
2026-10-15 23:54:15 +08:00
|
|
|
date = uranusRetrogradeAroundOpposition(lastOppositionJD, true, inst)
|
2026-09-17 12:27:40 +08:00
|
|
|
if !isFiniteFloat(date) || !stationUTQueryBeforeOrEqual(date, jde) {
|
|
|
|
|
return math.NaN()
|
|
|
|
|
}
|
|
|
|
|
return date
|
2026-05-01 22:38:44 +08:00
|
|
|
}
|