feat: calculate ISS orbital period
This commit is contained in:
parent
bb26861633
commit
86e8775158
|
@ -67,3 +67,7 @@ if (GIT_FOUND)
|
||||||
else()
|
else()
|
||||||
message("Git not found - will not rename the exectuable.")
|
message("Git not found - will not rename the exectuable.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Include header-only library
|
||||||
|
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/lib/astro/include)
|
||||||
|
|
||||||
|
|
11
hello.cpp
11
hello.cpp
|
@ -92,8 +92,19 @@ float getTime()
|
||||||
return timeSpan.count();
|
return timeSpan.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <cmath>
|
||||||
|
#include "astro/twoBodyMethods.hpp"
|
||||||
|
|
||||||
int main()
|
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.
|
// Set up GLFW, OpenGL and GLEW.
|
||||||
if (!glfwInit())
|
if (!glfwInit())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue