本文整理汇总了Golang中github.com/soniakeys/unit.Angle.Deg方法的典型用法代码示例。如果您正苦于以下问题:Golang Angle.Deg方法的具体用法?Golang Angle.Deg怎么用?Golang Angle.Deg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/soniakeys/unit.Angle
的用法示例。
在下文中一共展示了Angle.Deg方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Bennett
// 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))
}
示例2: Saemundsson
// 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))
}
示例3: Venus
// 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
}
示例4: Mars
// 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()
}
示例5: Mercury
// 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
}
示例6: Jupiter84
// 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()
}
示例7: Mars84
// 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()
}
示例8: Venus84
// 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)
}
示例9: Mercury84
// 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)
}