Potential Error in the new Copter Rocks software

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello Copter Rocks Community,

reading through the new Dave 4 Copter Rocks Software I noticed a potential error in the AttitudeController and MPU9150 files, if the sensor fusion algorithm is changed.
#define ATTITUDEALGORITHM 	2

If the define is set to 2 (QuaternionFilter), the name of the GetAngles() function is misleading as it returns the Pitch and Roll Angle of the copter but for Yaw it returns its Yawrate.

However if the ATTITUDEALGORITHM 1 (Kalman filter) is used, the function returns the Roll, Pitch and Yaw angle of the copter.

So changing the attitude algorithm would cause problems in the AngleRateController as this function expects the Yawrate.

I would make a Pull request on Github to fix this but the new Software is only uploaded as zip file.
0 Likes
5 Replies
User10958
Level 1
Level 1
Hi Marcell,

Walter will extract and reupload the single files on Monday.

Can anyone confirm this fix?

Best regards, Rafael
0 Likes
cherry
Employee
Employee
Hello Marcell,

The code should fly as it is right now on our GitHub repository: https://github.com/ManagementCenterInnsbruck/copter.rocks
I also unpacked the .zip file on the repository.
Please flash the software and try to get your quadcopter flying. If you have any more queries please just ask.

Best regards, Walter
0 Likes
Not applicable
Hello Walter,

I just wanted to point out that there is a potential error in the code if someone changes the define for the sensor fusion algorithm. (#define ATTITUDEALGORITHM)
0 Likes
User10958
Level 1
Level 1
0 Likes
Not applicable
0 Likes