aeharding / aeharding/metar-taf-parser

Suggestion: include raw text for each parameter

Đang mở
#57 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
TypeScript
Star
65
Fork
15
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

First, thanks for this great library... really appreciated :-)

I find it useful to be able to break down a raw METAR string into pieces, and re-construct a "custom" string using only those pieces considered to be of interest, e.g. station, time, temperature, dewpoint, and wind speed/direction. Plus... with the option to decode (or not) each piece.

Take [this example](https://aeharding.github.io/metar-taf-parser/metar?input=CYVR+301300Z+09006KT+15SM+FEW055+FEW120+M04%2FM06+A3049+RMK+SC1AC1+SC+TR+SLP327):

`CYVR 301300Z 09006KT 15SM FEW055 FEW120 M04/M06 A3049 RMK SC1AC1 SC TR SLP327`

My non-decoded custom string would be:

`CYVR 301300Z M04/M06 09006KT`

While my decoded custom string would be:

`Vancouver International Airport 13:00 -4°C -6°C 11.1 km/h 90°`

So it would be handy if the raw text used as the basis for each decoded piece were also included in the response data, e.g.

`"wind": {
....,
"raw": "09006KT"
}`

I note that this `raw` field is already added to each array element in `remarks`, so could be added likewise for each array element of `clouds` and also for each other grouping like `wind`, `visibility` etc?

It would be more tricky (for backward compatibility) for `temperature`, `dewpoint`, `altimeter` because these are just straight values and aren't already JSON objects to which a new `raw` element could be added.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.