Engines
formulas.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2007 by Shawn Starr <shawn.starr@rogers.com> * 00003 * * 00004 * This program is free software; you can redistribute it and/or modify * 00005 * it under the terms of the GNU General Public License as published by * 00006 * the Free Software Foundation; either version 2 of the License, or * 00007 * (at your option) any later version. * 00008 * * 00009 * This program is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00012 * GNU General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU General Public License * 00015 * along with this program; if not, write to the * 00016 * Free Software Foundation, Inc., * 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 00018 ***************************************************************************/ 00019 00020 /* Meteorological formula class */ 00021 00022 #ifndef _WEATHERFORMULA_H 00023 #define _WEATHERFORMULA_H 00024 00025 #include "ion_export.h" 00026 00027 namespace WeatherFormula 00028 { 00029 // Convert Temperatures, pressures 00030 ION_EXPORT float celsiusToF(float temperature); 00031 ION_EXPORT float fahrenheitToC(float temperature); 00032 ION_EXPORT float milesToKM(float miles); 00033 ION_EXPORT float kilometersToMI(float km); 00034 ION_EXPORT float kilopascalsToInches(float kpa); 00035 ION_EXPORT float inchesToKilopascals(float inches); 00036 ION_EXPORT float millibarsToKilopascals(float milibar); 00037 ION_EXPORT float millibarsToInches(float milibar); 00038 ION_EXPORT float centimetersToIN(float cm); 00039 ION_EXPORT float inchesToCM(float inch); 00040 ION_EXPORT float millimetersToIN(float mm); 00041 ION_EXPORT float inchesToMM(float inch); 00042 00043 // Winds measured in meters per second 00044 ION_EXPORT float kilometersToMS(float km); 00045 ION_EXPORT float milesToMS(float miles); 00046 ION_EXPORT float knotsToMS(float knots); 00047 00048 // Winds measured in knots 00049 ION_EXPORT float kilometersToKT(float km); 00050 ION_EXPORT float milesToKT(float miles); 00051 ION_EXPORT float knotsToKM(float knots); 00052 ION_EXPORT float knotsToMI(float knots); 00053 00054 // Winds measured in beaufort scale value 00055 ION_EXPORT int knotsToBF(float knots); 00056 ION_EXPORT int milesToBF(float miles); 00057 ION_EXPORT int kilometersToBF(float km); 00058 00059 } // WeatherFormula namespace 00060 00061 #endif