metar_is_correct: Check if METAR report is correct.

View source: R/metar_is_correct.R

metar_is_correctR Documentation

Check if METAR report is correct.

Description

Function checks METRAR reports syntax.

Usage

metar_is_correct(x, verbose = FALSE)

Arguments

x

character vector; METAR weather report or reports.

verbose

logical; default FALSE

Details

It checks:
appearance of not allowed characters: ! \ ? . , ; : * # & ' " ) and multiple slash characters
wind speed syntax
wind direction syntax
pressure syntax
air and dew point temperature syntax
if an airport code is the first element or appear immediately after METAR, SPECI, METAR COR ro SPECI COR.

Value

if verbose = FALSE, TRUE if a METAR is correct, FALSE if not.

if verbose = TRUE, all incorrect METAR reports will be printed

Examples

metar_is_correct("EPWA 281830Z 18009KT 140V200 9999 SCT037 03/M01 Q1008 NOSIG")
metar_is_correct("CYUL 281800Z 13008KT 30SM BKN240 01/M06 A3005 RMK CI5! SLP180")
metar_is_correct("201711271930 METAR LEMD 271930Z 02002KT CAVOK 04//M03 Q1025")


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