Skip to content
Snippets Groups Projects
Commit 9fd65af7 authored by Christopher Ruwisch's avatar Christopher Ruwisch
Browse files

removed pkill from plot; added module specifier; fixed bug on plotOn flag

parent 7ceecb3e
No related branches found
No related tags found
5 merge requests!263Apply 1 suggestion(s) to 1 file(s),!261Reintruduced automatic flight condition selection,!245Apply 1 suggestion(s) to 1 file(s),!233Initial open source version,!48[FIX] Removes pkill from files
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment