All Projects → mivek → MetarParser

mivek / MetarParser

Licence: MIT license
A java program decoding metar and taf

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to MetarParser

riem
✈️ ☀️ R package for accessing ASOS data via the Iowa Environment Mesonet ☁️ ✈️
Stars: ✭ 38 (+26.67%)
Mutual labels:  weather, metar
wetterdienst
Open weather data for humans
Stars: ✭ 190 (+533.33%)
Mutual labels:  weather
Compass
Compass on Android
Stars: ✭ 47 (+56.67%)
Mutual labels:  weather
Tablet-desk-clock
Software for displaying a clock on a tablet.
Stars: ✭ 24 (-20%)
Mutual labels:  weather
Keras-MultiClass-Image-Classification
Multiclass image classification using Convolutional Neural Network
Stars: ✭ 48 (+60%)
Mutual labels:  weather
react-weather-app
Weather App built with React & TypeScript
Stars: ✭ 61 (+103.33%)
Mutual labels:  weather
nuxt-weather
This weather app is just my sandbox to play with SSR and Nuxt.js ⛱️
Stars: ✭ 30 (+0%)
Mutual labels:  weather
VWapi
⛈ ☀️ Visual Weather api. Returns beautiful pictures with the current weather.
Stars: ✭ 33 (+10%)
Mutual labels:  weather
esp32-e-paper-weatherdisplay
An ESP32 and 4.2" ePaper Display reads Dark Sky weather API and displays the weather using ESP-IDF
Stars: ✭ 110 (+266.67%)
Mutual labels:  weather
grib-rs
GRIB format parser for Rust
Stars: ✭ 23 (-23.33%)
Mutual labels:  weather
File-Maker
Generate data files for Wii Channels that have the latest news, forecast data, etc.
Stars: ✭ 65 (+116.67%)
Mutual labels:  weather
darksky
Forecast.io API wrapper in Go (Golang)
Stars: ✭ 74 (+146.67%)
Mutual labels:  weather
sharpy
Simulation of High Aspect Ratio aeroplanes and wind turbines in Python: a nonlinear aeroelastic code
Stars: ✭ 81 (+170%)
Mutual labels:  aeronautics
goestools
📡 LRIT demodulator from weather satellite GEO-KOMPSAT-2A (GK-2A).
Stars: ✭ 23 (-23.33%)
Mutual labels:  weather
gribr
GRIB interface for R using ECMWF ecCodes
Stars: ✭ 18 (-40%)
Mutual labels:  weather
weather icons
Flutter library for using erikflowers/weather-icons. An icon pack with over 200 weather icons.
Stars: ✭ 12 (-60%)
Mutual labels:  weather
ip2location-iata-icao
This list contains the airport codes of IATA airport code and ICAO airport code together with country code and region name supported in IP2Location geolocation database.
Stars: ✭ 39 (+30%)
Mutual labels:  icao
paper-weather
☀️🌧 Material design weather element inspired by google weather
Stars: ✭ 14 (-53.33%)
Mutual labels:  weather
Colorfulclouds-weather
用于HASS的彩云天气组件
Stars: ✭ 57 (+90%)
Mutual labels:  weather
weather
A privacy friendly weather app for Android with built in rain radar
Stars: ✭ 209 (+596.67%)
Mutual labels:  weather

Maven verify Sonar verifyQuality Gate Status Coverage GitHub license Maven Central

MetarParser

This java lib provides a Metar and TAF decoder.

Table of content

  1. Adding dependency
  2. Model
    1. Enumerations
    2. Classes
  3. Examples
    1. Parse a metar
    2. Retrieve a metar
    3. Parse a taf
    4. Retrieve a taf
  4. Internationalization

Architecture of the project

This project is divided into multiple maven module

  • metarParser-entities: Contains the model and the enumerations
  • metarParser-parsers: Contains the parsers and the commands
  • metarParser-services: Contains a service allowing you to parse or retrieve METAR and TAF
  • metarParser-spi: Contains the SPI
  • metarParser-commons: Contains utility and internationalization classes

Adding the dependency

To add the service module :

<dependency>
  <groupId>io.github.mivek</groupId>
  <artifactId>metarParser-services</artifactId>
  <version>latest</version>
</dependency>

