sgp4

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

README

SGP4 library for Go

Go Reference

Background

The C++ SGP4 library is ported from here

Initial port was done by sataas

How to update the bindings
  • You will need SWIG
  • Clone the original C++ SGP4 repository
  • Run: swig -c++ -intgosize 64 -go SGP4.i
  • The generated file will be cppsgp4/cppsgp4.go

TODO

  • Remove all unnecessary dependencies for testing
  • Enhance SGP4 Go API by adding more native C++ library functions
  • Enhance documentation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location added in v1.0.0

type Location struct {
	SatLat      float64
	SatLng      float64
	SatAltitude float64
}

type Observation added in v1.0.0

type Observation struct {
	SatLat      float64
	SatLng      float64
	SatAltitude float64
	Azimuth     float64
	Elevation   float64
	Range       float64
	RangeRate   float64
}

type PassDetails added in v1.0.0

type PassDetails struct {
	AOS          time.Time
	LOS          time.Time
	AOSAzimuth   float64
	LOSAzimuth   float64
	MaxElevation float64
	AOSRangeRate float64
	LOSRangeRate float64
}

type SGP4

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

func NewSGP4

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

func (*SGP4) GenerateLocations added in v1.0.0

func (p *SGP4) GenerateLocations(start, stop time.Time, step int) []Location

func (*SGP4) GeneratePasses added in v1.0.0

func (p *SGP4) GeneratePasses(lat, lng, alt float64, start, stop time.Time, step int) []PassDetails

func (*SGP4) ObservationFromLocation added in v1.0.0

func (p *SGP4) ObservationFromLocation(lat, lng, alt float64) Observation

func (*SGP4) Position

func (p *SGP4) Position(lt time.Time) (lat, lng, alt float64, err error)

type TLE added in v1.0.0

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

func NewTLE added in v1.0.0

func NewTLE(name, tle1, tle2 string) (tle *TLE, err error)

func (*TLE) Line1 added in v1.0.0

func (tle *TLE) Line1() string

func (*TLE) Line2 added in v1.0.0

func (tle *TLE) Line2() string

func (*TLE) Name added in v1.0.0

func (tle *TLE) Name() string

func (*TLE) NoradNumber added in v1.0.0

func (tle *TLE) NoradNumber() int

func (*TLE) String added in v1.0.0

func (tle *TLE) String() string

type TLEReader added in v1.0.0

type TLEReader struct {
	*bufio.Scanner
}

func NewTLEReader added in v1.0.0

func NewTLEReader(r io.Reader) *TLEReader

func (*TLEReader) ReadAllTLE added in v1.0.0

func (r *TLEReader) ReadAllTLE() ([]*TLE, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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