aboutsummaryrefslogtreecommitdiff
path: root/src/modules/fixedwing_backside/fixedwing.cpp
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-03-30 00:25:26 +0400
committerAnton Babushkin <anton.babushkin@me.com>2014-03-30 00:25:26 +0400
commitd2553bfd2930eb02664d564559fa361b80c63f61 (patch)
tree21cda568519c33a261edaaa9c370cc9ba9c7f466 /src/modules/fixedwing_backside/fixedwing.cpp
parent0789189c0588ebebd24a523f9639411be89c6a9b (diff)
parent9b1de5004c673ebe8bdf68f1b518565cccd6b05b (diff)
downloadpx4-firmware-d2553bfd2930eb02664d564559fa361b80c63f61.tar.gz
px4-firmware-d2553bfd2930eb02664d564559fa361b80c63f61.tar.bz2
px4-firmware-d2553bfd2930eb02664d564559fa361b80c63f61.zip
Merge branch 'master' into offboard2
Diffstat (limited to 'src/modules/fixedwing_backside/fixedwing.cpp')
-rw-r--r--src/modules/fixedwing_backside/fixedwing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/fixedwing_backside/fixedwing.cpp b/src/modules/fixedwing_backside/fixedwing.cpp
index f7c0b6148..cfae07275 100644
--- a/src/modules/fixedwing_backside/fixedwing.cpp
+++ b/src/modules/fixedwing_backside/fixedwing.cpp
@@ -175,14 +175,14 @@ void BlockMultiModeBacksideAutopilot::update()
// the min/max velocity
float v = _vLimit.update(sqrtf(
_pos.vel_n * _pos.vel_n +
- _pos.vy * _pos.vy +
+ _pos.vel_e * _pos.vel_e +
_pos.vel_d * _pos.vel_d));
// limit velocity command between min/max velocity
float vCmd = _vLimit.update(_vCmd.get());
// altitude hold
- float dThrottle = _h2Thr.update(_missionCmd.current.altitude - _pos.alt);
+ float dThrottle = _h2Thr.update(_missionCmd.current.alt - _pos.alt);
// heading hold
float psiError = _wrap_pi(_guide.getPsiCmd() - _att.yaw);
@@ -237,7 +237,7 @@ void BlockMultiModeBacksideAutopilot::update()
// the min/max velocity
float v = _vLimit.update(sqrtf(
_pos.vel_n * _pos.vel_n +
- _pos.vy * _pos.vy +
+ _pos.vel_e * _pos.vel_e +
_pos.vel_d * _pos.vel_d));
// pitch channel -> rate of climb