Subversion Repositories FlightCtrl

Rev

Rev 1180 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1180 Rev 1186
Line 302... Line 302...
302
                // copter should fly to west (positive roll).
302
                // copter should fly to west (positive roll).
303
                // The influence of the GPSStickNick and GPSStickRoll variable is contrarily to the stick values
303
                // The influence of the GPSStickNick and GPSStickRoll variable is contrarily to the stick values
304
                // in the fc.c. Therefore a positive north deviation/velocity should result in a positive
304
                // in the fc.c. Therefore a positive north deviation/velocity should result in a positive
305
                // GPSStickNick and a positive east deviation/velocity should result in a negative GPSStickRoll.
305
                // GPSStickNick and a positive east deviation/velocity should result in a negative GPSStickRoll.
Line 306... Line 306...
306
 
306
 
307
                coscompass = (int32_t)c_cos_8192(YawGyroHeading / YAW_GyroDegFactor);
307
                coscompass = (int32_t)c_cos_8192(YawGyroHeading / GYRO_DEG_FACTOR);
308
                sincompass = (int32_t)c_sin_8192(YawGyroHeading / YAW_GyroDegFactor);
308
                sincompass = (int32_t)c_sin_8192(YawGyroHeading / GYRO_DEG_FACTOR);
309
                PID_Nick =   (coscompass * PID_North + sincompass * PID_East) / 8192;
309
                PID_Nick =   (coscompass * PID_North + sincompass * PID_East) / 8192;
Line 310... Line 310...
310
                PID_Roll  =  (sincompass * PID_North - coscompass * PID_East) / 8192;
310
                PID_Roll  =  (sincompass * PID_North - coscompass * PID_East) / 8192;