aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorjgoppert <james.goppert@gmail.com>2013-03-18 15:18:08 -0400
committerjgoppert <james.goppert@gmail.com>2013-03-18 15:18:08 -0400
commit90f9b154eb895aaf321819b00948653b0de5d407 (patch)
tree21f2db12305802a1402c17882abf031149d1ae74 /apps
parent3c6fbeb1a063130fc845e24fe69c68bf5bf2b128 (diff)
downloadpx4-firmware-90f9b154eb895aaf321819b00948653b0de5d407.tar.gz
px4-firmware-90f9b154eb895aaf321819b00948653b0de5d407.tar.bz2
px4-firmware-90f9b154eb895aaf321819b00948653b0de5d407.zip
Flipped simple mode pitch/throttle channel input.
Diffstat (limited to 'apps')
-rw-r--r--apps/controllib/fixedwing.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/controllib/fixedwing.cpp b/apps/controllib/fixedwing.cpp
index 3f9a70c5f..bbf87533e 100644
--- a/apps/controllib/fixedwing.cpp
+++ b/apps/controllib/fixedwing.cpp
@@ -282,19 +282,19 @@ void BlockMultiModeBacksideAutopilot::update()
// calculate velocity, XXX should be airspeed, but using ground speed for now
float v = sqrtf(_pos.vx * _pos.vx + _pos.vy * _pos.vy + _pos.vz * _pos.vz);
- // throttle channel -> rate of climb
+ // pitch channel -> rate of climb
// TODO, might want to put a gain on this, otherwise commanding
// from +1 -> -1 m/s for rate of climb
//float dThrottle = _roc2Thr.update(
- //_rocMax.get()*_manual.throttle - _pos.vz);
+ //_rocMax.get()*_manual.pitch - _pos.vz);
// roll channel -> bank angle
float phiCmd = _phiLimit.update(_manual.roll * _phiLimit.getMax());
float pCmd = _phi2P.update(phiCmd - _att.roll);
- // pitch channel -> velocity
+ // throttle channel -> velocity
// negative sign because nose over to increase speed
- float vCmd = _manual.pitch * (_vLimit.getMax() - _vLimit.getMin()) + _vLimit.getMin();
+ float vCmd = _manual.throttle * (_vLimit.getMax() - _vLimit.getMin()) + _vLimit.getMin();
float thetaCmd = _theLimit.update(-_v2Theta.update(_vLimit.update(vCmd) - v));
float qCmd = _theta2Q.update(thetaCmd - _att.pitch);