Home › Forums › Forums › Technical Support for BerryIMU › GyroX value
- This topic has 5 replies, 2 voices, and was last updated 7 years, 2 months ago by Mark Williams.
- AuthorPosts
- March 31, 2016 at 8:08 pm #4780StevenParticipant
Hi
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.Regards
StevenMarch 31, 2016 at 8:18 pm #4783Mark WilliamsKeymasterHi Steven
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.
Mark --OzzMaker.com --
March 31, 2016 at 8:25 pm #4784StevenParticipantHey Mark
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 #4785Mark WilliamsKeymasterDo you mean GyroX level?.. If so, then no. It will work in any position.
Mark --OzzMaker.com --
April 1, 2016 at 4:59 am #4786StevenParticipantI meant the BerryIMU physically because CFangleX gives me 114° when its actually 0°
April 1, 2016 at 1:43 pm #4788Mark WilliamsKeymasterwhat program are you using?
What value do you get when BerryIMU is the correct way up (skull logo facing down) for CFangleX and ACCX?
Mark --OzzMaker.com --
- AuthorPosts
- You must be logged in to reply to this topic.