Documentation
¶
Overview ¶
Illum: Chapter 41, Illuminated Fraction of the Disk and Magnitude of a Planet.
Also see functions Illuminated and Limb in package base. While this chapter title includes "illumnated fraction," the function for computing illuminated fraction given a phase angle is base.Illuminated. Base.Limb is the function mentioned at the bottom of p. 283.
Index ¶
- func Fraction(r, Δ, R float64) float64
- func FractionVenus(jde float64) float64
- func Jupiter(r, Δ float64) float64
- func Jupiter84(r, Δ float64, i unit.Angle) float64
- func Mars(r, Δ float64, i unit.Angle) float64
- func Mars84(r, Δ float64, i unit.Angle) float64
- func Mercury(r, Δ float64, i unit.Angle) float64
- func Mercury84(r, Δ float64, i unit.Angle) float64
- func Neptune(r, Δ float64) float64
- func Neptune84(r, Δ float64) float64
- func PhaseAngle(r, Δ, R float64) unit.Angle
- func PhaseAngle2(L, B unit.Angle, R float64, L0 unit.Angle, R0, Δ float64) unit.Angle
- func PhaseAngle3(L, B unit.Angle, x, y, z, Δ float64) unit.Angle
- func Pluto84(r, Δ float64) float64
- func Saturn(r, Δ float64, B, ΔU unit.Angle) float64
- func Saturn84(r, Δ float64, B, ΔU unit.Angle) float64
- func Uranus(r, Δ float64) float64
- func Uranus84(r, Δ float64) float64
- func Venus(r, Δ float64, i unit.Angle) float64
- func Venus84(r, Δ float64, i unit.Angle) float64
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fraction ¶
Fraction computes the illuminated fraction of the disk of a planet. 行星圆面被照亮比例
Argument r is planet's distance to Sun, Δ its distance to Earth, and R the distance from Sun to Earth. All distances in AU.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/illum"
)
func main() {
// Example 41.a, p. 284
k := illum.Fraction(.724604, .910947, .983824)
fmt.Printf("%.3f\n", k)
}
Output: 0.647
func FractionVenus ¶
FractionVenus computes an approximation of the illumanted fraction of Venus. 估算金星圆盘被照亮的比例
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/illum"
)
func main() {
// Example 41.b, p. 284
k := illum.FractionVenus(2448976.5)
fmt.Printf("%.3f\n", k)
}
Output: 0.640
func Jupiter ¶
Jupiter computes the visual magnitude of Jupiter. 木星星等
Argument r is the planet's distance from the Sun, Δ the distance from Earth.
func 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 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 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 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 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 Neptune ¶
Neptune computes the visual magnitude of Neptune. 海王星星等
Argument r is the planet's distance from the Sun, Δ the distance from Earth.
func Neptune84 ¶
Neptune84 computes the visual magnitude of Neptune.
The formula is that adopted in "Astronomical Almanac" in 1984.
Argument r is the planet's distance from the Sun, Δ the distance from Earth.
func PhaseAngle ¶
PhaseAngle computes the phase angle of a planet. 相位角
Argument r is planet's distance to Sun, Δ its distance to Earth, and R the distance from Sun to Earth. All distances in AU.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/illum"
)
func main() {
// Example 41.a, p. 284
i := illum.PhaseAngle(.724604, .910947, .983824)
fmt.Printf("%.5f\n", i.Cos())
}
Output: 0.29312
func PhaseAngle2 ¶
PhaseAngle2 computes the phase angle of a planet.
Arguments L, B, R are heliocentric ecliptical coordinates of the planet. L0, R0 are longitude and radius for Earth, Δ is distance from Earth to the planet. All distances in AU.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/illum"
"github.com/soniakeys/unit"
)
func main() {
// Example 41.a, p. 284
i := illum.PhaseAngle2(
unit.AngleFromDeg(26.10588),
unit.AngleFromDeg(-2.62102),
.724604,
unit.AngleFromDeg(88.35704),
.983824, .910947)
fmt.Printf("%.5f\n", i.Cos())
}
Output: 0.29312
func PhaseAngle3 ¶
PhaseAngle3 computes the phase angle of a planet.
Arguments L, B are heliocentric ecliptical longitude and latitude of the planet. x, y, z are cartesian coordinates of the planet, Δ is distance from Earth to the planet. All distances in AU.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/illum"
"github.com/soniakeys/unit"
)
func main() {
// Example 41.a, p. 284
i := illum.PhaseAngle3(
unit.AngleFromDeg(26.10588),
unit.AngleFromDeg(-2.62102),
.621794, -.664905, -.033138, .910947)
fmt.Printf("%.5f\n", i.Cos())
}
Output: 0.29312
func Pluto84 ¶
Pluto84 computes the visual magnitude of Pluto.
The formula is that adopted in "Astronomical Almanac" in 1984.
Argument r is the planet's distance from the Sun, Δ the distance from Earth.
func Saturn ¶
Saturn computes the visual magnitude of Saturn. 土星星等
Argument r is the planet's distance from the Sun, Δ the distance from Earth. B is the Saturnicentric latitude of the Earth referred to the plane of Saturn's ring. ΔU is the difference between the Saturnicentric longitudes of the Sun and the Earth, measured in the plane of the ring. You can use saturndisk.Disk() to obtain B and ΔU.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/illum"
"github.com/soniakeys/unit"
)
func main() {
// Example 41.d, p. 285
v := illum.Saturn(9.867882, 10.464606,
unit.AngleFromDeg(16.442), unit.AngleFromDeg(4.198))
fmt.Printf("%+.1f\n", v)
}
Output: +0.9
func Saturn84 ¶
Saturn84 computes the visual magnitude of Saturn.
The formula is that adopted in "Astronomical Almanac" in 1984.
Argument r is the planet's distance from the Sun, Δ the distance from Earth. B is the Saturnicentric latitude of the Earth referred to the plane of Saturn's ring. ΔU is the difference between the Saturnicentric longitudes of the Sun and the Earth, measured in the plane of the ring.
func Uranus ¶
Uranus computes the visual magnitude of Uranus. 天王星星等
Argument r is the planet's distance from the Sun, Δ the distance from Earth.
func Uranus84 ¶
Uranus84 computes the visual magnitude of Uranus.
The formula is that adopted in "Astronomical Almanac" in 1984.
Argument r is the planet's distance from the Sun, Δ the distance from Earth.
func 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.
Example ¶
package main
import (
"fmt"
"github.com/mooncaker816/learnmeeus/v3/illum"
"github.com/soniakeys/unit"
)
func main() {
// Example 41.c, p. 285
v := illum.Venus(.724604, .910947, unit.AngleFromDeg(72.96))
fmt.Printf("%.1f\n", v)
}
Output: -3.8
Types ¶
This section is empty.