float(line[3]), float(line[4]), line[1], float(line[5]), float(line[6]) ) print line[0], px_pos - offset else: print "discarding corrupted log line", len(line) print int(line[0]), framecount if isFull: logwriter = csv.writer( open( slitscanner.getFileName() + ".log", "wb"), delimiter=";") gpxwriter.save() gpxalltrackwriter.save() gpxwriter.open(slitscanner.getFileName() + ".gpx") dist = dist + infowriter.getDist() infowriter.save() infoallwriter.save() infowriter.open(slitscanner.getFileName() + ".info.txt") slitcount = 0 imgcount += 1 isFull = False if verbose and len(line)>14: print "log gps position #%05d px: %d, %0.4f %0.4f %s distance: %0.3fkm" % \ (totalframecount, px_pos - offset, float(line[3]), float(line[4]), line[1], (dist + infowriter.getDist()) / 1000)
if verbose: print "make thumnail from %s" % os.path.basename(file) img_out = img.resize((th_width,th_height),Image.ANTIALIAS) createPath(thumb_file) img_out.save(thumb_file,quality=95) if process_html: source += '<a href="%s"><img border="0" src="%s" alt="" height="%d" width="%d" /></a>\n' % \ (file, thumb_file, th_height, th_width) count+=1 if process_logs: info = infowriter.getInfoStringHTML() infowriter.save() gpxwriter.save() info += '» <a href="%s">trackfile</a>' % trackfile else: info = "no gps log data available." # now write to files print "%d files found." % count if process_html: print "generating html.." # write html f = open(html_file, 'w') f.write('''<html> <head> <title>%s</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />