天文算法16

第十八章 行星会合 Planetary Conjunctions

1. 定义

In astronomy, a conjunction occurs when two astronomical objects or spacecraft have either the same right ascension or the same ecliptic longitude, usually as observed from Earth.
当两个天体位于同一赤经(黄经)时,我们称之为会合。会合并不意味着最小角距离。

2. 计算会合的时间点以及纬度差

由定义可知,当两天体的经度差为0时,我们称之为会合。
所以只要根据观测数据对经度差进行插值,再求零值对应的时间点即为会合时间。再根据这个时间点插值计算纬度差即可。

  • 两个都为移动的天体(行星)
// Planetary computes a conjunction between two moving objects, such as planets.
//
// Conjunction is found with interpolation against length 5 ephemerides.
//
// T1, t5 are times of first and last rows of ephemerides.  The scale is
// arbitrary.
//
// R1, d1 is the ephemeris of the first object.  The columns may be celestial
// coordinates in right ascension and declination or ecliptic coordinates in
// longitude and latitude.
//
// R2, d2 is the ephemeris of the second object, in the same frame as the first.
//
// Return value t is time of conjunction in the scale of t1, t5.
// Δd is the amount that object 2 was "above" object 1 at the time of
// conjunction.
// 计算两个移动的天体赤经(黄经)相同的时间点 t 和该时刻的赤纬(黄纬)差
func Planetary(t1, t5 float64, r1, d1, r2, d2 []unit.Angle) (t float64, Δd unit.Angle, err error) {
	if len(r1) != 5 || len(d1) != 5 || len(r2) != 5 || len(d2) != 5 {
		err = errors.New("Five rows required in ephemerides")
		return
	}
	dr := make([]float64, 5, 10)
	dd := dr[5:10]
	for i, r := range r1 {
		dr[i] = (r2[i] - r).Rad()
		dd[i] = (d2[i] - d1[i]).Rad()
	}
	return conj(t1, t5, dr, dd)
}

func conj(t1, t5 float64, dr, dd []float64) (t float64, Δd unit.Angle, err error) {
	var l5 *interp.Len5
	if l5, err = interp.NewLen5(t1, t5, dr); err != nil {
		return
	}
	if t, err = l5.Zero(true); err != nil { // 计算经度重合时的时间点 t
		return
	}
	if l5, err = interp.NewLen5(t1, t5, dd); err != nil {
		return
	}
	ΔdRad, err := l5.InterpolateXStrict(t) // 插值计算经度重合时的纬度差
	return t, unit.Angle(ΔdRad), err
}

  • 一个为观测时间范围内默认不动的天体(恒星)
// Stellar computes a conjunction between a moving and non-moving object.
//
// Arguments and return values same as with Planetary, except the non-moving
// object is r1, d1.  The ephemeris of the moving object is r2, d2.
// 计算一个移动的天体和一个在观测时间范围内默认为不动的天体(如恒星)赤经(黄经)相同的时间点 t 和该时刻的赤纬(黄纬)差
func Stellar(t1, t5 float64, r1, d1 unit.Angle, r2, d2 []unit.Angle) (t float64, Δd unit.Angle, err error) {
	if len(r2) != 5 || len(d2) != 5 {
		err = errors.New("Five rows required in ephemeris")
		return
	}
	dr := make([]float64, 5, 10)
	dd := dr[5:10]
	for i, r := range r2 {
		dr[i] = (r - r1).Rad()
		dd[i] = (d2[i] - d1).Rad()
	}
	return conj(t1, t5, dr, dd)
}

相关

下一页
上一页
comments powered by Disqus