I am really having a problem with my yaw stability and I am hoping someone can point me in the right direction.
1st if compass is diabled in either Arducopter 2.x or ardupirates code. I have excellent yaw control just like on my mikrokopter.
If I enable compass at default PID settings, yaw hold is very sloppy (better at default values for arducopter 2.x) . for example in ardupirates code I have to increase P and D to 7.5 and 3.5 otherwise it keeps rotating past when I let go of the stick. But at these high PID values yaw is not smooth and hunts (not really oscillates) and the hunting affects roll and pitch stability
My Yaw gyro must be ok since without compass yaw is great. My compass heading seems ok and is relatively steady. but my issue is now with two different codes.
Is this a bad compass, or is this what other folks are seeing as well? if anyone was able to correct sloppy yaw - how did you do it.
Roll and pitch sabilization are perfect by the way
Strange if I change my declination, it does point at different angles around north.
Also what about so called offset calibration like we did with the old code to account for metal and interference in the frame and for tilt/roll . my offsets remain 0,0,0 and can't seem to get into a mode calibrate these?
I've found theorientation of my sparkfun mag
So I defined this first in APMconfig but it wouldn't compile.
//#define MAG_ORIENTATION AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK ROTATION_YAW_90
Then I change the code inthe cinfig concercing mag irientation and again it wouldn't compile.
# define MAG_ORIENTATION AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK ROTATION_YAW_90
Both with the same fault
ArduCopterMega.cpp: In function 'void init_compass()':
system:518: error: expected `)' before 'Matrix3f'
What am I doing wrong??
Ok but if the code supports the sparkfun it should work.
Mine is soldered directly to the IMU with the convertor in between.
Looking at the default defines in config.h (not apm_config.h) it looks liket they do not use the "ROTATION_YAW_90" in the define
How about just adding with out the leading back slashes
#define MAG_ORIENTATION AP_COMPASS_SPARKFUN_COMPONENTS_UP_PINS_BACK
see if that works