Giter VIP home page Giter VIP logo

metar.js's People

Contributors

datadriver avatar djmartinnz avatar esamattis avatar kami avatar rheh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metar.js's Issues

parse error

EFUT 160750Z AUTO 25011KT 9999 ////// 15/14 Q1006

no clouds?

EFVA 171520Z AUTO 31010KT 270V340 9999 ////// 09/03 Q1009

Date

If you pass the exact sam METAR a couple of time, the resulting object will have a different "time" attribute each time:
https://skydivejkl.github.io/metar.js/#SBSP%20210000Z%2014006KT%209999%20-RA%20BKN007%20OVC013%2017/16%20Q1023

SBSP 210000Z 14006KT 9999 -RA BKN007 OVC013 17/16 Q1023
1st call: 2022-03-21T00:00:01.762Z
2ns call: 2022-03-21T00:00:34.040Z
3rd call: 2022-03-21T00:00:50.418Z

The problem seem to be here:
METAR.prototype.parseDate = function() {
this.next();
var d = new Date();
d.setUTCDate(asInt(this.current.slice(0, 2)));
d.setUTCHours(asInt(this.current.slice(2, 4)));
d.setUTCMinutes(asInt(this.current.slice(4, 6)));
this.result.time = d;
};

Also, I'm not sure if the METAR timezone is being taken into account. In this example SBSP is the São Paulo–Congonhas Airport which is in GMT-3.

Erroneous time returned

Hello.

Give this METAR:

METAR ZGSZ 210500Z 06003MPS 020V100 9999 SCT033 28/19 Q1016 NOSIG

Obtained from here with a local datetime of Nov 21 2015 1PM, metar.js returns time of Sun Dec 20 2015 21:00:30 GMT-0800 (PST). Is there something special we have to do when dealing with METAR datetime?

TAFs

Are there plans to support TAFs as well?

Negative dew point

This is a META for ENGM retrieved from https://www.ippc.no/ippc/aerodromes.jsp
METAR 300450Z 29004KT 260V340 CAVOK M02/M03 Q1018 NOSIG

My understanding is that here the dew point is -3 yet the parsed dew point is null

{
    "station": "METAR",
    "time": "2014-10-30T04:50:24.460Z",
    "auto": false,
    "wind": {
        "speed": 4,
        "gust": null,
        "direction": 290,
        "variation": {
            "min": 260,
            "max": 340
        },
        "unit": "KT"
    },
    "cavok": true,
    "visibility": null,
    "weather": null,
    "clouds": null,
    "temperature": -2,
    "dewpoint": null,
    "altimeter_hpa": 1018
}

Clouds "vv" ?

Is that right?

METAR EFJY 181850Z AUTO VRB00KT 0250 R12/1000D FZFG VV001 M03/M03 Q0992=

Parse weather condition groups to separate objects

Now only one array is generated which loses information.

EFJY 092120Z AUTO 05003KT 9999 -SHRA VCSH SCT006 OVC028CB 13/13 Q1014

should parse to

{
  weather: [
    { <obj for -SHRA> },
    { <obj for VCSH> }
  ]
}

cloud parse fail

fails to parse clouds from this EFJY 092120Z AUTO 05003KT 9999 -SHRA VCSH SCT006 OVC028CB 13/13 Q1014

REUP?

EFVA 171650Z AUTO 30007KT 260V320 9999 -SHRA FEW022/// SCT031/// OVC037/// 09/04 Q1009 REUP

Cant parse corrected metars

The parser can parse XX% of metars, but any metar with a little bit different sequence of infos will confuse it. For instance any corrected metars.

PAOM 302353Z COR 32005KT 10SM CLR M03/M09 A2993

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.