Updraft  1.0
Open source glider flight visualisation tool.
units.h
Go to the documentation of this file.
00001 #ifndef UPDRAFT_SRC_LIBRARIES_UTIL_UNITS_H_
00002 #define UPDRAFT_SRC_LIBRARIES_UTIL_UNITS_H_
00003 
00004 #include "util.h"
00005 
00006 namespace Updraft {
00007 namespace Util {
00009 class Units {
00010  public:
00012   static qreal metersToFeet(qreal meters) { return (1.0/0.3048) * meters; }
00013 
00015   static qreal feetToMeters(qreal feet) { return 0.3048 * feet; }
00016 
00018   static qreal nauticlaMilesToMeters(qreal nm) { return 1852 * nm; }
00019 
00021   static qreal statuteMilesToMeters(qreal ml) { return 1609.344 * ml; }
00022 
00024   static qreal FAISphereRadius() { return 6371000.0; }
00025 
00027   static qreal WGS84EquatRadius() { return 6378137.0; }
00028 
00030   static qreal WGS84Flattening() { return 1.0/298.257223563; }
00031 };
00032 
00033 }  // End namespace Util
00034 }  // End namespace Updraft
00035 
00036 #endif  // UPDRAFT_SRC_LIBRARIES_UTIL_UNITS_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines