grav

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 2 modules, 2 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 grav is bodies under gravity, and the gravity between them. doc/grav.md is the plan for what comes next.

For now a body is known only by its mass, which is all an orbit needs. A body with matter, an age and a spin waits for the published tables that give its size.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	// contains filtered or unexported fields
}

Body is a body under gravity.

func Point

func Point(mass measure.Mass) (*Body, error)

Point returns a body known only by its mass, the way an orbit sees it. returns nil and error for a mass that is not finite and above zero.

func (Body) GM

func (body Body) GM() measure.Length

GM returns the body's mass times G. In natural units that's a length: half the horizon radius of a still hole of that mass.

func (Body) Mass

func (body Body) Mass() measure.Mass

Mass returns the body's mass.

Jump to

Keyboard shortcuts

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