Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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))
Add Comment
Please, Sign In to add comment