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 CurDayStr string
CurDayStr - day of message
var CurMonthStr string
CurMonthStr - month of message
var CurYearStr string
CurYearStr - year of message. 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 {
RawData string `json:"raw_data"` // The raw METAR
COR bool `json:"corrected"` // Correction to observation
Station string `json:"station"` // 4-letter ICAO station identifier
DateTime time.Time `json:"issued"` // Time (in ISO8601 date/time format) this METAR was observed
Auto bool `json:"auto"` // METAR from automatic observing systems with no human intervention
NIL bool `json:"nil"` // event of missing METAR
wind.Wind // Surface wind
CAVOK bool `json:"cavok"` // 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.
vis.Visibility // Horizontal visibility
RWYvisibility []rwy.VisualRange `json:"visual_range"` // Runway visual range
ph.Phenomena `json:"phenomena"` // Present Weather
PhenomenaNotDefined bool `json:"phenomena_not_defined"` // Not detected by the automatic station - “//”
VerticalVisibility int `json:"vertical_visibility"` // Vertical visibility (ft)
VerticalVisibilityNotDefined bool `json:"vertical_visibility_not_defined"` // “///”
clouds.Clouds `json:"clouds"` // Cloud amount and height
Temperature int `json:"temperature"`
Dewpoint int `json:"dew_point"` // Dew point in degrees Celsius
QNHhPa int `json:"qnh_hpa"` // Altimeter setting. Atmospheric pressure adjusted to mean sea level
RecentPhenomena ph.Phenomena `json:"recent_phenomena"`
RWYState []rwy.State `json:"runway_state"`
WindShear []rwy.RunwayDesignator `json:"wind_shear"`
TREND []Trend `json:"trend"`
NOSIG bool `json:"no_sig"` //OR NO SIGnificant changes coming within the next two hours
Remarks *Remark `json:"remarks"` //OR NO SIGnificant changes coming within the next two hours
NotDecodedTokens []string `json:"not_decoded_tokens"` // An array of tokens that couldn't be decoded
}
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 `json:"wind_on_rwy"`
QBB int `json:"qbb"` // Cloud base in meters
МТOBSC bool `json:"мтobsc"` // Mountains obscured
MASTOBSC bool `json:"mastobsc"` // Mast obscured
OBSTOBSC bool `json:"obstobsc"` // Obstacle obscured
QFE int `json:"qfe"` // Q-code Field Elevation (mmHg)
}
Remark - Additional information not included in the main message
type TAFMessage ¶
type TAFMessage struct {
RawData string `json:"raw_data"` // The raw TAF
COR bool `json:"corrected"` // Correction of forecast due to a typo
AMD bool `json:"amended"` // Amended forecast
NIL bool `json:"nil"` // event of missing TAF
Station string `json:"station"` // 4-letter ICAO station identifier
DateTime time.Time `json:"date_time"` // Time( in ISO8601 date/time format) this TAF was issued
ValidFrom time.Time `json:"valid_from"`
ValidTo time.Time `json:"valid_to"`
CNL bool `json:"cancelled"` // The previously issued TAF for the period was cancelled
wind.Wind // Surface wind
CAVOK bool `json:"cavok"` // 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.
v.Visibility // Horizontal visibility
ph.Phenomena `json:"phenomena"` // Present Weather
VerticalVisibility int `json:"vertical_visibility"` // Vertical visibility (ft)
clouds.Clouds `json:"clouds"` // Cloud amount and height
Temperature []TemperatureForecast `json:"temperature_forecast"` // Temperature extremes
TREND []Trend `json:"trend"`
NotDecodedTokens []string `json:"not_decoded_tokens"`
}
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 `json:"trend_type"`
Probability int `json:"probability"`
// 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 `json:"from_time"`
// FroM (time)
TL time.Time `json:"till_time"`
// unTiL (time)
AT time.Time `json:"at_time"`
// AT time
v.Visibility
VerticalVisibility int `json:"vertical_visibility"`
VerticalVisibilityNotDefined bool `json:"vertical_visibility_not_defined"`
wind.Wind
CAVOK bool `json:"cavok"`
ph.Phenomena `json:"phenomena"`
clouds.Clouds `json:"clouds"`
ParsingErrors []error `json:"parsing_errors"`
}
Trend - forecast of changes for a specified period
Directories
¶
| Path | Synopsis |
|---|---|
|
Package clouds describe cloud amount and height for metar message decoding
|
Package clouds describe cloud amount and height for metar message decoding |