Exemplo n.º 1
0
// Bennett returns refraction for obtaining true altitude.
//
// h0 must be a measured apparent altitude of a celestial body in radians.
//
// Results are accurate to .07 arc min from horizon to zenith.
//
// Result is refraction to be subtracted from h0 to obtain the true altitude
// of the body.
func Bennett(h0 unit.Angle) unit.Angle {
	// (16.3) p. 106
	hd := h0.Deg()
	return unit.AngleFromMin(1 / math.Tan((hd+7.31/(hd+4.4))*math.Pi/180))
}
Exemplo n.º 2
0
// Saemundsson returns refraction for obtaining apparent altitude.
//
// h must be a computed true "airless" altitude of a celestial body in radians.
//
// Result is refraction to be added to h to obtain the apparent altitude
// of the body.
//
// Results are consistent with Bennett to within 4 arc sec.
func Saemundsson(h unit.Angle) unit.Angle {
	// (16.4) p. 106
	hd := h.Deg()
	return unit.AngleFromMin(1.02 / math.Tan((hd+10.3/(hd+5.11))*math.Pi/180))
}
Exemplo n.º 3
0
// Venus computes the visual magnitude of Venus.
//
// Argument r is the planet's distance from the Sun, Δ the distance from Earth,
// and i the phase angle.
func Venus(r, Δ float64, i unit.Angle) float64 {
	id := i.Deg()
	return -4 + 5*math.Log10(r*Δ) + (.01322+.0000004247*id*id)*id
}
Exemplo n.º 4
0
// Mars computes the visual magnitude of Mars.
//
// Argument r is the planet's distance from the Sun, Δ the distance from Earth,
// and i the phase angle.
func Mars(r, Δ float64, i unit.Angle) float64 {
	return -1.3 + 5*math.Log10(r*Δ) + .01486*i.Deg()
}
Exemplo n.º 5
0
// Mercury computes the visual magnitude of Mercury.
//
// Argument r is the planet's distance from the Sun, Δ the distance from Earth,
// and i the phase angle.
func Mercury(r, Δ float64, i unit.Angle) float64 {
	s := i.Deg() - 50
	return 1.16 + 5*math.Log10(r*Δ) + (.02838+.0001023*s)*s
}
Exemplo n.º 6
0
// Jupiter84 computes the visual magnitude of Jupiter.
//
// The formula is that adopted in "Astronomical Almanac" in 1984.
//
// Argument r is the planet's distance from the Sun, Δ the distance from Earth,
// and i the phase angle.
func Jupiter84(r, Δ float64, i unit.Angle) float64 {
	return -9.4 + 5*math.Log10(r*Δ) + .005*i.Deg()
}
Exemplo n.º 7
0
// Mars84 computes the visual magnitude of Mars.
//
// The formula is that adopted in "Astronomical Almanac" in 1984.
//
// Argument r is the planet's distance from the Sun, Δ the distance from Earth,
// and i the phase angle.
func Mars84(r, Δ float64, i unit.Angle) float64 {
	return -1.52 + 5*math.Log10(r*Δ) + .016*i.Deg()
}
Exemplo n.º 8
0
// Venus84 computes the visual magnitude of Venus.
//
// The formula is that adopted in "Astronomical Almanac" in 1984.
//
// Argument r is the planet's distance from the Sun, Δ the distance from Earth,
// and i the phase angle.
func Venus84(r, Δ float64, i unit.Angle) float64 {
	return base.Horner(i.Deg(), -4.4+5*math.Log10(r*Δ),
		.0009, -.000239, .00000065)
}
Exemplo n.º 9
0
// Mercury84 computes the visual magnitude of Mercury.
//
// The formula is that adopted in "Astronomical Almanac" in 1984.
//
// Argument r is the planet's distance from the Sun, Δ the distance from Earth,
// and i the phase angle.
func Mercury84(r, Δ float64, i unit.Angle) float64 {
	return base.Horner(i.Deg(), -.42+5*math.Log10(r*Δ),
		.038, -.000273, .000002)
}