Added filter to orientation code to filter out noise in orientation events