Vocabulary
metar.private

Inputs
stran object


Outputs
str'an object


Definition


: parse-wind ( str -- str' )
dup "00000KT" =
[ drop "calm" ] [
3 cut "KT" ?tail drop "G" split1
[ parse-direction ] [ parse-speed ] [ parse-speed ] tri*
[ "%s at %s with gusts to %s " sprintf ]
[ "%s at %s" sprintf ] if*
] if ;