Giter VIP home page Giter VIP logo

gometar's People

Contributors

eugecm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

gometar's Issues

Problem with TCU (Towering cumulus) in cloud layer

Hi,

I wanted to use your library for a personal project. I am new in GO and these are my first steps.

Sadly it seems that the modules has a problem with the TCU (Towering cumulus) part of the cloud layer given the following METAR:

ELLX 021550Z 06008KT 9999 VCSH FEW051TCU 17/06 Q1015 NOSIG

panic: runtime error: index out of range [10] with length 10

goroutine 1 [running]:
github.com/eugecm/gometar/metar/parser.(*Parser).Parse(_, {_, _})
        /Users/swagener/go/pkg/mod/github.com/eugecm/[email protected]/metar/parser/parser.go:124 +0xeee
main.main()
        /Users/swagener/git/vatsim-companion/metar.go:45 +0x12b
exit status 2

If i remove TCU part from the FEW051TCU string it works.

getCloudInfo may take ///CB strings

First of all : Thank you for your work on that package.

Doing some testing on your package doday with a local METAR station, I get the following strings from the station :

2020/12/28 09:30
LFBO 280930Z AUTO 24014KT 9999 BKN018/// BKN027/// BKN034/// ///CB 06/03 Q0991 TEMPO 25020G32KT 4000 SHRA BKN014 SCT020TCU

This leads to an error in getCloudInfo() while processing cloud string ///CB.

I'm not very comfortable with METAR format (I'm very new to it), but the "wikipedia" page gives some informations on cloud where /// seems to be "unable to measure" code and CB is "Cumulonimbus". CB seems to be just after the height field but in the /// case. So, maybe the cloudAmoutRegexp may take this into acount : amount + height should be optional and (?P<cloud>TCU|CB)? should be placed after (maybe) /// ?

Some other sources seems to describe the format you've implemented... Is ///(?P<cloud>TCU|CB) a possible other format ? How to analyze it ?

From my POV, I cannot change the way METAR files are published.

If ///CB is a format error, maybe parsing should not end-up with error but a warning or something else in the lib, allowing parsing the next section or item in the token ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.