Download the PHP package soandso/synop without Composer
On this page you can find all versions of the php package soandso/synop. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download soandso/synop
More information about soandso/synop
Files in soandso/synop
Package synop
Short Description Synop (AAXX/BBXX) weather report decoder
License GPL-2.0-or-later
Informations about the package synop
Synop (AAXX/BBXX) weather report decoder
PHP library for decoding SYNOP (AAXX) strings of weather reports.
You can try out the library on the demo site
Introduction
This library component is a parser for decoding the raw SYNOP weather report.
SYNOP (surface synoptic observations) is a numerical code (called FM-12 by WMO) used for reporting weather observations made by manned and automated weather stations. A report consists of groups of numbers and symbols describing meteorological parameters, that observes at a weather station.
See more details at Manual of Codes. International of codes. Volume I.1. World Meteorological Organization, 2011
There are such forms of surface synoptic observations
- SYNOP - Report of surface observation from a fixed land station
- SHIP - Report of surface observation from a sea station
- SYNOP MOBILE - Report of surface observation from a mobile land station
The current version of the library works with the SYNOP code form.
Requirements
This library only requires PHP >= 7.4
Setup
Add the library to your composer.json file in your project:
Use composer to install the library:
Composer will install synop decoder library inside your vendor folder. Then you can add the following to your .php files to use the library with Autoloading.
You can also use composer on the command line to require and install Grouping:
Usage
Instantiate the class with the SYNOP weather report string. To check the of the original weather report, use the validate method of the object.
If the summary is in a valid format, you can get the decoded SYNOP parameters. The object contains methods for getting decoded data.
Available Methods of the Report Object
Contribute
If you find a SYNOP report that is poorly parsed by this library, please open a GitHub issue with as many details as possible.
To improve the test suite, fork the repository and push your changes using a pull request.
If you have an idea to improve the library, develop new features, use GitHub issues, or direct pull requests. To contribute to the codebase, you should fork the repository on GitHub and then clone it locally. Make changes to the code and submit a pull request.
The documentation of the program code can be viewed in the directory.
A simplified sequence diagram of one of the main methods - of the class.
Code quality and test coverage are analyzed by the Codacy service
Standards
Synop conforms to the following standards:
- PSR-2 - Basic coding standard (https://www.php-fig.org/psr/psr-2/)
- PSR-4 - Autoloader (https://www.php-fig.org/psr/psr-4/)
- PSR-12 - Extended coding style guide (https://www.php-fig.org/psr/psr-12/)
License
Grouping is licensed under the GPLv2 License (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).