diff --git a/empennage_design/src/taw/conventional/low/lowConventionalEmpennageDesignPlot.cpp b/empennage_design/src/taw/conventional/low/lowConventionalEmpennageDesignPlot.cpp index 952e9c0361373af1cb7e32f14cb3d1a23a37f835..6eea5beca4917e49fe1e50040f368c58de7651b2 100644 --- a/empennage_design/src/taw/conventional/low/lowConventionalEmpennageDesignPlot.cpp +++ b/empennage_design/src/taw/conventional/low/lowConventionalEmpennageDesignPlot.cpp @@ -133,11 +133,6 @@ fs::path Conventional::plot_stabilizer_planform( chordwise.push_back(it->origin.x() + it->get_chord_length()); } - // /* Get mac coordinates */ - // auto mac_position_y = geom2::measure::mean_aerodynamic_chord_position(data->wing); - // auto mac_position = geom2::measure::offset_LE(data->wing,mac_position_y); - // auto mac = geom2::measure::chord(data->wing,mac_position_y); - /* Generate plot */ std::string name = surface.name; std::replace(name.begin(), name.end(), '_', ' '); @@ -203,17 +198,16 @@ fs::path Conventional::plot_stabilizer_planform( ax->legend()->box(true); ax->legend()->font_size(8); - fs::path plot_path = rtIO->getPlotDir() + "/" + surface.name + "_planfrom.svg"; + fs::path plot_path = rtIO->getPlotDir() + "/empennage_design_" + surface.name + "_planform.svg"; matplot::save(f, plot_path.string(), "svg"); std::this_thread::sleep_for(std::chrono::milliseconds(500)); - system("pkill gnuplot"); return fs::relative(plot_path, fs::path(rtIO->getHtmlDir())); } fs::path Conventional::plot_thickness_and_twist_distribution( const geom2::MultisectionSurface<geom2::AirfoilSection>& surface) { /* Plot active */ - if (rtIO->plotOn) { + if (!rtIO->plotOn) { return ""; } std::vector<double> eta; @@ -245,10 +239,9 @@ fs::path Conventional::plot_thickness_and_twist_distribution( ax2->grid(true); ax2->ylim({*twist_min - 0.01, *twist_max + 0.01}); - fs::path plot_path = rtIO->getPlotDir() + "/" + surface.name + "_thickness_and_twist_distribution.svg"; + fs::path plot_path = rtIO->getPlotDir() + "/empennage_design_" + surface.name + "_thickness_and_twist_distribution.svg"; matplot::save(f, plot_path.string(), "svg"); std::this_thread::sleep_for(std::chrono::milliseconds(500)); - system("pkill gnuplot"); return fs::relative(plot_path, fs::path(rtIO->getHtmlDir())); } @@ -296,11 +289,10 @@ std::vector<fs::path> Conventional::plot_airfoils(const geom2::MultisectionSurfa ax->xlim({0, 1}); ax->axis(matplot::equal); - fs::path plot_path = rtIO->getPlotDir() + "/" + surface.name + "_" + airfoil_data.first + "_airfoil.svg"; + fs::path plot_path = rtIO->getPlotDir() + "/empennage_design_" + surface.name + "_" + airfoil_data.first + "_airfoil.svg"; matplot::save(f, plot_path.string(), "svg"); airfoil_plots_path.push_back(fs::relative(plot_path, fs::path(rtIO->getHtmlDir()))); std::this_thread::sleep_for(std::chrono::milliseconds(500)); - system("pkill gnuplot"); } } return airfoil_plots_path;