diff options
Diffstat (limited to 'test/actuationPlanTest.cpp')
| -rw-r--r-- | test/actuationPlanTest.cpp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/test/actuationPlanTest.cpp b/test/actuationPlanTest.cpp deleted file mode 100644 index 72410b0..0000000 --- a/test/actuationPlanTest.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include <iostream> -#include <gtest/gtest.h> -#include "../include/surfaceFitModel.hpp" -#include "../include/actuationPlan.hpp" -#include "../include/rocketUtils.hpp" - - -class ActuationPlanTest : public ::testing::Test { - - protected: - - ActuationPlanTest() { - - SurfaceFitModel sfm = SurfaceFitModel(); - plan = new ActuationPlan(sfm); - } - - //~ActuationPlanTest() {} - - ActuationPlan *plan; -}; - - -/** - * @brief Tests running the Actuation Plan - * - * **/ -TEST_F(ActuationPlanTest, runPlan) { - - Vehicle rocket; - - rocket.imuInitFail = false; - rocket.imuReadFail = false; - rocket.altiInitFail = false; - rocket.altiReadFail = false; - - // Test when Vehicle Status: Glide - rocket.fail_time = (time_t)(-1); - rocket.deploy_time = time(nullptr); - rocket.status = GLIDE; - rocket.filtered_altitude = 1; - rocket.filtered_velocity = 2; - plan->runPlan(rocket); - EXPECT_NEAR(rocket.deployment_angle, 120.0, 0.01); - EXPECT_NE(rocket.fail_time, (time_t)(-1)); - - // Test when Vehicle Status: Apogee - rocket.deploy_time = time(nullptr); - rocket.status = APOGEE; - rocket.filtered_altitude = 1; - rocket.filtered_velocity = 2; - plan->runPlan(rocket); - EXPECT_NEAR(rocket.deployment_angle, 110.0, 0.01); -}
\ No newline at end of file |
