- March 31, 2016 at 8:08 pm #4780
Yesterday I received my BerryIMU, awesome. I've done some work and now my airplane is flying in a straight line.
Theres only one thing that i'm not sure of and that is the GyroX value. When I run your original code, the GyroX value is counting up which is normal. But I think i'm having wrong values on CFangleX. (CFangleX is counting up from 0 to appr. 112°)
Is this normal? Because the BerryIMU is mounted flat in the plane cabine so should be 0.
StevenMarch 31, 2016 at 8:18 pm #4783
Yes, this is normal. Because of noise, the gyro drifts. All gyros drift.
Form this page;https://ozzmaker.com/berryimu/
Gyros – A gyro measures the rate of rotation, which has to be tracked over time to calculate the current angle. This tracking causes the gyro to drift. However, gyros are good at measuring quick sharp movements.
Accelerometers – Accelerometers are used to sense both static (e.g. gravity) and dynamic (e.g. sudden starts/stops) acceleration. They don’t need to be tracked like a gyro and can measure the current angle at any given time. Accelerometers however are very noisy and are only useful for tracking angles over a long period of time.
Then further down the page;
Once you have the both the angles from both sensors, you will have to combined them to overcome the gyro drift and the accelerometer noise.
Once the values are combined, you should have a perfect angle reading.March 31, 2016 at 8:25 pm #4784
Thanks for the fast reply.
Yes I know, its already combined with AccXangle as it is your original code. Does this mean I have to place the BerryIMU so that it shows 0° on X level?March 31, 2016 at 9:07 pm #4785
Do you mean GyroX level?.. If so, then no. It will work in any position.April 1, 2016 at 4:59 am #4786
I meant the BerryIMU physically because CFangleX gives me 114° when its actually 0°April 1, 2016 at 1:43 pm #4788
- You must be logged in to reply to this topic.