From cb4249801d7f3678a525ee21f01d58d6eec6489b Mon Sep 17 00:00:00 2001 From: Travis Hunter Date: Mon, 13 Feb 2023 19:09:49 -0700 Subject: [PATCH] WIP --- CMakeLists.txt | 3 +++ src/Utils/math/CMakeLists.txt | 3 +++ src/Utils/math/Constants.cpp | 1 + src/Utils/math/Constants.h | 10 +++++----- src/sim/CMakeLists.txt | 3 ++- 5 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 src/Utils/math/CMakeLists.txt create mode 100644 src/Utils/math/Constants.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a14268..2cc871a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,9 +23,12 @@ endif() enable_testing() +include_directories(".") + add_subdirectory(src/gui) add_subdirectory(src/sim) add_subdirectory(src/Utils) +add_subdirectory(src/Utils/math) add_subdirectory(src/model) #find_package(wxWidgets REQUIRED gl core base) diff --git a/src/Utils/math/CMakeLists.txt b/src/Utils/math/CMakeLists.txt new file mode 100644 index 0000000..6156c19 --- /dev/null +++ b/src/Utils/math/CMakeLists.txt @@ -0,0 +1,3 @@ +add_library(math + Constants.cpp) + diff --git a/src/Utils/math/Constants.cpp b/src/Utils/math/Constants.cpp new file mode 100644 index 0000000..bb08b1d --- /dev/null +++ b/src/Utils/math/Constants.cpp @@ -0,0 +1 @@ +#include "Constants.h" \ No newline at end of file diff --git a/src/Utils/math/Constants.h b/src/Utils/math/Constants.h index 40b3250..e92fd1c 100644 --- a/src/Utils/math/Constants.h +++ b/src/Utils/math/Constants.h @@ -4,12 +4,12 @@ namespace utils::math { -struct Constants +namespace Constants { - static const double Rstar = 8.3144598; - static const double g0 = 9.80665; - static const double airMolarMass = 0.0289644; - static const double standardTemperature = 288.15; + constexpr double Rstar = 8.3144598; + constexpr const double g0 = 9.80665; + constexpr const double airMolarMass = 0.0289644; + constexpr const double standardTemperature = 288.15; }; } // namespace utils::math diff --git a/src/sim/CMakeLists.txt b/src/sim/CMakeLists.txt index cdb8487..72bb603 100644 --- a/src/sim/CMakeLists.txt +++ b/src/sim/CMakeLists.txt @@ -1,5 +1,6 @@ add_library(sim AtmosphericModel.cpp GravityModel.cpp - WindModel.cpp) + WindModel.cpp + USStandardAtmosphere.cpp)