Documentation
¶
Overview ¶
Package orbittest is what orbit's tests and gpu/orbit's share: a centre to orbit, the closed forms of a point mass's orbits, and how well a run of steps resolves one.
Index ¶
- func Apocentre(gm, axis, eccentricity float64) (far, speed float64)
- func Centre(suns float64) grav.Body
- func Circular(gm, radius float64) float64
- func Energies(gm, speed, distance float64) (moving, pulled float64)
- func Energy(gm, speed, distance float64) float64
- func Half(period float64) float64
- func Pericentre(gm, axis, eccentricity float64) (near, speed float64)
- func Period(gm, axis float64) float64
- func Resolved(gm, speed, near, dt, factor, floor float64) float64
- func Room(moved, pulled, factor, floor float64) float64
- func Shares(gm, speed, near, dt float64) (moved, pulled float64)
- func Size(x, y, z float64) float64
- func Within(got, want, room float64) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apocentre ¶
Apocentre is an orbit's farthest point from a gm and its speed there, for a semi-major axis and an eccentricity.
func Centre ¶
Centre is a point mass of so many suns. It panics on a mass no point can have, since a test with no centre has nothing to run.
func Energies ¶
Energies is the two parts of that energy, each positive: the energy of the star's motion, and the size of the energy of its place in the field. Their difference is the energy.
Their sum is what a drift in the energy is held against: the two can nearly cancel while each is large, and a drift small against either is then large against the difference.
func Energy ¶
Energy is a star's energy for each unit of its mass in a point mass's field, in kilometres per second squared, at a speed and a distance.
func Pericentre ¶
Pericentre is an orbit's nearest point to the centre and its speed there, for a semi-major axis and an eccentricity.
func Resolved ¶
Resolved is how well steps of a length resolve an orbit about a gm at its nearest pass: a factor times the square of the step's share of the pass in the star's motion plus its share in the pull, and a floor under it. The leapfrog's errors are of this size.
func Room ¶
Room is how well a pass with the step's shares is resolved, as Resolved measures it, for any field: a factor times the square of the share in the motion plus the share in the pull, and a floor under it. It is what a pass's own shares from Pass.Steps give.
func Shares ¶
Shares is the step's shares of a pass about a gm, at a speed and a distance, for steps of a length: how far the star moves in one step and how far the pull moves it over one step squared, each as a share of the distance.
It is what orbit's Pass.Steps reports, from the point mass's closed form.
Types ¶
This section is empty.