Skip to content

Commit

Permalink
Temporary disable compass smoothing
Browse files Browse the repository at this point in the history
  • Loading branch information
jgauchia committed Jul 9, 2023
1 parent f22465c commit 1c3fae5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hardware/compass.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ int read_compass()
#endif
float heading_no_filter = atan2(y, x);
heading_no_filter += declinationAngle;
//heading_smooth = heading_no_filter;
heading_smooth = (heading_no_filter * SMOOTH_FACTOR) + (heading_previous * SMOOTH_PREVIOUS_FACTOR);
heading_previous = heading_smooth;
heading_smooth = heading_no_filter;
//heading_smooth = (heading_no_filter * SMOOTH_FACTOR) + (heading_previous * SMOOTH_PREVIOUS_FACTOR);
//heading_previous = heading_smooth;

if (heading_smooth < 0)
heading_smooth += 2 * M_PI;
Expand Down

0 comments on commit 1c3fae5

Please sign in to comment.