Documentation
¶
Overview ¶
Package metar provides METAR (METeorological Aerodrome Report) message decoding
Index ¶
Constants ¶
const ( // BECMG - Weather development (BECoMinG) BECMG = "BECMG" // TEMPO - TEMPOrary existing weather phenomena TEMPO = "TEMPO" // FM - FroM (in TAF reports) FM = "FM" )
Variables ¶
var CurYearStr, CurMonthStr, CurDayStr string
Year, month and day. By default read all messages in the current date. Can be redefined if necessary
Functions ¶
This section is empty.
Types ¶
type MetarMessage ¶
type MetarMessage struct {
COR bool // Correction to observation
Station string // 4-letter ICAO station identifier
DateTime time.Time // Time (in ISO8601 date/time format) this METAR was observed
Auto bool // METAR from automatic observing systems with no human intervention
NIL bool // event of missing METAR
wind.Wind // Surface wind
// Ceiling And Visibility OK, indicating no cloud below 5,000 ft (1,500 m) or the highest minimum sector
// altitude and no cumulonimbus or towering cumulus at any level, a visibility of 10 km (6 mi) or more and no significant weather change.
CAVOK bool
Visibility // Horizontal visibility. In meters
RWYvisibility []rwy.VisualRange // Runway visual range
ph.Phenomena // Present Weather
PhenomenaNotDefined bool // Not detected by the automatic station - “//”
VerticalVisibility int // Vertical visibility (ft)
VerticalVisibilityNotDefined bool // “///”
clouds.Clouds // Cloud amount and height
Temperature int // Temperature in degrees Celsius
Dewpoint int // Dew point in degrees Celsius
QNHhPa int // Altimeter setting. Atmospheric pressure adjusted to mean sea level
// Supplementary informaton
//Recent weather
RecentPhenomena ph.Phenomena
// Information on the state of the runway(s)
RWYState []rwy.State
// Wind shear on runway(s)
WindShear []rwy.RunwayDesignator
// Prevision
TREND []Trend
//OR NO SIGnificant changes coming within the next two hours
NOSIG bool
// Remarks consisting of recent operationally significant weather as well as additive and automated maintenance data
Remarks *Remark
// An array of tokens that couldn't be decoded
NotDecodedTokens []string
// contains filtered or unexported fields
}
MetarMessage - Meteorological report presented as a data structure
func NewMETAR ¶
func NewMETAR(inputtext string) (*MetarMessage, error)
NewMETAR - creates a new METAR based on the original message
func (*MetarMessage) RAW ¶
func (m *MetarMessage) RAW() string
RAW - returns the original message text
type Remark ¶
type Remark struct {
WindOnRWY []WindOnRWY
QBB int // Cloud base in meters
МТOBSC bool // Mountains obscured
MASTOBSC bool // Mast obscured
OBSTOBSC bool // Obstacle obscured
QFE int // Q-code Field Elevation (mmHg)
}
Remark - Additional information not included in the main message
type TAFMessage ¶
type TAFMessage struct {
COR bool // Correction of forecast due to a typo
AMD bool // Amended forecast
NIL bool // event of missing TAF
Station string // 4-letter ICAO station identifier
DateTime time.Time // Time( in ISO8601 date/time format) this TAF was issued
ValidFrom time.Time
ValidTo time.Time
CNL bool // The previously issued TAF for the period was cancelled
wind.Wind // Surface wind
// Ceiling And Visibility OK, indicating no cloud below 5,000 ft (1,500 m) or the highest minimum sector
// altitude and no cumulonimbus or towering cumulus at any level, a visibility of 10 km (6 mi) or more and no significant weather change.
CAVOK bool
Visibility // Horizontal visibility
ph.Phenomena // Present Weather
VerticalVisibility int // Vertical visibility (ft)
clouds.Clouds // Cloud amount and height
Temperature []TemperatureForecast // Temperature extremes
// Prevision
TREND []Trend
NotDecodedTokens []string
// contains filtered or unexported fields
}
TAFMessage - Terminal Aerodrome Forecast struct
func NewTAF ¶
func NewTAF(inputtext string) *TAFMessage
NewTAF - creates a new TAF forecast based on the original message
type TemperatureForecast ¶
TemperatureForecast - Forecast Max and Min temperature
type Trend ¶
type Trend struct {
Type TypeTrend
Probability int // used only in TAFs. Maybe only 30 or 40. The PROBdd group is not used in conjunction with BECMG and FM
// In case of in metar use values indicated time of changes. hh:mm (BECMG FM1030 TL1130)
// In TAFs used from - until fields as date/time. ddhh/ddhh (TEMPO 2208/2218)
FM time.Time // FroM (time)
TL time.Time // unTiL (time)
AT time.Time // AT time
Visibility
VerticalVisibility int
VerticalVisibilityNotDefined bool
wind.Wind
CAVOK bool
ph.Phenomena
clouds.Clouds
}
Trend - forecast of changes for a specified period
type TypeTrend ¶
type TypeTrend string
TypeTrend - type of trend: temporary or permanently expected changes
type Visibility ¶
Visibility - prevailing visibility
func (*Visibility) ParseVisibility ¶
func (v *Visibility) ParseVisibility(input []string) (tokensused int)
ParseVisibility - identify and parses the representation oh horizontal visibility