Or check here if you are not using maven.

Model

The class diagrams are generated by IntelliJ When updating classes, regenerate the diagrams and save the images in the project. class diagram

Enumerations

The application contains numerous enumerations to represent data.

  • 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 description of a meteorological phenomenon.
  • DepositType: to represent the type of deposit on a runway.
  • DepositCoverage: to represent the percentage of the runway covered by the deposit.
  • DepositThickness: to represent the thickness of the deposit.
  • DepositBrakingCapacity: to represent the braking capacity on the runway.
  • Phenomenon: to represent a phenomenon.
  • RunwayInfoTrend: to represent the visibility trend on a runway.
  • WeatherChangeTime: to represent a trend.
  • TimeIndicator: to represent the time of the trend.

Classes

Airport

The airport class is composed of

  • Name
  • City
  • Country
  • IATA code
  • ICAO code
  • latitude
  • longitude
  • altitude
  • timezone Note: Depending on the source for the airports, fields can be null

Cloud

In this application a cloud is composed of

  • CloudQuantity
  • CloudType (optional)
  • height (optional)

Country

A country is represented by its name.

Runway information

The runway information can represent either a visual range or a deposit.

If the object represents a visual range the field minRange is non-null.

The runway information is composed of

  • The name of the runway
  • The minimal visibility on the runway (optional)
  • The indicator of the visual range. Either "greater than", "less than" or empty. (optional)
  • The maximal visibility on the runway (optional)
  • The trend of the visibility (optional)
  • The type of deposit (optional)
  • The percentage of coverage on the runway
  • The thickness of the deposit.
  • The braking capacity on the runway.

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 minimal wind variation in degrees
  • the maximal wind variation in degrees
  • the unit of the wind's speed

WindShear

This class is a subclass of Wind. It is composed of

  • the height of the wind shear.

Trends

trends diagram

Both METAR and TAF objects have a list of trends. For the METAR object the MetarTrend represents the trend. For TAF object the trends can be FMTafTrend, TafTrend and TafProbTrend. It is possible to get a specific type of Trend for TAF with methods:

  • getBECMGs
  • getFMs
  • getProbs
  • getTempos
  • getInters

Trends inherit from AbstractWeatherContainer so they have the following fields:

  • a wind
  • a windshear
  • a visibility and vertical visibility
  • a list of clouds
  • a list of weather conditions
  • a Remark

Airports loading

By default, airports are loaded from the temporary file airport.dat It is possible to provide your own source of airports via spi. See spi module for details.

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";
MetarService service = MetarService.getInstance();
Metar metar = service.decode(code);

Retrieve the metar of an airport

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

String icao = "LFPG";
MetarService service = MetarService.getInstance();
Metar metar = service.retrieveFromAirport(icao);

Parse a taf

Use the TAFFacade to decode the taf.

String message = "TAF LFPG 150500Z 1506/1612 17005KT 6000 SCT012 \n" 
                  +"TEMPO 1506/1509 3000 BR BKN006 PROB40 \n"
                  +"TEMPO 1506/1508 0400 BCFG BKN002 PROB40 \n"
                  +"TEMPO 1512/1516 4000 -SHRA FEW030TCU BKN040 \n" 
                  +"BECMG 1520/1522 CAVOK \n"
                  +"TEMPO 1603/1608 3000 BR BKN006 PROB40 \n"
                  +"TEMPO 1604/1607 0400 BCFG BKN002 TX17/1512Z TN07/1605Z";
TAFService service = TAFService.getInstance();
TAF taf = service.decode(message);

Lines of the message have to be separated by a "\n" character.

Retrieve a taf

Use the TAFFacade and the method retrieveFromAirport with the ICAO code of the airport.

String icao = "LFPG";
TAFService service = TAFService.getInstance();
TAF taf = service.retrieveFromAirport(icao);

Internationalization

The default locale is english. The following locales are also available in the project but may not be fully translated:

  • French
  • German
  • Polish
  • Italian
  • simplified chinese

Change the locale and contributing

To change the locale use the method setLocale(Locale) of the class Messages.java

Messages.getInstance().setLocale(Locale.FRENCH); // Changes the locale to french.

If you are willing to add a new locale or contribute to the project please see Contributing.md file.

Jetbrains open source project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].