Created
November 4, 2010 11:12
-
-
Save wenbert/662337 to your computer and use it in GitHub Desktop.
tolerance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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