Merge "Issue #1194 change TimeMatcher so it only uses dtd in cases where dt and dtf are very different." into development

Former-commit-id: 72a4b36e91 [formerly c6ca41e7c3] [formerly 10cdbdbd61 [formerly 4187d6fd94a38291047860cc780fb1aa9f59d825]]
Former-commit-id: 10cdbdbd61
Former-commit-id: 3c1463c4d9
This commit is contained in:
Nate Jensen 2012-10-25 13:39:11 -05:00 committed by Gerrit Code Review
commit bab292b06a

View file

@ -651,21 +651,12 @@ public class TimeMatcher {
dtd = (rv.intrinsicPeriod * 3) / 2;
dataFcsts = rv.haveForecasts;
if (fspatial) {
dtf = dt;
frameFcsts = dataFcsts;
} else {
rv = intrinsicPeriod(frameTimes, frameFcsts);
dtf = rv.intrinsicPeriod;
frameFcsts = rv.haveForecasts;
}
rv = intrinsicPeriod(frameTimes, frameFcsts);
dtf = rv.intrinsicPeriod;
frameFcsts = rv.haveForecasts;
if (dt > ONE_MINUTE_MS && dt <= ELEVEN_MINUTES_MS
&& dtf > ONE_MINUTE_MS && dtf <= ELEVEN_MINUTES_MS
&& radarOnRadarYes) {
if (dtf < dt) {
dt = dtf;
}
if (fspatial) {
frameFcsts = dataFcsts;
} else if (dtf > dt) {
dt = dtf;
}
@ -683,12 +674,17 @@ public class TimeMatcher {
dt++;
}
if (dt > dtd || frameTimes[ef].getMatchValid() - latest.getTime() > dtd) {
// The first check makes sure that dtd is always bigger than dt
// since dtd is supposed to add extra padding to the time. The
// second check makes it so that if the latest frameTime is past the
// latest depictTime by more than dtd than we ignore dtd by setting
// it to dt which makes it a no op.
if (dt > dtd || dt < dtf
|| frameTimes[ef].getMatchValid() - latest.getTime() > dtd) {
// Three conditions here:
// 1) dtd is supposed to provide extra padding compared to dt, so if
// dt is bigger then set them equal to avoid reducing the padding.
// 2) Clear the extra padding if the acceptable depict time spacing
// is not bigger than the frame time spacing
// 3) Clear the extra padding if the latest frame time is not within
// dtd of the latest depict time
// setting dtd to dt makes any use of dtd a noop.
dtd = dt;
}