diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2012-10-28 16:56:05 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2012-10-28 16:56:05 +0100 |
commit | 69e938aac3183780b1afcc3715f232c8e092994a (patch) | |
tree | 88b2d0252242b008e0fd23df35b2371a233b7b40 /apps/fixedwing_att_control | |
parent | 8fff4e19d6185ef91a92d36d649584161ef69d8a (diff) | |
download | px4-firmware-69e938aac3183780b1afcc3715f232c8e092994a.tar.gz px4-firmware-69e938aac3183780b1afcc3715f232c8e092994a.tar.bz2 px4-firmware-69e938aac3183780b1afcc3715f232c8e092994a.zip |
moved elevator (-1) multipliction, ultimately this has to go into the mixer
Diffstat (limited to 'apps/fixedwing_att_control')
-rw-r--r-- | apps/fixedwing_att_control/fixedwing_att_control_main.c | 2 | ||||
-rw-r--r-- | apps/fixedwing_att_control/fixedwing_att_control_rate.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/fixedwing_att_control/fixedwing_att_control_main.c b/apps/fixedwing_att_control/fixedwing_att_control_main.c index 869fb16e4..d4fc0afae 100644 --- a/apps/fixedwing_att_control/fixedwing_att_control_main.c +++ b/apps/fixedwing_att_control/fixedwing_att_control_main.c @@ -80,7 +80,7 @@ PARAM_DEFINE_FLOAT(FW_ROLL_P, 9.0f); PARAM_DEFINE_FLOAT(FW_PITCH_RCOMP, 0.1f); //Pitch control parameters -PARAM_DEFINE_FLOAT(FW_PITCHR_P, -0.8f); +PARAM_DEFINE_FLOAT(FW_PITCHR_P, 0.8f); PARAM_DEFINE_FLOAT(FW_PITCHR_I, 0.2f); PARAM_DEFINE_FLOAT(FW_PITCHR_AWU, 0.8f); PARAM_DEFINE_FLOAT(FW_PITCHR_LIM, 0.35f); // Pitch rate limit in radians/sec, applies to the pitch controller diff --git a/apps/fixedwing_att_control/fixedwing_att_control_rate.c b/apps/fixedwing_att_control/fixedwing_att_control_rate.c index ec3039dd6..21b3eeb4e 100644 --- a/apps/fixedwing_att_control/fixedwing_att_control_rate.c +++ b/apps/fixedwing_att_control/fixedwing_att_control_rate.c @@ -170,9 +170,9 @@ int fixedwing_att_control_rates(const struct vehicle_rates_setpoint_s *rate_sp, /* Roll Rate (PI) */ actuators->control[0] = pid_calculate(&roll_rate_controller, rate_sp->roll, rates[0], 0, deltaT); - //XXX TODO disabled for now - actuators->control[1] = pid_calculate(&pitch_rate_controller, rate_sp->pitch, rates[1], 0, deltaT); - actuators->control[2] = 0;//pid_calculate(&yaw_rate_controller, rate_sp->yaw, rates[2], 0, deltaT); + + actuators->control[1] = -pid_calculate(&pitch_rate_controller, rate_sp->pitch, rates[1], 0, deltaT); //TODO: (-) sign comes from the elevator (positive --> deflection downwards), this has to be moved to the mixer... + actuators->control[2] = 0;//pid_calculate(&yaw_rate_controller, rate_sp->yaw, rates[2], 0, deltaT); //XXX TODO disabled for now counter++; |