##// END OF EJS Templates
Add correction for delta T
perrinel -
r243:dbae8a89423a
parent child
Show More
@@ -36,14 +36,6 namespace {
36 36 const auto PLUGIN_DIRECTORY_NAME = QStringLiteral("plugins");
37 37 #endif
38 38
39
40 #if __GNUC__
41 #if __x86_64__ || __ppc64__
42 #define ENVIRONMENT64
43 #else
44 #define ENVIRONMENT32
45 #endif
46 #endif
47 39 } // namespace
48 40
49 41 int main(int argc, char *argv[])
@@ -70,7 +62,7 int main(int argc, char *argv[])
70 62 }
71 63 #else
72 64 __x86_64__ || __ppc64__ if (!pluginDir.cd("../lib/SciQlop")) { pluginDir.cd("../lib/sciqlop"); }
73 #endif
65 #endif
74 66 #endif
75 67 qCDebug(LOG_PluginManager())
76 68 << QObject::tr("Plugin directory: %1").arg(pluginDir.absolutePath());
@@ -124,15 +124,18 void VisualizationGraphWidget::onRangeChanged(const QCPRange &t1, const QCPRange
124 124 if (variable->intersect(dateTime)) {
125 125 auto variableDateTime = variable->dateTime();
126 126 if (variableDateTime.m_TStart < dateTime.m_TStart) {
127 dateTime.m_TStart = variableDateTime.m_TStart;
128 // START is set to the old one. tolerance have to be added to the right
127
128 auto diffEndToKeepDelta = dateTime.m_TEnd - variableDateTime.m_TEnd;
129 dateTime.m_TStart = variableDateTime.m_TStart + diffEndToKeepDelta;
130 // Tolerance have to be added to the right
129 131 // add 10% tolerance for right (end) side
130 132 auto tolerance = 0.1 * (dateTime.m_TEnd - dateTime.m_TStart);
131 133 variableDateTimeWithTolerance.m_TEnd += tolerance;
132 134 }
133 135 if (variableDateTime.m_TEnd > dateTime.m_TEnd) {
134 dateTime.m_TEnd = variableDateTime.m_TEnd;
135 // END is set to the old one. tolerance have to be added to the left
136 auto diffStartToKeepDelta = dateTime.m_TStart - dateTime.m_TStart;
137 dateTime.m_TEnd = variableDateTime.m_TEnd - diffStartToKeepDelta;
138 // Tolerance have to be added to the left
136 139 // add 10% tolerance for left (start) side
137 140 auto tolerance = 0.1 * (dateTime.m_TEnd - dateTime.m_TStart);
138 141 variableDateTimeWithTolerance.m_TStart -= tolerance;
General Comments 0
You need to be logged in to leave comments. Login now