aboutsummaryrefslogtreecommitdiff
path: root/src/modules/fixedwing_backside
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-01-24 00:06:10 +0100
committerAnton Babushkin <anton.babushkin@me.com>2014-01-24 00:06:10 +0100
commit58792c5ca6e42bc251dd3c92b0e79217ff5d5403 (patch)
treeea46289f1159857c26ea40f71674a3bbb06cec8e /src/modules/fixedwing_backside
parentb3d98e4a19662af44432a0436a1b5de7fb9649c9 (diff)
downloadpx4-firmware-58792c5ca6e42bc251dd3c92b0e79217ff5d5403.tar.gz
px4-firmware-58792c5ca6e42bc251dd3c92b0e79217ff5d5403.tar.bz2
px4-firmware-58792c5ca6e42bc251dd3c92b0e79217ff5d5403.zip
Use double for lat/lon in vehicle_global_position topic, use filed names lat, lon, alt, vel_n, vel_e, vel_d for global positions
Diffstat (limited to 'src/modules/fixedwing_backside')
-rw-r--r--src/modules/fixedwing_backside/fixedwing.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/fixedwing_backside/fixedwing.cpp b/src/modules/fixedwing_backside/fixedwing.cpp
index 108e9896d..f7c0b6148 100644
--- a/src/modules/fixedwing_backside/fixedwing.cpp
+++ b/src/modules/fixedwing_backside/fixedwing.cpp
@@ -174,9 +174,9 @@ void BlockMultiModeBacksideAutopilot::update()
// of control we will limit the velocity feedback between
// the min/max velocity
float v = _vLimit.update(sqrtf(
- _pos.vx * _pos.vx +
+ _pos.vel_n * _pos.vel_n +
_pos.vy * _pos.vy +
- _pos.vz * _pos.vz));
+ _pos.vel_d * _pos.vel_d));
// limit velocity command between min/max velocity
float vCmd = _vLimit.update(_vCmd.get());
@@ -236,9 +236,9 @@ void BlockMultiModeBacksideAutopilot::update()
// for the purpose of control we will limit the velocity feedback between
// the min/max velocity
float v = _vLimit.update(sqrtf(
- _pos.vx * _pos.vx +
+ _pos.vel_n * _pos.vel_n +
_pos.vy * _pos.vy +
- _pos.vz * _pos.vz));
+ _pos.vel_d * _pos.vel_d));
// pitch channel -> rate of climb
// TODO, might want to put a gain on this, otherwise commanding