diff --git a/CMakeLists.txt b/CMakeLists.txt index d14d213..2dc2433 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,3 +67,7 @@ if (GIT_FOUND) else() message("Git not found - will not rename the exectuable.") endif() + +# Include header-only library +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/astro/include) + diff --git a/hello.cpp b/hello.cpp index 104fff2..c61a802 100644 --- a/hello.cpp +++ b/hello.cpp @@ -92,8 +92,19 @@ float getTime() return timeSpan.count(); } +#include +#include +#include "astro/twoBodyMethods.hpp" + int main() { + // Calculate period of ISS orbit around the Earth + const float semiMajorAxis = 6738000; + const float gravitationalParameter = 3.986e14; + float period = astro::computeKeplerOrbitalPeriod(semiMajorAxis, gravitationalParameter); + period /= 60.0; + std::cout << period << std::endl; + // Set up GLFW, OpenGL and GLEW. if (!glfwInit()) return -1;