This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static Map<String, Value> intermittentError(Sensor sensor) { | |
| Map<String, Value> map = new HashMap<String, Value>(); | |
| Map<String, Value> abruptError = abruptError(sensor); | |
| if(abruptError.size() == 0 || sensor.id.equals("ST516")) | |
| return map; | |
| int timeOfFault = ((IntegerValue)(abruptError.get("faultIndex"))).get() + INTERMITTENT_OFFSET; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package gov.dod.army.rdecom.tardec.tcctda; | |
| import org.dxc.api.datatypes.*; | |
| import java.util.Map; | |
| import java.util.HashMap; | |
| /** | |
| * | |
| * @author Jeremy Mange, Michael Duffy, Andrew Dunn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static void ProcessRecievedData() { | |
| Vector<Map<String, Value>> errorSensors = new Vector<Map<String, Value>>(); | |
| for(Object keySet : allSensors.keySet()) { | |
| Sensor individualSensor = (Sensor)allSensors.get(keySet); | |
| individualSensor.removeOutliers(); | |
| //Send the individual sensor to our filters, if there is a detected error we will make sure to set the falutIndex. | |
| Map<String, Value> filterSensor = ErrorFinder.errorParams(individualSensor); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Boolean Error | |
| if(!(sensor.data.elementAt(0) instanceof RealValue)) { | |
| boolean firstVal = ((BoolValue)sensor.data.elementAt(0)).get(); | |
| for(int index = 1; index < sensor.data.size()-1; index++) { | |
| boolean indexValue = ( (BoolValue) sensor.data.elementAt(index)).get(); | |
| if(indexValue != firstVal) { | |
| map.put("booleanError", Value.v(indexValue)); | |
| map.put("faultIndex", Value.v(index)); | |
| break; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static void ProcessRecievedData() { | |
| Vector<Map<String, Value>> errorSensors = new Vector<Map<String, Value>>(); | |
| for(Object keySet : allSensors.keySet()) { | |
| // Snag the individual sensor | |
| Sensor individualSensor = (Sensor) allSensors.get(keySet); | |
| // remove the outliers | |
| individualSensor.removeOutliers(); | |
NewerOlder