metar_speed: Get wind speed

View source: R/metar_speed.R

metar_speedR Documentation

Get wind speed

Description

Extract a wind speed value from METAR weather report.

Usage

metar_speed(x, metric = TRUE, check = FALSE)

Arguments

x

character vector; METAR weather report or reports.

metric

logical; the default value is TRUE and a returned wind speed is in m/s; if it's FALSE then in knots.

check

logical; the default value is FALSE, if METAR report fails the syntax check, NA value will be returned. If FALSE, zero values will be returned for METAR reports with incorrect syntax.

Value

a numeric vector. A wind speed in m/s or in knots.

Examples

metar_speed("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG")
metar_speed("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5 SLP180", metric = FALSE)
metar_speed("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04/M03 Q1025 NOSIG= NOSIG=")
metar_speed("EPKK 141730Z VRB01KT CAVOK 21/16 Q1028")


pmetar documentation built on Oct. 26, 2023, 1:08 a.m.