Virtual Testbed
Ship dynamics simulator for extreme conditions
constants.hh
1 #ifndef VTESTBED_BASE_CONSTANTS_HH
2 #define VTESTBED_BASE_CONSTANTS_HH
3 
4 #include <cmath>
5 
6 namespace vtb {
7 
9  namespace base {
10 
11  template <class T>
12  struct constants {
13 
15  static constexpr const T g() { return T{9.82}; }
16 
18  static constexpr const T pi() { return T{M_PI}; }
19 
21  static constexpr const T pi(T x) { return T{x}*pi(); }
22 
24  static constexpr T atmospheric_pressure() { return T{101325}; }
25 
27  static constexpr const T water_density() { return T{1030}; }
28 
30  static constexpr const T air_density() { return T{1.225}; }
31 
32  };
33 
34  }
35 
36 }
37 
38 #endif // vim:filetype=cpp
static constexpr const T g()
Gravitational acceleration.
Definition: constants.hh:15
static constexpr const T water_density()
Sea water density.
Definition: constants.hh:27
static constexpr T atmospheric_pressure()
Sea-level atmospheric pressure.
Definition: constants.hh:24
static constexpr const T pi()
Definition: constants.hh:18
static constexpr const T pi(T x)
Definition: constants.hh:21
static constexpr const T air_density()
Air density.
Definition: constants.hh:30
Main namespace.
Definition: convert.hh:9