sgp4

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 4 Imported by: 0

README

SGP4 for Go

SGP4 library port using SWIG

This library wrap the the SGP4 C++ library, with handlers to catch C++ exceptions into Go errors.

Update bindings

  • Update the library in internal/cppsgp4
  • Copy / paste the sgp4.i file
  • Run make

TODO

  • Fix deprecated
  • Better readme

Sources

cppsgp4: https://github.com/dnwrnr/sgp4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoordGeodetic

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

func NewCoordGeodetic

func NewCoordGeodetic(lat, lng, alt float64, is_radian bool) (c *CoordGeodetic, err error)

func (*CoordGeodetic) Altitude

func (c *CoordGeodetic) Altitude() float64

func (*CoordGeodetic) Close added in v0.0.9

func (c *CoordGeodetic) Close()

func (*CoordGeodetic) GetCoords

func (c *CoordGeodetic) GetCoords(in_degrees bool) (lat float64, lng float64, alt float64, err error)

func (*CoordGeodetic) Latitude

func (c *CoordGeodetic) Latitude() float64

func (*CoordGeodetic) Longitude

func (c *CoordGeodetic) Longitude() float64

func (*CoordGeodetic) ToString

func (c *CoordGeodetic) ToString() string

type CoordTopocentric

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

func NewCoordTopocentric

func NewCoordTopocentric(azimuth, elevation, xrange, range_rate float64) (c *CoordTopocentric, err error)

func (*CoordTopocentric) Azimuth

func (c *CoordTopocentric) Azimuth() float64

func (*CoordTopocentric) Close added in v0.0.9

func (c *CoordTopocentric) Close()

func (*CoordTopocentric) Elevation

func (c *CoordTopocentric) Elevation() float64

func (*CoordTopocentric) Range

func (c *CoordTopocentric) Range() float64

func (*CoordTopocentric) RangeRate

func (c *CoordTopocentric) RangeRate() float64

func (*CoordTopocentric) ToString

func (c *CoordTopocentric) ToString() string

type DateTime

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

func NewDateTimeFromTime

func NewDateTimeFromTime(t time.Time) (dt *DateTime, err error)

func NewDateTimeNow

func NewDateTimeNow() (*DateTime, error)

func (*DateTime) Close added in v0.0.9

func (dt *DateTime) Close()

func (*DateTime) Day

func (dt *DateTime) Day() int

func (*DateTime) Hour

func (dt *DateTime) Hour() int

func (*DateTime) Minute

func (dt *DateTime) Minute() int

func (*DateTime) Month

func (dt *DateTime) Month() int

func (*DateTime) Second

func (dt *DateTime) Second() int

func (*DateTime) Time

func (dt *DateTime) Time() time.Time

func (*DateTime) Year

func (dt *DateTime) Year() int

type Eci

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

func NewEci

func NewEci(dt *DateTime, coords *CoordGeodetic) (e *Eci, err error)

func (*Eci) Close added in v0.0.9

func (e *Eci) Close()

func (*Eci) ToGeodetic

func (e *Eci) ToGeodetic() (c *CoordGeodetic, err error)

type Observer

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

func NewObserver

func NewObserver(coords *CoordGeodetic) (o *Observer, err error)

func (*Observer) Close added in v0.0.9

func (o *Observer) Close()

func (*Observer) GetLocation

func (o *Observer) GetLocation() (c *CoordGeodetic, err error)

func (*Observer) GetLookAngle

func (o *Observer) GetLookAngle(sat *Eci) (c *CoordTopocentric, err error)

type SGP4

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

func NewSGP4

func NewSGP4(tle *Tle) (p *SGP4, err error)

func (*SGP4) Close added in v0.0.9

func (s *SGP4) Close()

func (*SGP4) PositionFromDateTime

func (s *SGP4) PositionFromDateTime(dt *DateTime) (eci *Eci, err error)

func (*SGP4) PositionFromTime

func (s *SGP4) PositionFromTime(lt time.Time) (eci *Eci, err error)

type Tle

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

func NewTle

func NewTle(name, line1, line2 string) (t *Tle, err error)

func (*Tle) ArgumentPerigee

func (t *Tle) ArgumentPerigee(in_degrees bool) float64

func (*Tle) BStar

func (t *Tle) BStar() float64

func (*Tle) Close added in v0.0.9

func (t *Tle) Close()

func (*Tle) Eccentricity

func (t *Tle) Eccentricity() float64

func (*Tle) Epoch

func (t *Tle) Epoch() *DateTime

func (*Tle) Inclination

func (t *Tle) Inclination(in_degrees bool) float64

func (*Tle) Line1

func (t *Tle) Line1() string

func (*Tle) Line2

func (t *Tle) Line2() string

func (*Tle) MeanAnomaly

func (t *Tle) MeanAnomaly(in_degrees bool) float64

func (*Tle) MeanMotion

func (t *Tle) MeanMotion() float64

func (*Tle) Name

func (t *Tle) Name() string

func (*Tle) RightAscensionNode

func (t *Tle) RightAscensionNode(in_degrees bool) float64

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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