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