asteroids

package module
v0.0.0-...-bb8ed43 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Parse a row of an asteroids entry, see https://minorplanetcenter.net//iau/info/MPOrbitFormat.html.

Index

Constants

View Source
const (
	MPCORB_DAT_URL = "http://www.minorplanetcenter.net/iau/MPCORB/MPCORB.DAT.gz"
	DOWNLOAD_PATH  = "./data/asteroids/mpcorb.dat"
)

Variables

This section is empty.

Functions

func GetAsteroidPayload

func GetAsteroidPayload() (*apb.Asteroids, error)

Types

type Asteroid

type Asteroid struct {

	// Orbital eccentricity
	Eccentricity float64

	// Semimajor axis (AU)
	SemiMajorAxis float64
	// contains filtered or unexported fields
}

func NewAsteroid

func NewAsteroid(row string) (*Asteroid, error)

func (*Asteroid) ArgumentOfPerihelion

func (a *Asteroid) ArgumentOfPerihelion() float64

func (*Asteroid) CriticalListNumbered

func (a *Asteroid) CriticalListNumbered() bool

func (*Asteroid) Epoch

func (a *Asteroid) Epoch() (time.Time, error)

func (*Asteroid) InAsteroidBelt

func (a *Asteroid) InAsteroidBelt() bool

Somewhat arbitrary, but roughly corresponds to https://www.britannica.com/science/asteroid/Geography-of-the-asteroid-belt.

func (*Asteroid) Inclination

func (a *Asteroid) Inclination() float64

func (*Asteroid) IsLargeNEO

func (a *Asteroid) IsLargeNEO() bool

func (*Asteroid) IsNEO

func (a *Asteroid) IsNEO() bool

func (*Asteroid) IsPHA

func (a *Asteroid) IsPHA() bool

func (*Asteroid) IsUnbounded

func (a *Asteroid) IsUnbounded() bool

func (*Asteroid) LongitudeAscendingNode

func (a *Asteroid) LongitudeAscendingNode() float64

func (*Asteroid) MeanAnomalyAtEpoch

func (a *Asteroid) MeanAnomalyAtEpoch(t time.Time) (float64, error)

func (*Asteroid) OppositionObjectSeenAtEarlierOpposition

func (a *Asteroid) OppositionObjectSeenAtEarlierOpposition() bool

func (*Asteroid) OrbitType

func (a *Asteroid) OrbitType() apb.OrbitType

func (*Asteroid) PerihelionDistance

func (a *Asteroid) PerihelionDistance() float64

func (*Asteroid) Uncertainty

func (a *Asteroid) Uncertainty() int

See https://en.wikipedia.org/wiki/Uncertainty_parameter.

type AsteroidsReader

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

func NewAsteroidsReader

func NewAsteroidsReader() (*AsteroidsReader, error)

func (*AsteroidsReader) Close

func (r *AsteroidsReader) Close() error

func (*AsteroidsReader) Err

func (r *AsteroidsReader) Err() error

func (*AsteroidsReader) Next

func (r *AsteroidsReader) Next() (*Asteroid, error)

func (*AsteroidsReader) Scan

func (r *AsteroidsReader) Scan() bool

type Stats

type Stats struct {
	Processed        uint32
	Valid            uint32
	UnknownOrbitType uint32
	SkippedOrbitType uint32
	TooUncertain     uint32
	UnboundedOrbit   uint32
	Error            uint32
}

func (*Stats) ToString

func (s *Stats) ToString() string

Jump to

Keyboard shortcuts

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