View Single Post
  #2 (permalink)  
Old 07-03-2009, 08:56 PM
derez's Avatar
derez derez is offline
Basic4ppc Expert
 
Join Date: May 2007
Posts: 917
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

The problem happens only for one reading, until you reach the next time around.
You can ignore this specific reading by a simple test:

if abs(new_track - old_track) < x then
.....
end if

where X must be larger than the maximum expected turn per second.

for continuity of display use for this specific "non reading" the previous value.

Edit:
If you do want that reading, since you know by using the test above that you have the difference of 360 degrees to the result, add or subtract according to the sign of the difference, the value 360.
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 07-03-2009 at 09:00 PM.
Reply With Quote