Giter VIP home page Giter VIP logo

metar2300's Introduction

metar2300

PHP code which reads your WS2300 weather station and converts into a nice METAR string.

Description

This PHP library implements the METAR [1] format for weather stations that are supported by the Open2300 software [2]. Since the ws2300 series weather stations only support a subset of the parameters used in METAR, only these parts are implemented.

It basically provides functions to create a METAR based on data stored in a MySQL table which is filled by mysql2300, which is part of Open2300. The idea is that you have a weather station that is connected to a linux computer running mysql2300 every minute. The data is stored in a table, which is parsed by this library to create the requested METAR.

This library includes the function metar2300(). It will return a string containing the METAR for the given time. Other functions could be used to get parts of the METAR, but these are not documented yet.

Configuration

The file metar2300.conf.php.inc should reside in the same directory as metar2300.inc or in a directory listed in the include_path setting in your php.ini. For security reasons we recommend you to use the second option, since the configuration file includes login credentials for your MySQL database. You may also consider using a seperate MySQL account for metar2300 which is only allowed to use the "SELECT" SQL statement on the weather table.

Syntax

Syntax for metar2300():

$metar = metar2300 (int $timestamp, mixed $report_modifier);

To do

This is the first release. There is still lots of work to do. For myself I would like to add the following features:

  • implement variable wind direction (examples: 180V240, VRB03KT)
  • convert rain_1h field to something like -RA, RA, +RA

References

metar2300's People

Contributors

pa3hcm 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.