Code Monkey home page Code Monkey logo

metarparser's Introduction

Build Status Maintainability codecov

MetarParser

This java lib provides a Metar decoder.

Use the MetarFacade class and its method decode to decode a metar. Use the MetarFacade class and its method retrieveFromAirport to get the metar of an airport. This metod take the icao code as parameter. The trends of the metar are not parsed.

Model

class diagram

Enumerations

The application contains numerous enumarations to represent datas.

  • CloudType: to represent the type of cloud.
  • CloudQuantity: to represent the amount of clouds.
  • Intensity: to represent the intensity of a meteorological phenomenon.
  • Descriptive: to represent the descriptive of a meteorological phenomenon.
  • Phenomenon: to represent a phenomenon.

Classes

Airport

The airport class is composed of

  • Name
  • City
  • Country
  • IATA code
  • ICAO code
  • latitude
  • longitude
  • altitude
  • timezone

Cloud

In this application a cloud is composed of

  • CloudQuantity
  • CloudType (optional)
  • altitude (optional)

Country

A country is represented by its name.

Runway information

The runway information is composed of

  • The name of the runway
  • The minimal visibility on the runway
  • The maximal visibility on the runway (optional)
  • The trend of the visibility (optional)

Visibility

The visibility class is composed of

  • The main visibility
  • The minimal visibility (optional)
  • The direction of the minimal visibility (optional)

WeatherCondition

The weather condition is class to represent a meteorological phenomenon. A weather condition is composed of

  • an intensity (optional)
  • a descriptive (optional)
  • a list of phenomenon

Wind

The wind class is composed of

  • the speed
  • the direction
  • the speed of the gust
  • the lowest variable wind
  • the highest variable wind
  • the unit of the wind's speed

Examples

Parse a metar

Instantiate the metarFacade and use its method parse.

String code = "LFPG 131830Z 19005KT 170V250 9999 -SHRA FEW040TCU SCT086 16/08 Q1011";
MetarFacade facade = MetarFacade.getInstance();
Metar metar = facade.decode(code);

Retrieve the metar of an airport

Instantiate the metarFacade. Use the its method retrieveFromAirport with the ICAO code of the airport.

String icao = "LFPG";
MetarFacade facade = MetarFacade.getInstance();
Metar metar = facade.retrieveFromAirport(icao);

metarparser's People

Contributors

mivek avatar

Watchers

 avatar

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.