grav

package
v0.0.2 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, and the gravity between them: the gravBody of the engineering guide. doc/grav.md is its contract.

Every value grav takes in was made by a constructor that refused what it couldn't be, and every value it hands back is reached only through its methods.

This is the floor: a body known only by its mass, which is all an orbit needs. The full door, NewBody, comes with the tables it needs.

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 is a body known only by its mass, the way an orbit sees it. It refuses a mass not above nought, or not finite, and then gives no body.

func (Body) GM

func (body Body) GM() measure.Length

GM is the body's mass times G: in natural units a length, half the horizon radius of a hole of that mass

func (Body) Mass

func (body Body) Mass() measure.Mass

Mass is the body's mass

Jump to

Keyboard shortcuts

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