Skip to content

Commit

Permalink
change gnuplot enable to check value of define
Browse files Browse the repository at this point in the history
  • Loading branch information
EirikKolas committed Mar 10, 2024
1 parent a8f6c06 commit 41f95f4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions vortex-filtering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ install(
)

if(BUILD_TESTING)
# add_compile_definitions(GNUPLOT_ENABLE=1)
add_subdirectory(test)
endif()

Expand Down
2 changes: 1 addition & 1 deletion vortex-filtering/test/dynamic_model_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ TEST(DynamicModel, sampleSimpleModel)
EXPECT_TRUE(isApproxEqual(approx_gauss.mean(), true_gauss.mean(), 0.1));
EXPECT_TRUE(isApproxEqual(true_gauss.cov(), true_gauss.cov(), 0.1));

#ifdef GNUPLOT_ENABLE
#if (GNUPLOT_ENABLE)
// Plot
Gnuplot gp;
gp << "set xrange [-10:10]\nset yrange [-10:10]\n";
Expand Down
2 changes: 1 addition & 1 deletion vortex-filtering/test/ekf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ TEST_F(EKFTestCVModel, convergence)
}
time.pop_back();

#ifdef GNUPLOT_ENABLE
#if (GNUPLOT_ENABLE)
Gnuplot gp;
gp << "set terminal qt size 1600,1000\n"; // Modified to make plot larger
gp << "set multiplot layout 2,1\n";
Expand Down
2 changes: 1 addition & 1 deletion vortex-filtering/test/numerical_integration_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class NumericalIntegration : public ::testing::Test {

void plot_result(std::string title = "ERK convergence")
{
#ifdef GNUPLOT_ENABLE
#if (GNUPLOT_ENABLE)
// Plot first state and true solution against time
Gnuplot gp;
gp << "set terminal wxt size 1200,800\n";
Expand Down
2 changes: 1 addition & 1 deletion vortex-filtering/test/probability_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ TEST(MultiVarGauss, sample)
double minorAxisLength = cov_ellipse.minor_axis();
double angle = cov_ellipse.angle_deg();

#ifdef GNUPLOT_ENABLE
#if (GNUPLOT_ENABLE)
Gnuplot gp;
gp << "set xrange [-10:10]\nset yrange [-10:10]\n";
gp << "set style circle radius 0.05\n";
Expand Down
2 changes: 1 addition & 1 deletion vortex-filtering/test/ukf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ TEST_F(UKFtest, Convergence)
x_m_std.push_back(x_est.at(i).mean()(0) - std::sqrt(x_est.at(i).cov()(0, 0))); // x_est - std
}

#ifdef GNUPLOT_ENABLE
#if (GNUPLOT_ENABLE)
Gnuplot gp;
gp << "set terminal wxt size 1200,800\n";
gp << "set title 'UKF convergence'\n";
Expand Down

0 comments on commit 41f95f4

Please sign in to comment.