Go to Post "The rio has a boulder sized hole though it? *shrug* Just duct tape it. That doesn't let the code out, right?" - Bkeeneykid [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 09-02-2003, 16:52
Don Reid Don Reid is offline
Registered User
#0997
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Corvallis, Oregon
Posts: 45
Don Reid will become famous soon enough
The first point is that you have to accumulate (integrate) in small enough units that you don't lose precision. Then when you have accumulated enough, you can convert to degrees.

Each unit of sensor input is worth a fraction
of a degree, (~1/53).

Code:
//   27 mV * sec    1V       127    1 (loop)
//   -----------  * --     * ---- * ----
//      degree     1000 mV   2.5V   0.026 sec
So you can accumulate the numbers from the sensor (with 127 meaning zero), then if you have
more than +53, thats 1 degree....

Also multiply by "delta_t + 1" to account for possible added delay.

You could use many other forms of multi-byte math, they are all really doing fixed point math with some scale factor using integers.
__________________
Don Reid

Last edited by Don Reid : 09-02-2003 at 16:58.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone know where to buy a spare yaw rate sensor? Jim Meyer Technical Discussion 11 30-03-2003 21:18
Aux Fuse 3 (Yaw Rate) Josh Hambright Electrical 0 18-02-2003 08:22
Yaw rate sensor (gyro for the layperson) Kris Verdeyen Rules/Strategy 4 14-01-2002 00:41
Yaw Rate Sensors dense Technical Discussion 4 10-01-2002 08:28
Yaw Rate Sensor ImmacGirl_03 Technical Discussion 2 10-12-2001 15:15


All times are GMT -5. The time now is 16:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi