length

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 2 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package length names astronomical and physical length units in metres. Use SI prefixes for multiples: si.Kilo(Parsec) or si.Micro(Metre).

All listed units except PlanckLength are exact definitions, cited beside them. PlanckLength depends on the measured gravitational constant G.

Index

Constants

View Source
const (
	// Metre is the SI's unit of length. Defined by the SI since 1983, by
	// the speed of light: the distance light travels in 1/299792458 of a
	// second.
	Metre = 1.0

	// Angstrom is a unit outside the si that x-ray papers still use.
	// Defined as 1e-10 metres by the SI Brochure, 9th edition, section
	// 4, table 8, read on 2026-10-31: "1 Å = 0.1 nm = 10−10 m".
	Angstrom = 1e-10

	// AU is the astronomical unit. Defined in metres by the IAU in 2012
	// (resolution B2), as the IAU's 2015 resolutions restate it in B3's
	// endnote 4, read on 2026-10-31. It began as the Earth's mean distance
	// from the Sun and is now a definition.
	AU = 149597870700.0

	// Parsec is the distance at which one AU subtends one arcsecond:
	// 648000/pi AU, defined by the IAU's 2015 resolution B2, footnote 4,
	// read on 2026-10-31. 648000 is the arcseconds in half a circle.
	Parsec = arcsecondsInHalfACircle / math.Pi * AU

	// LightYear is the distance light travels in a julian year: c times
	// 365.25 days of 86400 seconds. Both are exact, so the light-year is
	// too, and there is no measured figure in it.
	LightYear = si.Speed * julianYear
)

The lengths, in metres.

Variables

This section is empty.

Functions

func PlanckLength

func PlanckLength() float64

PlanckLength is sqrt(hbar G / c^3), about 1.616e-35 metres. It is the one length here that is measured, not defined: hbar and c are exact, but G carries the uncertainty si.Gravitation states, and the Planck length inherits half of it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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