metar

package
v0.0.0-...-3ccddf6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxDays = 30
)

Variables

View Source
var (
	METARMatcher   = regexp.MustCompile("^[0-9]{12}.*")
	METARRegexp    = regexp.MustCompile("^([0-9]{12}) (METAR|METAR COR|TAF|TAF AMD|TAF COR) ([A-Z]{4}) [0-9]{6}Z.*")
	TempRegexp     = regexp.MustCompile("(M?[0-9]{2})/(M?[0-9]{2})")
	PressureRegexp = regexp.MustCompile("Q([0-9]{4})")
	WindRegexp     = regexp.MustCompile("([0-9]{3}|VRB)([0-9]{2})(G[0-9]{2})?KT")
)

Functions

This section is empty.

Types

type METAR

type METAR struct {
	DateTime         time.Time
	ICAO             string
	ReportType       Type
	Temperature      int
	DewPoint         int
	PressureMillibar int
	WindDirection    int
	WindKnots        int
}

func FetchMETARs

func FetchMETARs(start time.Time, end time.Time, icao string) ([]*METAR, error)

func ParseMETARs

func ParseMETARs(data string) ([]*METAR, error)

type Type

type Type int
const (
	Routine  Type = iota
	Forecast      = iota
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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