def run(self): self.gpsPath = FileReader.parseGpsLog(self.gpsLog) if(self.gpsPath == -1): return print self.gpsPath if self.coreLog == None: self.coreLog = self.runCamSim() self.pathList = FileReader.parseCoreLogs(self.coreLog, self.gpsPath[0].longitude, self.gpsPath[0].latitude) if(self.pathList == -1): return optimalPath = self.getOptimalPath(self.gpsPath, self.pathList) distances = self.calculateDistances(optimalPath) self.calculateMetrics(optimalPath, distances) FileWriter.createDataSheet(self, self.totalResult, self.twentyMinuteResults) FileWriter.export(self, self.gpsPath, [optimalPath]) print "Minimum Distance" print min(distances) print "Maximum Distance" print max(distances) print 'id: ', self.scenarioID print 'core log file: ', self.coreLog print 'gps log file: ', self.gpsLog print 'time offset: ', self.timeOffset print 'maximum radius: ', self.maxRadius print 'number of paths: ', len(self.pathList)