Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1185 → Rev 1186

/branches/V0.72p Code Redesign killagreg/gps.c
304,8 → 304,8
// in the fc.c. Therefore a positive north deviation/velocity should result in a positive
// GPSStickNick and a positive east deviation/velocity should result in a negative GPSStickRoll.
 
coscompass = (int32_t)c_cos_8192(YawGyroHeading / YAW_GyroDegFactor);
sincompass = (int32_t)c_sin_8192(YawGyroHeading / YAW_GyroDegFactor);
coscompass = (int32_t)c_cos_8192(YawGyroHeading / GYRO_DEG_FACTOR);
sincompass = (int32_t)c_sin_8192(YawGyroHeading / GYRO_DEG_FACTOR);
PID_Nick = (coscompass * PID_North + sincompass * PID_East) / 8192;
PID_Roll = (sincompass * PID_North - coscompass * PID_East) / 8192;
 
/branches/V0.72p Code Redesign killagreg/makefile
16,8 → 16,8
 
# Use one of the extensions for a gps solution
#EXT = KILLAGREG
EXT = NAVICTRL
#EXT = MK3MAG
#EXT = NAVICTRL
EXT = MK3MAG
 
# Use one of the motor setups
 
/branches/V0.72p Code Redesign killagreg/uart0.c
669,8 → 669,8
#ifdef USE_MK3MAG
if((CheckDelay(Compass_Timer)) && txd_complete)
{
ToMk3Mag.Attitude[0] = (int16_t) (IntegralNick / (GyroDegFactor/ 10)); // approx. 0.1 deg
ToMk3Mag.Attitude[1] = (int16_t) (IntegralRoll / (GyroDegFactor/ 10)); // approx. 0.1 deg
ToMk3Mag.Attitude[0] = (int16_t)((10 * IntegralGyroNick) / GYRO_DEG_FACTOR); // approx. 0.1 deg
ToMk3Mag.Attitude[1] = (int16_t)((10 * IntegralGyroRoll) / GYRO_DEG_FACTOR); // approx. 0.1 deg
ToMk3Mag.UserParam[0] = FCParam.UserParam1;
ToMk3Mag.UserParam[1] = FCParam.UserParam2;
ToMk3Mag.CalState = CompassCalState;