aboutsummaryrefslogtreecommitdiff
path: root/src/modules/fixedwing_backside
diff options
context:
space:
mode:
authorJames Goppert <james.goppert@gmail.com>2014-03-16 18:35:26 -0400
committerJames Goppert <james.goppert@gmail.com>2014-03-20 12:12:42 -0400
commiteaef67f21df3d38a6523a79bb966fe62d44092ae (patch)
tree5c30169c8324f862bb56b6eda4711fe7cd69059a /src/modules/fixedwing_backside
parent8f0b223c874b33bf09a8ceebcaf40cd60ee3800d (diff)
downloadpx4-firmware-eaef67f21df3d38a6523a79bb966fe62d44092ae.tar.gz
px4-firmware-eaef67f21df3d38a6523a79bb966fe62d44092ae.tar.bz2
px4-firmware-eaef67f21df3d38a6523a79bb966fe62d44092ae.zip
Added encoder uORB message/ fixedwing_backside working if enabled.
Diffstat (limited to 'src/modules/fixedwing_backside')
-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