aboutsummaryrefslogtreecommitdiff
path: root/apps/fixedwing_att_control
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2012-10-28 18:35:08 +0100
committerThomas Gubler <thomasgubler@gmail.com>2012-10-28 18:35:08 +0100
commitb692c300d01bf075884a00cc75cea15e06f0e0db (patch)
tree90c5577aa8d98a119274b79600646c675c079526 /apps/fixedwing_att_control
parent69e938aac3183780b1afcc3715f232c8e092994a (diff)
downloadpx4-firmware-b692c300d01bf075884a00cc75cea15e06f0e0db.tar.gz
px4-firmware-b692c300d01bf075884a00cc75cea15e06f0e0db.tar.bz2
px4-firmware-b692c300d01bf075884a00cc75cea15e06f0e0db.zip
fw control: added Dougs horizontal navigation controller
Diffstat (limited to 'apps/fixedwing_att_control')
-rw-r--r--apps/fixedwing_att_control/fixedwing_att_control_att.c26
-rw-r--r--apps/fixedwing_att_control/fixedwing_att_control_main.c2
-rw-r--r--apps/fixedwing_att_control/fixedwing_att_control_rate.c18
3 files changed, 23 insertions, 23 deletions
diff --git a/apps/fixedwing_att_control/fixedwing_att_control_att.c b/apps/fixedwing_att_control/fixedwing_att_control_att.c
index 4193bbfdf..29e9ee1bc 100644
--- a/apps/fixedwing_att_control/fixedwing_att_control_att.c
+++ b/apps/fixedwing_att_control/fixedwing_att_control_att.c
@@ -72,23 +72,23 @@ struct fw_att_control_params {
float pitch_roll_compensation_p;
};
-struct fw_pos_control_params_handle {
- float roll_p;
- float rollrate_lim;
- float pitch_p;
- float pitch_lim;
- float pitchrate_lim;
- float yawrate_lim;
- float pitch_roll_compensation_p;
+struct fw_pos_control_param_handles {
+ param_t roll_p;
+ param_t rollrate_lim;
+ param_t pitch_p;
+ param_t pitch_lim;
+ param_t pitchrate_lim;
+ param_t yawrate_lim;
+ param_t pitch_roll_compensation_p;
};
/* Internal Prototypes */
-static int parameters_init(struct fw_pos_control_params_handle *h);
-static int parameters_update(const struct fw_pos_control_params_handle *h, struct fw_att_control_params *p);
+static int parameters_init(struct fw_pos_control_param_handles *h);
+static int parameters_update(const struct fw_pos_control_param_handles *h, struct fw_att_control_params *p);
-static int parameters_init(struct fw_pos_control_params_handle *h)
+static int parameters_init(struct fw_pos_control_param_handles *h)
{
/* PID parameters */
h->roll_p = param_find("FW_ROLL_P");
@@ -102,7 +102,7 @@ static int parameters_init(struct fw_pos_control_params_handle *h)
return OK;
}
-static int parameters_update(const struct fw_pos_control_params_handle *h, struct fw_att_control_params *p)
+static int parameters_update(const struct fw_pos_control_param_handles *h, struct fw_att_control_params *p)
{
param_get(h->roll_p, &(p->roll_p));
param_get(h->rollrate_lim, &(p->rollrate_lim));
@@ -122,7 +122,7 @@ int fixedwing_att_control_attitude(const struct vehicle_attitude_setpoint_s *att
static bool initialized = false;
static struct fw_att_control_params p;
- static struct fw_pos_control_params_handle h;
+ static struct fw_pos_control_param_handles h;
static PID_t roll_controller;
static PID_t pitch_controller;
diff --git a/apps/fixedwing_att_control/fixedwing_att_control_main.c b/apps/fixedwing_att_control/fixedwing_att_control_main.c
index d4fc0afae..ad0f201e1 100644
--- a/apps/fixedwing_att_control/fixedwing_att_control_main.c
+++ b/apps/fixedwing_att_control/fixedwing_att_control_main.c
@@ -76,7 +76,7 @@ PARAM_DEFINE_FLOAT(FW_ROLLR_P, 0.9f);
PARAM_DEFINE_FLOAT(FW_ROLLR_I, 0.2f);
PARAM_DEFINE_FLOAT(FW_ROLLR_AWU, 0.9f);
PARAM_DEFINE_FLOAT(FW_ROLLR_LIM, 0.7f); // Roll rate limit in radians/sec, applies to the roll controller
-PARAM_DEFINE_FLOAT(FW_ROLL_P, 9.0f);
+PARAM_DEFINE_FLOAT(FW_ROLL_P, 4.0f);
PARAM_DEFINE_FLOAT(FW_PITCH_RCOMP, 0.1f);
//Pitch control parameters
diff --git a/apps/fixedwing_att_control/fixedwing_att_control_rate.c b/apps/fixedwing_att_control/fixedwing_att_control_rate.c
index 21b3eeb4e..567f03784 100644
--- a/apps/fixedwing_att_control/fixedwing_att_control_rate.c
+++ b/apps/fixedwing_att_control/fixedwing_att_control_rate.c
@@ -77,15 +77,15 @@ struct fw_rate_control_params {
};
struct fw_rate_control_param_handles {
- float rollrate_p;
- float rollrate_i;
- float rollrate_awu;
- float pitchrate_p;
- float pitchrate_i;
- float pitchrate_awu;
- float yawrate_p;
- float yawrate_i;
- float yawrate_awu;
+ param_t rollrate_p;
+ param_t rollrate_i;
+ param_t rollrate_awu;
+ param_t pitchrate_p;
+ param_t pitchrate_i;
+ param_t pitchrate_awu;
+ param_t yawrate_p;
+ param_t yawrate_i;
+ param_t yawrate_awu;
};