Omaha #5704 Updated getClosest() in FFMPGuidanceBasin

(cherry picked from commit 03d53792b293609f67b135a3ab7db288823b6d38)
This commit is contained in:
Dave Hladky 2016-06-21 10:54:37 -05:00 committed by Michael James
parent a9297cf139
commit c18a997e16

View file

@ -26,6 +26,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 01/17/13 1478 D. Hladky Removed un-needed XML attributes * 01/17/13 1478 D. Hladky Removed un-needed XML attributes
* Aug 08, 2015 4722 dhladky Dynamic serialize imp not needed. * Aug 08, 2015 4722 dhladky Dynamic serialize imp not needed.
* Oct 26, 2015 5056 dhladky Simplified Guidance interpolator. * Oct 26, 2015 5056 dhladky Simplified Guidance interpolator.
* Jun 21, 2016 5704 dhladky Updated getClosest() logic to include 0.0f checks.
* *
* </pre> * </pre>
* *
@ -248,7 +249,7 @@ public class FFMPGuidanceBasin extends FFMPBasin {
if (guidValues.get(checkDate).containsKey(sourceName)) { if (guidValues.get(checkDate).containsKey(sourceName)) {
float val = guidValues.get(checkDate).get(sourceName); float val = guidValues.get(checkDate).get(sourceName);
if (val != FFMPUtils.MISSING) { if (val != FFMPUtils.MISSING && val != 0.0f) {
long time1 = markerDate.getTime(); long time1 = markerDate.getTime();
long time2 = checkDate.getTime(); long time2 = checkDate.getTime();
@ -284,7 +285,7 @@ public class FFMPGuidanceBasin extends FFMPBasin {
float val = guidValues.get(date).get(sourceName); float val = guidValues.get(date).get(sourceName);
if (val != FFMPUtils.MISSING) { if (val != FFMPUtils.MISSING && val != 0.0f) {
rdate = date; rdate = date;
} }
} }
@ -299,7 +300,7 @@ public class FFMPGuidanceBasin extends FFMPBasin {
float val2 = guidValues.get(checkDate).get(sourceName); float val2 = guidValues.get(checkDate).get(sourceName);
if (val2 != FFMPUtils.MISSING) { if (val2 != FFMPUtils.MISSING && val2 != 0.0f) {
long time2 = checkDate.getTime(); long time2 = checkDate.getTime();
// as long as it is +- expiration from orig date, // as long as it is +- expiration from orig date,