feat: calculate ISS orbital period

This commit is contained in:
Cat Flynn 2023-07-27 01:04:23 +02:00 committed by ktyl
parent bb26861633
commit 86e8775158
2 changed files with 15 additions and 0 deletions

View File

@ -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)

View File

@ -92,8 +92,19 @@ float getTime()
return timeSpan.count();
}
#include <vector>
#include <cmath>
#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;