libwreport  2.9
conv.h
Go to the documentation of this file.
1 /*
2  * wreport/conv - Unit conversions
3  *
4  * Copyright (C) 2005--2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * Author: Enrico Zini <enrico@enricozini.com>
20  */
21 
22 #ifndef WREPORT_CONV
23 #define WREPORT_CONV
24 
30 namespace wreport {
31 
46 double convert_units(const char* from, const char* to, double val);
47 
51 double convert_icao_to_press(double from);
52 
56 double convert_press_to_icao(double from);
57 
61 double convert_octants_to_degrees(int from);
62 
66 int convert_degrees_to_octants(double from);
67 
72 int convert_AOFVSS_to_BUFR08042(int from);
73 
78 int convert_WMO0500_to_BUFR20012(int from);
80 int convert_WMO0509_to_BUFR20012(int from);
82 int convert_WMO0515_to_BUFR20012(int from);
84 int convert_WMO0513_to_BUFR20012(int from);
86 int convert_WMO4677_to_BUFR20003(int from);
88 int convert_WMO4561_to_BUFR20004(int from);
89 
91 int convert_BUFR20012_to_WMO0500(int from);
93 int convert_BUFR20012_to_WMO0509(int from);
95 int convert_BUFR20012_to_WMO0515(int from);
97 int convert_BUFR20012_to_WMO0513(int from);
99 int convert_BUFR20003_to_WMO4677(int from);
101 int convert_BUFR20004_to_WMO4561(int from);
103 int convert_BUFR08001_to_BUFR08042(int from);
105 int convert_BUFR08042_to_BUFR08001(int from);
106 /* @} */
107 
118 double convert_units_get_mul(const char* from, const char* to);
119 
130 bool convert_units_allowed(const char* from, const char* to);
131 }
132 
133 /* vim:set ts=4 sw=4: */
134 #endif
int convert_BUFR20012_to_WMO0500(int from)
Cloud type.
int convert_WMO4677_to_BUFR20003(int from)
Present weather.
int convert_BUFR08042_to_BUFR08001(int from)
Vertical sounding significance.
double convert_icao_to_press(double from)
Convert ICAO height (in meters) to pressure (in hpa) and back.
int convert_WMO4561_to_BUFR20004(int from)
Past weather.
double convert_press_to_icao(double from)
Convert pressure (in hpa) to ICAO height (in meters)
bool convert_units_allowed(const char *from, const char *to)
Check if conversion is possible among the given units.
int convert_WMO0500_to_BUFR20012(int from)
Conversion functions between various code tables.
int convert_WMO0509_to_BUFR20012(int from)
Cloud type (CH)
double convert_units(const char *from, const char *to, double val)
Convert between different units.
double convert_octants_to_degrees(int from)
Convert wind direction (in octants) to degrees.
int convert_BUFR20012_to_WMO0513(int from)
Cloud type (CL)
int convert_BUFR20003_to_WMO4677(int from)
Present weather.
int convert_WMO0515_to_BUFR20012(int from)
Cloud type (CM)
double convert_units_get_mul(const char *from, const char *to)
Get the multiplier used in the given conversion.
int convert_BUFR08001_to_BUFR08042(int from)
Vertical sounding significance.
int convert_BUFR20012_to_WMO0509(int from)
Cloud type (CH)
int convert_AOFVSS_to_BUFR08042(int from)
Convert vertical sounding significance from the AOF encoding to BUFR code table 08001.
int convert_BUFR20012_to_WMO0515(int from)
Cloud type (CM)
int convert_BUFR20004_to_WMO4561(int from)
Past weather.
int convert_degrees_to_octants(double from)
Convert wind direction (in degrees) to octancts.
int convert_WMO0513_to_BUFR20012(int from)
Cloud type (CL)