adsblol

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ADSBAircraftToEntity

func ADSBAircraftToEntity(aircraft ADSBAircraft, controllerName string, trackerID string, expires time.Duration) *pb.Entity

func Run

func Run(ctx context.Context, logger *slog.Logger, _ string) error

Types

type ADSBAircraft

type ADSBAircraft struct {
	Hex          string       `json:"hex"`
	Callsign     string       `json:"flight"`
	Registration string       `json:"r"`
	Type         string       `json:"t"`
	Lat          *float64     `json:"lat"`
	Lon          *float64     `json:"lon"`
	AltBaro      *FlexibleInt `json:"alt_baro"`
	AltGeom      *FlexibleInt `json:"alt_geom"`
	Track        *float64     `json:"track"`
	GroundSpeed  *float64     `json:"gs"`
	Category     string       `json:"category"`
	Emergency    string       `json:"emergency"`
	Squawk       string       `json:"squawk"`
	NACp         *int         `json:"nac_p"`
	NACv         *int         `json:"nac_v"`
	Seen         *float64     `json:"seen"`
	SeenPos      *float64     `json:"seen_pos"`
}

type ADSBClient

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

func NewADSBClient

func NewADSBClient() *ADSBClient

func (*ADSBClient) FetchByCallsign

func (c *ADSBClient) FetchByCallsign(ctx context.Context, callsign string) ([]ADSBAircraft, error)

func (*ADSBClient) FetchByICAO

func (c *ADSBClient) FetchByICAO(ctx context.Context, icao string) ([]ADSBAircraft, error)

func (*ADSBClient) FetchByLocation

func (c *ADSBClient) FetchByLocation(ctx context.Context, lat, lon float64, radiusNM int) ([]ADSBAircraft, error)

func (*ADSBClient) FetchMilitary

func (c *ADSBClient) FetchMilitary(ctx context.Context) ([]ADSBAircraft, error)

type ADSBResponse

type ADSBResponse struct {
	AC      []ADSBAircraft `json:"ac"`
	Now     float64        `json:"now"`
	Total   int            `json:"total"`
	Message string         `json:"msg"`
}

type FlexibleInt

type FlexibleInt struct {
	Value int
	Valid bool
}

func (*FlexibleInt) UnmarshalJSON

func (f *FlexibleInt) UnmarshalJSON(data []byte) error

type PollerConfig

type PollerConfig struct {
	ConfigKey       string
	Latitude        float64
	Longitude       float64
	RadiusNM        int
	Callsign        string
	ICAO            string
	IntervalSeconds int
}

func (*PollerConfig) Interval added in v0.0.19

func (c *PollerConfig) Interval() time.Duration

Jump to

Keyboard shortcuts

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