Guest User

Untitled

a guest
Jun 20th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. tolerance = abs(float(tolerance))
  2. if(tolerance > 0):
  3. #get the difference of every bearing change
  4. #if difference is within tolerance, print
  5. #otherwise, ignore
  6. diff = float(previous_bearing) - float(bearing)
  7.  
  8. #print abs(diff),tolerance
  9. if(float(previous_bearing) != float(bearing)):
  10. if(abs(diff) <= tolerance):
  11. #print ("%d,%s,%s,%s\n" % (i,easting,northing,bearing)),
  12. print abs(diff),tolerance
  13. new_file.write("%f,%f,%s\n" % (abs(diff),tolerance,bearing))
  14. #new_file.write("%d,%s,%s,%s\n" % (i,easting,northing,bearing))
  15.  
  16. elif(float(previous_bearing) != float(bearing)):
  17. #print ("%d,%s,%s,%s\n" % (i,easting,northing,bearing)),
  18. new_file.write("%d,%s,%s,%s\n" % (i,easting,northing,bearing))
Add Comment
Please, Sign In to add comment