diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-11-05 22:13:55 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-11-05 22:13:55 +0100 |
commit | 976545861a1c7336203a1677120633f14d215a40 (patch) | |
tree | 4a4e48737db1a33483eae38b081d4035de9b1566 /apps/multirotor_pos_control/multirotor_pos_control.c | |
parent | 706a7e4dd51af9e5c15fb22cf8954df387002998 (diff) | |
download | px4-firmware-976545861a1c7336203a1677120633f14d215a40.tar.gz px4-firmware-976545861a1c7336203a1677120633f14d215a40.tar.bz2 px4-firmware-976545861a1c7336203a1677120633f14d215a40.zip |
Minor cleanup in position control skeleton
Diffstat (limited to 'apps/multirotor_pos_control/multirotor_pos_control.c')
-rw-r--r-- | apps/multirotor_pos_control/multirotor_pos_control.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/multirotor_pos_control/multirotor_pos_control.c b/apps/multirotor_pos_control/multirotor_pos_control.c index 474ced731..9821fc7e5 100644 --- a/apps/multirotor_pos_control/multirotor_pos_control.c +++ b/apps/multirotor_pos_control/multirotor_pos_control.c @@ -196,12 +196,14 @@ multirotor_pos_control_thread_main(int argc, char *argv[]) float x_setpoint = 0.0f; + // XXX enable switching between Vicon and local position estimate /* local pos is the Vicon position */ - att_sp.pitch_body = (local_pos.x - x_setpoint) * p.p * dT; + // XXX just an example, lacks rotation around world-body transformation + att_sp.pitch_body = (local_pos.x - x_setpoint) * p.p; att_sp.roll_body = 0.0f; att_sp.yaw_body = 0.0f; - att_sp.thrust = 0.4f; + att_sp.thrust = 0.3f; att_sp.timestamp = hrt_absolute_time(); /* publish new attitude setpoint */ |