From ca8dca06f7f6038a4e24ee959c72f3657e9bc1c2 Mon Sep 17 00:00:00 2001
From: Maurice <zimmnau@ilr.rwth-aachen.de>
Date: Thu, 20 Feb 2025 21:10:27 +0100
Subject: [PATCH] design_evaluator adaptions

---
 design_evaluator/src/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/design_evaluator/src/main.cpp b/design_evaluator/src/main.cpp
index 61443d70..357276c5 100644
--- a/design_evaluator/src/main.cpp
+++ b/design_evaluator/src/main.cpp
@@ -2,6 +2,7 @@
 #include <filesystem>
 #include <boost/property_tree/xml_parser.hpp>
 #include <boost/property_tree/ptree.hpp>
+#include <cmath>
 
 // Function to remove a substring from the end of a string
 std::string substractStringFromEnd(const std::string& string, const std::string& string_to_substract) {
@@ -246,11 +247,12 @@ int main () {
                     for (const auto& tree : std::ranges::subrange(aircraft_design_trees.begin() + 1, aircraft_design_trees.end())) {
                         boost::property_tree::ptree temp_tree{};
                         for (const auto& node : subpaths_tree) {
-                            std::string node_path{"aircraft_exchange_file/" + node.second.data()};
+                            // double upstream_value{std::nan("")};
                             double upstream_value{NAN};
                             double local_value{NAN};
                             std::string unit{"?"};
 
+                            std::string node_path = node.second.get<std::string>("<xmlattr>.path");
                             if (containsSymbol(node_path, "@")) {
                                 std::string pre{node_path.substr(0, node_path.find_first_of('@'))};
                                 std::string temp_string{node_path.substr(node_path.find_first_of('@'))};
-- 
GitLab