Hi Thomas, To me, determining laps by heading seems to be very inaccurate, but I don't fully understand your requirements. The only thing I suggest is using the 'accuracy' value as returned by the iPhoneCurrentHeading() function rather than your current fixed value of 150. If the number is very low, then you might be able to set a number much closer to 180 and more accurately determine your laps. i.e.
put 175 - tHeading["accuracy"] into tDegreesForLap If the number is very large (and I'm sure I've seen the compass out by 45 degrees) you might wish to quit your program or at least advise the user that the app is unlikely to respond as expected. HTH _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode