| 1 | #ifndef _YASIM_COMMON_HPP |
| 2 | #define _YASIM_COMMON_HPP |
| 3 | |
| 4 | #include <string> |
| 5 | #include <vector> |
| 6 | #include <algorithm> |
| 7 | /* |
| 8 | common file for YASim wide constants and static helper functions |
| 9 | */ |
| 10 | namespace yasim { |
| 11 | static const float YASIM_PI = 3.14159265358979323846f; |
| 12 | static const float PI2 = YASIM_PI*2; |
| 13 | static const float RAD2DEG = 180/YASIM_PI; |
| 14 | static const float DEG2RAD = YASIM_PI/180; |
| 15 | static const float RPM2RAD = YASIM_PI/30; |
| 16 | |
| 17 | static const float KTS2MPS = 1852.0f/3600.0f; |
| 18 | static const float MPS2KTS = 3600.0f/1852.0f; |
| 19 | static const float KMH2MPS = 1/3.6f; |
| 20 | |
| 21 | static const float FT2M = 0.3048f; |
| 22 | static const float M2FT = 1/FT2M; |
| 23 | |
| 24 | static const float LBS2N = 4.44822f; |
| 25 | static const float N2LB = 1/LBS2N; |
| 26 | static const float KG2N = 9.81f; |
| 27 | static const float LBS2KG = 0.45359237f; |
| 28 | static const float KG2LBS = 1/LBS2KG; |
| 29 | static const float CM2GALS = 264.172037284f; |
| 30 | static const float HP2W = 745.700f; |
| 31 | static const float INHG2PA = 3386.389f; |
| 32 | static const float K2DEGF = 1.8f; |
| 33 | static const float K2DEGFOFFSET = -459.4f; |
| 34 | static const float CIN2CM = 1.6387064e-5f; |
| 35 | |
| 36 | static const float NM2FTLB = (1/(LBS2N*FT2M)); |
| 37 | static const float SLUG2KG = 14.59390f; |
| 38 | |
| 39 | static const float INCIDENCE_MIN = -20*DEG2RAD; |
| 40 | static const float INCIDENCE_MAX = 20*DEG2RAD; |
| 41 | }; //namespace yasim |
| 42 | |
| 43 | #endif // ifndef _YASIM_COMMON_HPP |