tracker

package
v0.0.0-...-ab5289d Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlightHandler

type FlightHandler interface {
	NewFlight(icaoID string, firstSeen time.Time)
	CloseFlight(icaoID string, lastSeen time.Time, messages int)
	SetIdentity(icaoID, callsign string, category decoder.AircraftType, change bool)
	AddTrackPoint(icaoID string, trackPoint TrackLog)
}

type TrackLog

type TrackLog struct {
	Time          time.Time
	Heading       int
	HeadingValid  bool
	VS            int
	VSValid       bool
	PositionValid bool
	Latitude      float64
	Longitude     float64
	AltitudeValid bool
	Altitude      int
	AltitudeType  int
	SpeedValid    bool
	Speed         int
	SpeedType     decoder.SpeedType
	SquawkValid   bool
	Squawk        string
	IdentityValid bool
	Callsign      string
	Category      decoder.AircraftType
}

type Tracker

type Tracker struct {
	ForceReporting bool
	// contains filtered or unexported fields
}

func New

func New(handler FlightHandler, forceReporting bool) *Tracker

func NewWithState

func NewWithState(handler FlightHandler, forceReporting bool, trackerstate []byte) (*Tracker, error)

func (*Tracker) CloseAllFlights

func (t *Tracker) CloseAllFlights()

func (*Tracker) GetState

func (t *Tracker) GetState() []byte

func (*Tracker) Message

func (t *Tracker) Message(icaoID string, tm time.Time, msg interface{})

Jump to

Keyboard shortcuts

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