On Tue, 28 Aug 2001, Leslie Lowe wrote: > To convert from count to degrees I used AWC Electronics Floating Point Math > Coprocessor "Pak-IX". Sure its overkill for the simple math stuff > but its a no brainer. Plug in the variables and tell it what to do. > > Roll (degrees) = ASIN ((DcycleNOW - DcycleCAL) / DcyclePER) * (180 / pi) > > Where: > DcycleNOW = Duty Cycle taken now > DcycleCAL = Duty Cycle at Zero g taken during calibration > DcyclePER = Duty Cycle per g taken during calibration Here's an arcsine routine: http://www.dattalo.com/technical/software/pic/arcsine.asm However, I'd be inclined to dynamically build the lookup table at calibration time and use the "DcycleNOW" as the interpolation variable. Scott -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body