paclient

package
v0.0.0-...-1d9b62b Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAircraft

func GetAircraft(url string, aircraftResponse *AircraftResponse) error

func GetReceiverInfo

func GetReceiverInfo(url string, receiver *Receiver) error

Types

type Aircraft

type Aircraft struct {
	Hex       string  `json:"hex"`
	Flight    string  `json:"flight"`
	Altitude  int     `json:"alt_baro"`
	Speed     float32 `json:"gs"`
	Latitude  float32 `json:"lat"`
	Longitude float32 `json:"lon"`
	Distance  float32
}

type AircraftClientError

type AircraftClientError struct {
	Message string
	Url     string
	Err     error
	Data    string
}

func (*AircraftClientError) Error

func (e *AircraftClientError) Error() string

type AircraftResponse

type AircraftResponse struct {
	Aircraft []Aircraft `json:"aircraft"`
}

type Receiver

type Receiver struct {
	Version   string  `json:"version"`
	Refresh   int     `json:"refresh"`
	History   int     `json:"history"`
	Latitude  float32 `json:"lat"`
	Longitude float32 `json:"lon"`
}

type ReceiverClientError

type ReceiverClientError struct {
	Message string
	Url     string
	Err     error
}

func (*ReceiverClientError) Error

func (e *ReceiverClientError) Error() string

Jump to

Keyboard shortcuts

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