illum

package
v3.0.0-...-8217f41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2018 License: MIT Imports: 3 Imported by: 0

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

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fraction

func Fraction(r, Δ, R float64) float64

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

func FractionVenus(jde float64) float64

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

func Jupiter(r, Δ float64) float64

Jupiter computes the visual magnitude of Jupiter. 木星星等

Argument r is the planet's distance from the Sun, Δ the distance from Earth.

func Jupiter84

func Jupiter84(r, Δ float64, i unit.Angle) float64

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

func Mars(r, Δ float64, i unit.Angle) float64

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

func Mars84(r, Δ float64, i unit.Angle) float64

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

func Mercury(r, Δ float64, i unit.Angle) float64

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

func Mercury84(r, Δ float64, i unit.Angle) float64

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

func Neptune(r, Δ float64) float64

Neptune computes the visual magnitude of Neptune. 海王星星等

Argument r is the planet's distance from the Sun, Δ the distance from Earth.

func Neptune84

func Neptune84(r, Δ float64) float64

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

func PhaseAngle(r, Δ, R float64) unit.Angle

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

func PhaseAngle2(L, B unit.Angle, R float64, L0 unit.Angle, R0, Δ float64) unit.Angle

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

func PhaseAngle3(L, B unit.Angle, x, y, z, Δ float64) unit.Angle

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

func Pluto84(r, Δ float64) float64

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

func Saturn(r, Δ float64, B, ΔU unit.Angle) float64

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

func Saturn84(r, Δ float64, B, ΔU unit.Angle) float64

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

func Uranus(r, Δ float64) float64

Uranus computes the visual magnitude of Uranus. 天王星星等

Argument r is the planet's distance from the Sun, Δ the distance from Earth.

func Uranus84

func Uranus84(r, Δ float64) float64

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

func Venus(r, Δ float64, i unit.Angle) float64

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

func Venus84

func Venus84(r, Δ float64, i unit.Angle) float64

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL