def infoAboutDrift(self, frame_id): driftVector = self.getMedianDriftVector() driftDistance = self.getMedianDriftDistance() driftAngle = self.getMedianDriftAngle() driftsCount = self.getDriftsCount() driftsStr = self.getDriftsAsString() driftsWithoutOutliers = self.excludeOutliers(self._drifts) driftsNoOutliersStr = Vector.vectorArrayAsString(driftsWithoutOutliers) driftsRow = [] if driftsStr: driftsRow.append(frame_id) driftsRow.append(driftVector.x) driftsRow.append(driftVector.y) driftsRow.append(driftDistance) driftsRow.append(driftAngle) driftsRow.append(len(driftsWithoutOutliers)) driftsRow.append(driftsCount) driftsRow.append(driftsStr) driftsRow.append(driftsNoOutliersStr) return driftsRow
def getDriftsAsString(self): return Vector.vectorArrayAsString(self._drifts)