def convergeData(packetData, logDir, fileEnding, samplingInterval, interpolationType, reconThreshold): # Interpolation reconstruct the transmitted and received data #print "Interpolation reconstructing the signals..." intReconstructor = IntReconstructor() convergedData = intReconstructor.getReconstructedSignal( packetData, samplingInterval, interpolationType, reconThreshold, 500) exportData(logDir + "ConvergedData_" + fileEnding + ".txt", convergedData) return [convergedData]
def convergeData(packetData, logDir, fileEnding, samplingInterval, convergenceTime): # Interpolation reconstruct the transmitted and received data #print "Interpolation reconstructing the signals..." intReconstructor = IntReconstructor() convergedData = intReconstructor.getReconstructedSignal(packetData, samplingInterval, convergenceTime, 500) exportData(logDir + "ConvergedData_" + fileEnding + ".txt", convergedData) return [convergedData]
print "Receiving the packets..." receiver = Receiver() DRRxData = receiver.getFilteredData(DRRxPackets) exportData(logDir + "DRRxData.txt", DRRxData) # Snap reconstruct the transmitted and received data print "Snap reconstructing the signals..." snapReconstructor = SnapReconstructor() DRTxSnapData = snapReconstructor.getReconstructedSignal(DRTxPackets, samplingInterval) DRRxSnapData = snapReconstructor.getReconstructedSignal(DRRxData, samplingInterval) exportData(logDir + "DRTxSnapData.txt", DRTxSnapData) exportData(logDir + "DRRxSnapData.txt", DRRxSnapData) # Interpolation reconstruct the transmitted and received data print "Interpolation reconstructing the signals..." intReconstructor = IntReconstructor() DRTxIntData = intReconstructor.getReconstructedSignal(DRTxPackets, samplingInterval, interpolationType, reconThreshold) DRRxIntData = intReconstructor.getReconstructedSignal(DRRxData, samplingInterval, interpolationType, reconThreshold) exportData(logDir + "DRTxIntData.txt", DRTxIntData) exportData(logDir + "DRRxIntData.txt", DRRxIntData) # Split data into components print "Splitting the data into individual components..." inputTime = [] x = [] y = [] z = [] transmittedSnapTime = [] txSnapX = []