Handbook
Glossary
metar-body ( report seq -- report )
Vocabulary
metar
.
private
Inputs
report
an
object
seq
an
object
Outputs
report
an
object
Definition
USING:
accessors
kernel
regexp
sequences
;
IN:
metar.private
:
metar-body
( report seq -- report )
[
{
"METAR"
"SPECI"
}
member?
]
find-one
[
pick
type<<
]
when*
[
re-station
matches?
]
find-one
[
pick
station<<
]
when*
[
re-timestamp
matches?
]
find-one
[
parse-timestamp
pick
timestamp<<
]
when*
[
{
"AUTO"
"COR"
}
member?
]
find-one
[
pick
modifier<<
]
when*
[
re-wind
matches?
]
find-one
[
parse-wind
pick
wind<<
]
when*
[
re-wind-variable
matches?
]
find-one
[
parse-wind-variable
pick
wind>>
prepend
pick
wind<<
]
when*
fix-visibility
[
re-visibility
matches?
]
find-all
[
parse-visibility
]
map
", "
join
pick
visibility<<
[
re-rvr
matches?
]
find-all
[
parse-rvr
]
map
", "
join
pick
rvr<<
[
re-weather
matches?
]
find-all
[
parse-weather
]
map
", "
join
pick
weather<<
[
re-sky-condition
matches?
]
find-all
[
parse-sky-condition
]
map
", "
join
pick
sky-condition<<
[
re-temperature
matches?
]
find-one
[
parse-temperature
[
pick
temperature<<
]
[
pick
dew-point<<
]
bi*
]
when*
[
re-altimeter
matches?
]
find-one
[
parse-altimeter
pick
altimeter<<
]
when*
drop
;