Skip to content

Instantly share code, notes, and snippets.

@wenbert
Created Nov 4, 2010
Embed
What would you like to do?
tolerance
tolerance = abs(float(tolerance))
if(tolerance > 0):
#get the difference of every bearing change
#if difference is within tolerance, print
#otherwise, ignore
diff = float(previous_bearing) - float(bearing)
#print abs(diff),tolerance
if(float(previous_bearing) != float(bearing)):
if(abs(diff) <= tolerance):
#print ("%d,%s,%s,%s\n" % (i,easting,northing,bearing)),
print abs(diff),tolerance
new_file.write("%f,%f,%s\n" % (abs(diff),tolerance,bearing))
#new_file.write("%d,%s,%s,%s\n" % (i,easting,northing,bearing))
elif(float(previous_bearing) != float(bearing)):
#print ("%d,%s,%s,%s\n" % (i,easting,northing,bearing)),
new_file.write("%d,%s,%s,%s\n" % (i,easting,northing,bearing))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment