Go Down

Topic: angular position from gyroscope (Read 5104 times) previous topic - next topic

Fons1302

Hi,

I would like to copy the pitch and roll of a platform but don't know what I need for it.
So basically I want to reproduce the pitch and roll angle on another platform so that the two platform are 'pitched' and 'rolled' the same way (so I can give the occupants on platform A the same feeling as if they where on platform B). That is why I post this message in this topic (I need to know the angular position after all).
Do I need accelerometers, gyros, compasses or a combination of them? It looks like I need a balancing robot kind of setup which uses a combination of gyros and accelerometers (?).
I only know that gyros measure angular velocity and accelerometers measure acceleration and that an iphone uses accelerometers...

Thanks,
Fons

Hey
You  should have a look at my guide. I am pretty sure that it will answer some of your problems.
http://arduino.cc/forum/index.php/topic,58048.0.html
- Lauszus

jraskell

Quote
In my code I measured the duration of a loop to be approximately 30ms which was what I used for my integration.


With one very simple modification of your code, you can go from 'approximately' to exactly.
Move your assignment of time to prev_time from after your serial outputs to immediately after your calculation of delta_time.  By making that one change, your delta_time value will be exactly the duration of THAT specific loop.  No appoximation of loop time necessary.  One less source of integration error.

Go Up