BoosterSeat  0.1
A C++ library that includes common utilities that are used in other projects.
science.hpp
Go to the documentation of this file.
1 
9 #ifndef BST_SCIENCE_HPP_
10 #define BST_SCIENCE_HPP_
11 
12 namespace bst {
13 
15 inline constexpr double K_GRAVITY = 9.80665;
16 
17 class Pressure {
18 public:
19  Pressure() = default;
20 
21  void setFromPascals(double pascals);
22  double pascals() const;
23 
24  void setFromMillibars(double millibars);
25  double millibars() const;
26 
27  void setFromInchesMercury(double inches_mercury);
28  double inchesMercury() const;
29 
30  void setFromPSI(double psi);
31  double psi() const;
32 
33  void setFromAtmospheres(double atmospheres);
34  double atmospheres() const;
35 
36 private:
37  double pressure_pascals_ = 0.0;
38 };
39 
40 } // namespace bst
41 
42 #endif /* BST_SCIENCE_HPP_ */
Definition: science.hpp:17
double psi() const
Definition: science.cpp:45
void setFromInchesMercury(double inches_mercury)
Definition: science.cpp:30
double millibars() const
Definition: science.cpp:25
void setFromPascals(double pascals)
Definition: science.cpp:12
void setFromMillibars(double millibars)
Definition: science.cpp:20
double pressure_pascals_
Definition: science.hpp:37
double atmospheres() const
Definition: science.cpp:55
void setFromAtmospheres(double atmospheres)
Definition: science.cpp:50
double inchesMercury() const
Definition: science.cpp:35
void setFromPSI(double psi)
Definition: science.cpp:40
double pascals() const
Definition: science.cpp:16
Pressure()=default
Definition: filesystem.cpp:34
constexpr double K_GRAVITY
Standard gravity constant.
Definition: science.hpp:15